You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying utf-8 support with OpenTelemetry, I found the default model.NameEscapingScheme of model.ValueEncodingEscaping surprising. It converted my metric name to U__rpc_2e_durations_2e_histogram_2e_seconds.
Underscore escaping is the most human-readable of the escaping schemes. For anyone using a system that doesn't support the new UTF-8 stuff, or even curl, being able to read the output or find/read the names when querying is probably more important. I also suspect, but haven't verified, that most existing escaping schemes replace with underscores (at least OpenCensus/OpenTelemetry currently do). If we defaulted to underscore replacement, it would make the migration easier on that front.
I am ok with this approach. The main reason to escape to ValuesEncoding is to preserve round-tripability of the escaped names. Once we convert to underscores, that possibility is lost. However simple underscore replacement has been the chosen approach for Prometheus for a long time, so it's probably better to keep things familiar. I'll prepare a PR.
ywwg
added a commit
to ywwg/common
that referenced
this issue
Sep 4, 2024
Forked from open-telemetry/opentelemetry-go#5755 (comment)
When trying utf-8 support with OpenTelemetry, I found the default
model.NameEscapingScheme
ofmodel.ValueEncodingEscaping
surprising. It converted my metric name toU__rpc_2e_durations_2e_histogram_2e_seconds
.Underscore escaping is the most human-readable of the escaping schemes. For anyone using a system that doesn't support the new UTF-8 stuff, or even curl, being able to read the output or find/read the names when querying is probably more important. I also suspect, but haven't verified, that most existing escaping schemes replace with underscores (at least OpenCensus/OpenTelemetry currently do). If we defaulted to underscore replacement, it would make the migration easier on that front.
@ywwg
The text was updated successfully, but these errors were encountered: