Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Option to configure OTEL Semantic Conventions for JVM metrics #5286

Open
lenin-jaganathan opened this issue Jul 4, 2024 · 5 comments
Open
Labels
enhancement A general enhancement instrumentation An issue that is related to instrumenting a component module: micrometer-core An issue that is related to our core module
Milestone

Comments

@lenin-jaganathan
Copy link
Contributor

Please describe the feature request.
In open-telemetry/semantic-conventions#569, OpenTelemetry has made JVM metrics stable. It makes sense to adopt the stable semantic convention for OTLPMeterRegistry to keep in line with the OTEL Semantic Convention.

Additional context
Related links,

@shakuzen
Copy link
Member

shakuzen commented Jul 4, 2024

Since in Micrometer we consider changing existing meter names and tags a breaking change, I'm not sure how we would do this outside a new major version. Any ideas?

It makes sense to adopt the stable semantic convention for OTLPMeterRegistry to keep in line with the OTEL Semantic Convention.

I also wouldn't tie a wire format (OTLP) to a semantic convention - I think they should be separate decisions. It should be valid to use OpenTelemetry semantic conventions with a format other than OTLP and it should be valid to use OTLP without using the OpenTelemetry semantic conventions.

@ntkoopman
Copy link

Add additional OTEL specific MeterBinder implementations in addition to the JVM ones?
Or add an option to the current ones to output the updated OTEL conventions and leave it to the user to set it?

@lenin-jaganathan
Copy link
Contributor Author

I am working on something within our organization. It is a bit of hybrid approach with using MeterFilter for renaming existing things and an additional MeterBinder for missing pieces. I can create a follow-up PR if we agree on the approach in this issue.

Yeah, this should be a opt-in thing for the reason @shakuzen mentioned above.

@jonatan-ivanov
Copy link
Member

As an alternative to the MeterFilter, I think using a mechanism that is somewhat similar to ObservationConvention might work too but's that is a bigger change and it includes new public API components.

@shakuzen shakuzen changed the title Adopt Stable OTEL Semantic Conventions for JVM metrics Option to configure OTEL Semantic Conventions for JVM metrics Dec 16, 2024
@shakuzen shakuzen added enhancement A general enhancement module: micrometer-core An issue that is related to our core module instrumentation An issue that is related to instrumenting a component and removed waiting-for-triage labels Dec 16, 2024
@shakuzen shakuzen added this to the 1.x milestone Dec 16, 2024
@shakuzen
Copy link
Member

I've updated the labels and issue title. I suppose the most basic implementation might be to add a constructor argument (boolean?) to the relevant MeterBinder implementations so users can choose whether to use the otel semantic conventions for the relevant metrics provided by the MeterBinder. A concern I have is around future changes to the semantic conventions and how we could support that. We are planning to work on addressing that with ObservationConventions, but metrics (not through the Observation API) are outside of the scope of that. Making a MeterFilter is another option, but I think that might be more brittle than something in the MeterBinders themselves - it might depend on being configured in a certain order relative to other MeterFilters. So, I think we're still up for discussing options if anyone has ideas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A general enhancement instrumentation An issue that is related to instrumenting a component module: micrometer-core An issue that is related to our core module
Projects
None yet
Development

No branches or pull requests

4 participants