Skip to content

Commit

Permalink
feat(dockerstats): add online cpu and memory failcnt metrics (#31481)
Browse files Browse the repository at this point in the history
**Description:** two new metrics have been added, they were already
being scraped but not emitted

**Link to tracking Issue:** #31366

**Testing:** added new metrics to `TestScrapeV2` 

**Documentation:** generated by mdatagen
  • Loading branch information
aboguszewski-sumo authored Mar 21, 2024
1 parent 8f4639b commit e752b99
Show file tree
Hide file tree
Showing 24 changed files with 381 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .chloggen/dockerstats-onlinecpus-failcnt.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use this changelog template to create an entry for release notes.

# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: dockerstatsreceiver

# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
note: add metrics for online CPU count and memory fails count

# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
issues: [31366]

# (Optional) One or more lines of additional information to render under the primary note.
# These lines will be padded with 2 spaces and then inserted directly into the document.
# Use pipe (|) for multiline entries.
subtext:

# If your change doesn't affect end users or the exported elements of any package,
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
# Optional: The change log or logs in which this entry should be included.
# e.g. '[user]' or '[user, api]'
# Include 'user' if the change is relevant to end users.
# Include 'api' if there is a change to a library API.
# Default: '[user]'
change_logs: [user]
16 changes: 16 additions & 0 deletions receiver/dockerstatsreceiver/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,14 @@ This metric is only reported if the container has limits set with -cpus, -cpuset
| ---- | ----------- | ---------- |
| {cpus} | Gauge | Double |
### container.cpu.logical.count
Number of cores available to the container.
| Unit | Metric Type | Value Type |
| ---- | ----------- | ---------- |
| {cpus} | Gauge | Int |
### container.cpu.shares
CPU shares set for the container.
Expand Down Expand Up @@ -406,6 +414,14 @@ Bytes that are waiting to get written back to the disk, from this cgroup (Only a
| ---- | ----------- | ---------- | ----------------------- | --------- |
| By | Sum | Int | Cumulative | false |
### container.memory.fails
Number of times the memory limit was hit.
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic |
| ---- | ----------- | ---------- | ----------------------- | --------- |
| {fails} | Sum | Int | Cumulative | true |
### container.memory.hierarchical_memory_limit
The maximum amount of physical memory that can be used by the processes of this control group (Only available with cgroups v1).
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

116 changes: 116 additions & 0 deletions receiver/dockerstatsreceiver/internal/metadata/generated_metrics.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit e752b99

Please sign in to comment.