Skip to content

Commit

Permalink
Add container metrics fields from ECS
Browse files Browse the repository at this point in the history
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
  • Loading branch information
ChrsMark committed Jun 19, 2023
1 parent d6d2952 commit 3dd54a3
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 0 deletions.
103 changes: 103 additions & 0 deletions semantic_conventions/metrics/container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
groups:
- id: metric.container.cpu.usage
type: metric
metric_name: container.cpu.usage
brief: "Recent CPU utilization for the container."
note: >
CPU usage percentage normalized by the number of CPU cores.
The value range is [0.0,1.0].
instrument: gauge
unit: "1"
extends: attributes.container.cpu
attributes:
- ref: container.name
- ref: container.id
- ref: container.runtime
- ref: container.image.name
- ref: container.image.tag
- id: metric.container.memory.usage
type: metric
metric_name: container.memory.usage
brief: "Recent memory utilization for the container."
note: >
Memory usage percentage.
The value range is [0.0,1.0].
instrument: gauge
unit: "1"
extends: attributes.container.memory
attributes:
- ref: container.name
- ref: container.id
- ref: container.runtime
- ref: container.image.name
- ref: container.image.tag
- id: metric.container.disk.read.bytes
type: metric
metric_name: container.disk.read.bytes
brief: "Disk read bytes for the container."
note: >
The total number of bytes read
successfully (aggregated from all disks)
since the last metric collection.
instrument: gauge
unit: "By"
extends: attributes.container.disk.read
attributes:
- ref: container.name
- ref: container.id
- ref: container.runtime
- ref: container.image.name
- ref: container.image.tag
- id: metric.container.disk.write.bytes
type: metric
metric_name: container.disk.write.bytes
brief: "Disk write bytes for the container."
note: >
The total number of bytes written
successfully (aggregated from all disks)
since the last metric collection
instrument: gauge
unit: "By"
extends: attributes.container.disk.write
attributes:
- ref: container.name
- ref: container.id
- ref: container.runtime
- ref: container.image.name
- ref: container.image.tag
- id: metric.container.network.ingress.bytes
type: metric
metric_name: container.network.ingress.bytes
brief: "Network ingress bytes for the container."
note: >
The number of bytes received
on all network interfaces
by the container since
the last metric collection.
instrument: gauge
unit: "By"
extends: attributes.container.network.ingress.bytes
attributes:
- ref: container.name
- ref: container.id
- ref: container.runtime
- ref: container.image.name
- ref: container.image.tag
- id: metric.container.network.egress.bytes
type: metric
metric_name: container.network.egress.bytes
brief: "Network egress bytes for the container."
note: >
The number of bytes sent out
on all network interfaces
by the container since
the last metric collection.
instrument: gauge
unit: "By"
extends: attributes.container.network.egress.bytes
attributes:
- ref: container.name
- ref: container.id
- ref: container.runtime
- ref: container.image.name
- ref: container.image.tag
18 changes: 18 additions & 0 deletions semantic_conventions/resource/container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,21 @@ groups:
brief: >
Container image tag.
examples: ['0.1']
- id: network.ingress.bytes
type: metric
metric_name: container.network.ingress.bytes
brief: "Network ingress bytes for the container."
note: >
The number of bytes sent out on all network interfaces
by the container since the last metric collection.
instrument: gauge
unit: "By"
- id: network.egress.bytes
type: metric
metric_name: container.network.egress.bytes
brief: "Network egress bytes for the container."
note: >
The number of bytes received on all network interfaces
by the container since the last metric collection.
instrument: gauge
unit: "By"

0 comments on commit 3dd54a3

Please sign in to comment.