I am exposing metrics to Prometheus in an existing app that uses Dropwizard, and they have a wide variety of names. From app_metric_some_count to appMetric.someCount. For legacy monitoring reasons I am unable to rename these metrics.
When attempting to use a CustomMappingSampleBuilder to map these existing names to metric names that align with Prometheus best practices, I am unable to do so because both MappingConfig and GraphiteNamePattern (used within the CustomMappingSampleBuilder) expect via regex a very particular form of metric naming - app_example will not survive validation, but app.example will.
Given that Dropwizard itself does not enforce these metric naming conventions, I'm unsure as to why simpleclient_dropwizard does.
I am exposing metrics to Prometheus in an existing app that uses Dropwizard, and they have a wide variety of names. From
app_metric_some_counttoappMetric.someCount. For legacy monitoring reasons I am unable to rename these metrics.When attempting to use a CustomMappingSampleBuilder to map these existing names to metric names that align with Prometheus best practices, I am unable to do so because both
MappingConfigandGraphiteNamePattern(used within theCustomMappingSampleBuilder) expect via regex a very particular form of metric naming -app_examplewill not survive validation, butapp.examplewill.Given that Dropwizard itself does not enforce these metric naming conventions, I'm unsure as to why
simpleclient_dropwizarddoes.