Skip to content

Commit e6e1e76

Browse files
authored
[exporter/signalfx] Keep container.cpu.time metric in the translations (open-telemetry#23403)
Do not drop `container.cpu.time` metric in the default translations so it can be enabled in the `include_metrics` config option. This is the only metric that is dropped in the translations. All other metrics are being kept.
1 parent 65a1dea commit e6e1e76

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Use this changelog template to create an entry for release notes.
2+
# If your change doesn't affect end users, such as a test fix or a tooling change,
3+
# you should instead start your pull request title with [chore] or use the "Skip Changelog" label.
4+
5+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
6+
change_type: enhancement
7+
8+
# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
9+
component: exporter/signalfx
10+
11+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
12+
note: Do not drop container.cpu.time metric in the default translations so it can be enabled in the include_metrics config.
13+
14+
# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists.
15+
issues: [23403]

exporter/signalfxexporter/internal/translation/constants.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ translation_rules:
2121
k8s: true
2222
container: true
2323
24-
- action: rename_metrics
24+
- action: copy_metrics
2525
mapping:
2626
# kubeletstats container cpu needed for calculation below
2727
container.cpu.time: sf_temp.container_cpu_utilization

exporter/signalfxexporter/internal/translation/default_metrics.go

+2-4
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,8 @@ exclude_metrics:
130130
- /^k8s\.(?i:(node)|(pod))\.filesystem\.capacity$/
131131
- /^k8s\.(?i:(node)|(pod))\.filesystem\.usage$/
132132
133-
# matches (k8s.node|k8s.pod).cpu.time
134-
- /^k8s\.(?i:(node)|(pod))\.cpu\.time$/
135-
136-
# matches (container|k8s.node|k8s.pod).cpu.utilization
133+
# matches (container|k8s.node|k8s.pod).cpu...
134+
- /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.cpu\.time$/
137135
- /^(?i:(container)|(k8s\.node)|(k8s\.pod))\.cpu\.utilization$/
138136
139137
# matches k8s.node.network.io and k8s.node.network.errors

0 commit comments

Comments
 (0)