Skip to content

Introduce MeterConvention #6710

@shakuzen

Description

@shakuzen

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions