fix(otel): Align span attributes and log enrichment with cross-SDK spec#519
Merged
Conversation
ayushiahjolia
force-pushed
the
fix/otel-align-span-attributes
branch
2 times, most recently
from
July 8, 2026 17:19
b10aca8 to
dfccb12
Compare
ayushiahjolia
marked this pull request as ready for review
July 8, 2026 17:42
zhongkechen
reviewed
Jul 8, 2026
ayushiahjolia
force-pushed
the
fix/otel-align-span-attributes
branch
from
July 8, 2026 19:52
dfccb12 to
aea3713
Compare
ayushiahjolia
force-pushed
the
fix/otel-align-span-attributes
branch
from
July 8, 2026 20:01
aea3713 to
162548b
Compare
zhongkechen
reviewed
Jul 8, 2026
| // Skip attempt spans for CONTEXT operations — they are a scoping construct, not a | ||
| // retriable unit of work, so attempt number/outcome attributes don't apply. | ||
| // The operation span itself provides parent context for auto-instrumented calls. | ||
| if ("CONTEXT".equals(info.type())) { |
Contributor
There was a problem hiding this comment.
context spans are still created in onOperationStart?
Contributor
Author
There was a problem hiding this comment.
Yes, added intentionally. The makeCurrent() here is for auto-instrumented calls (HTTP clients, SDK calls). Without it, those spans would parent under the invocation span instead of the CONTEXT operation span.
zhongkechen
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Issue Link, if available
#518
Description
Aligns the Java OTel plugin's span attributes and log enrichment with the JS and Python SDKs.
Demo/Screenshots
Checklist
Testing
Unit Tests
Have unit tests been written for these changes? Updated
Integration Tests
Have integration tests been written for these changes? N/A
Examples
Has a new example been added for the change? (if applicable) N/A