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
{{ message }}
Repository navigation
Metric pattern validation in simpleclient_dropwizard is overly strict #518
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.
Yep, I'm intending to, I have a few days free coming up so will put something together then.
Can I ask your opinion before I do, though? I was intending, in order to preserve backwards compatibility for anyone using the existing CustomMappingSampleBuilder, to create class(es) providing similar functionality alongside it, instead of modifying the classes mentioned above directly. How does that sit with you?
I'd modify directly, and I'm not even sure how this could break anyone. I'd suggest seeing what the statsd/graphite exporter do here to, as we should be in line with them.
On Fri, Dec 20, 2019 at 12:18 PM Brian Brazil ***@***.***> wrote:
I'd modify directly, and I'm not even sure how this could break anyone.
I'd suggest seeing what the statsd/graphite exporter do here to, as we
should be in line with them.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#518?email_source=notifications&email_token=AC2Q2JG7QVJH3FY7EBBXWCLQZP6LJA5CNFSM4J4EDD22YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEHLLQ3A#issuecomment-567720044>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AC2Q2JCXCJFMXSH7NVXYOXDQZP6LJANCNFSM4J4EDD2Q>
.
I was running into the exact same problem when writing a dropwizard wrapper bundle.
When trying to map io.dropwizard.jetty.MutableServletContextHandler.*-requests to servlet.requests with a label defined as method: ${0} the validation does not let it pass through due to * not followed by a period.
The whole match pattern validation seem unnecessary, as what matters at the end is the actual metric name.
This issue has been marked as stale due to 12 months of inactivity. It will be automatically closed if there is no further activity over the next 30 days.
Activity
brian-brazil commentedon Dec 18, 2019
Would you like to send a PR?
LiamClarkeNZ commentedon Dec 19, 2019
Hi @brian-brazil,
Yep, I'm intending to, I have a few days free coming up so will put something together then.
Can I ask your opinion before I do, though? I was intending, in order to preserve backwards compatibility for anyone using the existing CustomMappingSampleBuilder, to create class(es) providing similar functionality alongside it, instead of modifying the classes mentioned above directly. How does that sit with you?
Cheers,
Liam Clarke
brian-brazil commentedon Dec 19, 2019
I'd modify directly, and I'm not even sure how this could break anyone. I'd suggest seeing what the statsd/graphite exporter do here to, as we should be in line with them.
LiamClarkeNZ commentedon Dec 20, 2019
LiamClarkeNZ commentedon Dec 24, 2019
PR: #519
peetzen commentedon Feb 1, 2020
I was running into the exact same problem when writing a dropwizard wrapper bundle.
When trying to map io.dropwizard.jetty.MutableServletContextHandler.*-requests to servlet.requests with a label defined as method: ${0} the validation does not let it pass through due to * not followed by a period.
The whole match pattern validation seem unnecessary, as what matters at the end is the actual metric name.
github-actions commentedon Mar 5, 2026
This issue has been marked as stale due to 12 months of inactivity. It will be automatically closed if there is no further activity over the next 30 days.
Relax metric name validation in Dropwizard5 CustomMappingSampleBuilder
Relax metric name validation in Dropwizard5 CustomMappingSampleBuilder
fix: Relax metric name validation in Dropwizard5 (#1985)
github-actions commentedon Apr 5, 2026
This issue was automatically closed due to lack of activity after being marked stale. Feel free to reopen if you would like to continue working on it.