-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[podmanreceiver] Add metrics and resource metadata (#30232)
**Description:** <Describe what has changed.> - Adds "metadata.yml" file to autogenerate metrics and resources. - [Update: not done in this PR] Fixes invalid network metrics: "rx -> input" and "tx -> output" **Link to tracking Issue:** #28640 **Testing:** Previous tests preserved. **Documentation:** <Describe the documentation added.> --------- Co-authored-by: Mackenzie <63265430+mackjmr@users.noreply.github.com>
- Loading branch information
Showing
20 changed files
with
1,881 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: breaking | ||
|
||
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) | ||
component: podmanreceiver | ||
|
||
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). | ||
note: "Adds metrics and resources metadata and sets seconds precision for cpu metrics" | ||
|
||
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. | ||
issues: [28640] | ||
|
||
# (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: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,120 @@ | ||
[comment]: <> (Code generated by mdatagen. DO NOT EDIT.) | ||
|
||
# podman_stats | ||
|
||
## Default Metrics | ||
|
||
The following metrics are emitted by default. Each of them can be disabled by applying the following configuration: | ||
|
||
```yaml | ||
metrics: | ||
<metric_name>: | ||
enabled: false | ||
``` | ||
### container.blockio.io_service_bytes_recursive.read | ||
Number of bytes transferred from the disk by the container | ||
[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| {operations} | Sum | Int | Cumulative | true | | ||
### container.blockio.io_service_bytes_recursive.write | ||
Number of bytes transferred to the disk by the container | ||
[More docs](https://www.kernel.org/doc/Documentation/cgroup-v1/blkio-controller.txt). | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| {operations} | Sum | Int | Cumulative | true | | ||
### container.cpu.percent | ||
Percent of CPU used by the container. | ||
| Unit | Metric Type | Value Type | | ||
| ---- | ----------- | ---------- | | ||
| 1 | Gauge | Double | | ||
### container.cpu.usage.percpu | ||
Total CPU time consumed per CPU-core. | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| s | Sum | Int | Cumulative | true | | ||
#### Attributes | ||
| Name | Description | Values | | ||
| ---- | ----------- | ------ | | ||
| core | The CPU core number when utilising per-CPU metrics. | Any Str | | ||
### container.cpu.usage.system | ||
System CPU usage. | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| s | Sum | Int | Cumulative | true | | ||
### container.cpu.usage.total | ||
Total CPU time consumed. | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| s | Sum | Int | Cumulative | true | | ||
### container.memory.percent | ||
Percentage of memory used. | ||
| Unit | Metric Type | Value Type | | ||
| ---- | ----------- | ---------- | | ||
| 1 | Gauge | Double | | ||
### container.memory.usage.limit | ||
Memory limit of the container. | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| By | Sum | Int | Cumulative | false | | ||
### container.memory.usage.total | ||
Memory usage of the container. | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| By | Sum | Int | Cumulative | false | | ||
### container.network.io.usage.rx_bytes | ||
Bytes received by the container. | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| By | Sum | Int | Cumulative | true | | ||
### container.network.io.usage.tx_bytes | ||
Bytes sent by the container. | ||
| Unit | Metric Type | Value Type | Aggregation Temporality | Monotonic | | ||
| ---- | ----------- | ---------- | ----------------------- | --------- | | ||
| By | Sum | Int | Cumulative | true | | ||
## Resource Attributes | ||
| Name | Description | Values | Enabled | | ||
| ---- | ----------- | ------ | ------- | | ||
| container.id | The ID of the container. | Any Str | true | | ||
| container.image.name | The name of the image in use by the container. | Any Str | true | | ||
| container.name | The name of the container. | Any Str | true | | ||
| container.runtime | The runtime of the container. For this receiver, it will always be 'podman'. | Any Str | true | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
134 changes: 134 additions & 0 deletions
134
receiver/podmanreceiver/internal/metadata/generated_config.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.