Open philsttr opened 9 months ago
@philsttr In the otel world, what is the mechanism for one to supply a custom/pluggable name/attribute customizer (similar to the newrelic one)?
Looking into other examples, it seems like one can only configure basic settings through AgentInstrumentationConfig
(eg, in Micrometer)
I'm interested in contributing for this issue.
Is your feature request related to a problem? Please describe.
DropWizard Metrics does not natively support tags/attributes.
However, a common workaround for users of DropWizard Metrics is to encode tag name/value pairs in the metric name. For example, have a DropWizard Metric with the following name:
Unfortunately, the OpenTelemetry DropWizard instrumentation uses the DropWizard metric name as-is, and does not provide a mechanism to decode the metric name into name + attributes. This produces low-quality data, which is why the dropwizard-metrics instrumentation is disabled by default.
Describe the solution you'd like
It would be nice if the OpenTelemetry DropWizard Metrics instrumentation had pluggable support for decomposing DropWizard Metric names into name + attributes. Otel could also provide some out-of-the-box implementations for common encodings such as the one mentioned in the example above.
For comparison, this approach has been implemented in dropwizard-metrics-newrelic.
This solution would allow applications currently instrumented with DropWizard metrics with names containing encoded tag name/values to be able to report these metrics via OpenTelemetry, and produce high quality data.
Describe alternatives you've considered
None, other than not using DropWizard Metrics
Additional context
No response