A metric sample includes a metric_name, like bytes_written, and a module, like app::http. To disambiguate metric names, we can either combine the name and module, like app_http_bytes_written, expect names to already be unique, or rely on the module being carried and visible elsewhere to do it.
I think we currently do the third; for instance in emit_otlp we set the module in the instrumentation scope.
For metrics produced by emit itself, we now disambiguate them, even though the module is also set. I think that's the most compatible way to go, but users can decide on their own scheme for naming their metrics.
A metric sample includes a
metric_name
, likebytes_written
, and a module, likeapp::http
. To disambiguate metric names, we can either combine the name and module, likeapp_http_bytes_written
, expect names to already be unique, or rely on the module being carried and visible elsewhere to do it.I think we currently do the third; for instance in
emit_otlp
we set the module in the instrumentation scope.