-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
While we have ObservationConvention for Observation-based instrumentation, we don't have an equivalent direct way to customize the convention used by Meter-based instrumentation. This came up in the context of #5286.
With a dedicated MeterConvention, instrumentation can utilize this to offer a direct way for users to control the convention of widely adopted instrumentation components. OpenTelemetry's semantic conventions are a set of conventions that differ in some ways from existing instrumentation in Micrometer and elsewhere. Without MeterConvention, users need to customize the meter names and tags produced by instrumentation with a MeterFilter, which is not always easy or possible depending on the differences. Filters may need to be applied in a specific order to have the desired effect, making them potentially brittle for this use case.
We should add a dedicated MeterConvention interface that can be implemented to change the name and tags, recognizing that tags sometimes depend on variable objects (the "context" for generating the appropriate tags).