File tree 3 files changed +8
-5
lines changed
3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1427,10 +1427,13 @@ func getGoGCEnv() int {
1427
1427
type translationStrategyOption string
1428
1428
1429
1429
var (
1430
- // NoUTF8EscapingWithSuffixes will keep UTF-8 characters as they are, units and type suffixes will still be added.
1430
+ // NoUTF8EscapingWithSuffixes will accept metric/label names as they are.
1431
+ // Unit and type suffixes may be added to metric names, according to certain rules.
1431
1432
NoUTF8EscapingWithSuffixes translationStrategyOption = "NoUTF8EscapingWithSuffixes"
1432
1433
// UnderscoreEscapingWithSuffixes is the default option for translating OTLP to Prometheus.
1433
- // This option will translate all UTF-8 characters to underscores, while adding units and type suffixes.
1434
+ // This option will translate metric name characters that are not alphanumerics/underscores/colons to underscores,
1435
+ // and label name characters that are not alphanumerics/underscores to underscores.
1436
+ // Unit and type suffixes may be appended to metric names, according to certain rules.
1434
1437
UnderscoreEscapingWithSuffixes translationStrategyOption = "UnderscoreEscapingWithSuffixes"
1435
1438
)
1436
1439
Original file line number Diff line number Diff line change @@ -179,8 +179,8 @@ otlp:
179
179
# - "UnderscoreEscapingWithSuffixes" refers to commonly agreed normalization used
180
180
# by OpenTelemetry in https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/pkg/translator/prometheus
181
181
# - "NoUTF8EscapingWithSuffixes" is a mode that relies on UTF-8 support in Prometheus.
182
- # It preserves all special characters like dots, but it still add required suffixes
183
- # for units and _total like in UnderscoreEscapingWithSuffixes.
182
+ # It preserves all special characters like dots, but still adds required metric name suffixes
183
+ # for units and _total, as UnderscoreEscapingWithSuffixes does .
184
184
[ translation_strategy : <string> | default = "UnderscoreEscapingWithSuffixes" ]
185
185
# Enables adding "service.name", "service.namespace" and "service.instance.id"
186
186
# resource attributes to the "target_info" metric, on top of converting
Original file line number Diff line number Diff line change 22
22
- k8s.pod.name
23
23
- k8s.replicaset.name
24
24
- k8s.statefulset.name
25
- # Ingest OTLP data keeping UTF-8 characters in metric/label names.
25
+ # Ingest OTLP data keeping all characters in metric/label names.
26
26
translation_strategy : NoUTF8EscapingWithSuffixes
27
27
28
28
storage :
You can’t perform that action at this time.
0 commit comments