-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Context: open-telemetry/opentelemetry-go#7044
When UTF8Allowed=true,
otlptranslator.Metric{
Name: "foo.seconds"
Type: otlptranslator.MetricTypeMonotonicCounter
Unit: "s"
}becomes foo.seconds_seconds_total. Expected: foo.seconds_total.
otlptranslator.Metric{
Name: "foo.total"
Type: otlptranslator.MetricTypeMonotonicCounter
Unit: "s"
}becomes foo.total_seconds_total. Expected: foo_seconds_total.
It looks like we simply append suffixes when UTF8 is allowed:
otlptranslator/metric_namer.go
Line 262 in 8549f4a
| name += "_total" |
But we have a more sophisticated strategy for making sure we don't get duplicate suffixes when UFF8 is not allowed:
otlptranslator/metric_namer.go
Line 174 in 8549f4a
| nameTokens = append(removeItem(nameTokens, "total"), "total") |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels