Limit LocalRootSpan usage to http.route and span name#19209
Conversation
| } | ||
| Span serverSpan = LocalRootSpan.fromContextOrNull(context); | ||
| Span serverSpan = | ||
| v3Preview() ? Span.fromContext(context) : LocalRootSpan.fromContextOrNull(context); |
There was a problem hiding this comment.
Pull request dashboard statusStatus last refreshed: 2026-07-26 19:43:00 UTC.
This automated status or its linked feedback items may be incorrect. If something looks wrong, please report it with the result you expected. If you believe this pull request is incorrectly routed as waiting on the author, comment |
3b8f777 to
51425ba
Compare
There was a problem hiding this comment.
Pull request overview
Limits non-route attribute enrichment of local-root spans in v3 preview mode.
Changes:
- Uses the current span for gateway, servlet, and ShenYu attributes in v3 preview.
- Preserves legacy local-root behavior otherwise.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
ServerRequestHelper.java |
Redirects gateway attributes. |
BaseServletHelper.java |
Redirects servlet attributes. |
MetaDataHelper.java |
Redirects ShenYu metadata. |
…ble current span lookup
…3-preview metadata config
|
I'm not sure about this. The intent here is to augment the server span with additional attributes as stated in https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/apache-shenyu-2.4/metadata.yaml While the span from context is probably also the server span, unless someone uses method instrumentation or something like that to create additional span, using |
Limit LocalRootSpan usage.
LocalRootSpan isn't blessed by the OpenTelemetry Specification, and there's no semantic conventions around it.
These usages don't seem to require it anyways.