Skip to content

Align Server Observation with OTel semantic convention #34829

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

Open
vmeunier opened this issue Apr 25, 2025 · 4 comments
Open

Align Server Observation with OTel semantic convention #34829

vmeunier opened this issue Apr 25, 2025 · 4 comments
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team status: waiting-for-triage An issue we've not yet triaged or decided on theme: observability An issue related to observability and tracing

Comments

@vmeunier
Copy link

Hello,

There seems to be a divergence between https://opentelemetry.io/docs/specs/semconv/http/http-spans/#http-server-semantic-conventions and what Spring offers by default in ServerHttpObservationDocumentation.

For example :

  • method should be http.request.method
  • status should be http.response.status_code and should be an int and not a String
  • uri should be http.route

I haven't listed all the differences, but these are the main ones I happened to notice.

I'd be happy to contribute if necessary.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 25, 2025
@bclozel
Copy link
Member

bclozel commented Apr 25, 2025

That is a breaking change so we could only consider this for 7.0. Also, this will cause upgrade concerns as 6.x apps and 7.x apps will not ship the same metadata and this is likely to break existing dashboards.

@shakuzen do you think we should reconsider our existing metadata for 7.0 (at least the stable conventions) or should this be handled by https://github.com/micrometer-metrics/micrometer-otel-conventions-experimental ?

@bclozel bclozel added in: web Issues in web modules (web, webmvc, webflux, websocket) theme: observability An issue related to observability and tracing status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team labels Apr 25, 2025
@vmeunier
Copy link
Author

Can we consider duplicating the keys to avoid making breaking changes, and mark the old ones as deprecated ?

@bclozel
Copy link
Member

bclozel commented Apr 25, 2025

@vmeunier is there a way to mark attributes as deprecated and show that status in dashboards? That would be interesting.
Deprecating that in our own conventions would not tell much to most developers as they won't see it unless they extend those classes.

@vmeunier
Copy link
Author

vmeunier commented Apr 25, 2025

Not that I know of unfortunately, since attributes are only KeyValue pairs... And you're right, adding that info in your own code, no one will see it, so it's probably not the best idea.

Note : I just checked the ClientHttpObservationDocumentation class, and there are several keys that are not named correctly there as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: waiting-for-internal-feedback An issue that needs input from a member or another Spring Team status: waiting-for-triage An issue we've not yet triaged or decided on theme: observability An issue related to observability and tracing
Projects
None yet
Development

No branches or pull requests

3 participants