Prometheus exporter: unit, name, label sanitization improvements #3975
Labels
enhancement
New feature or request
help wanted
Good for taking. Extra help will be provided by maintainers
pkg:OpenTelemetry.Exporter.Prometheus.AspNetCore
Issues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet package
A few thing I found during a review of the current implementation:
[a-zA-Z_:]([a-zA-Z0-9_:])*
. From the OTel prometheus spec on metric names, the metric name MUST match[a-zA-Z_:]([a-zA-Z0-9_:])*
. The current implementation only sanitizes.
and-
.!@#$%
characters, for example, should be replaced with_
._
characters in metric names should be replace with a single_
.ms
should be converted tomilliseconds
.The text was updated successfully, but these errors were encountered: