Describe the bug
Due to how Metrics are constructed, using a prefixed registry causes valid metric names to be marked as invalid
For example, if a registry has a valid prefix (such as backend), (yet) invalid metric name (such as 3rd_party_api_response_time) will turn into valid metric names (backend_3rd_party_api_response_time)
Given that the check currently happens in the constructor of the metrics and not in the registration, there is no way to construct such metrics besides abandoning the prefix utility and manually prefixing the metrics
Describe the bug Due to how Metrics are constructed, using a prefixed registry causes valid metric names to be marked as invalid For example, if a registry has a valid prefix (such as
backend
), (yet) invalid metric name (such as3rd_party_api_response_time
) will turn into valid metric names (backend_3rd_party_api_response_time
)Given that the check currently happens in the constructor of the metrics and not in the registration, there is no way to construct such metrics besides abandoning the prefix utility and manually prefixing the metrics