Skip to content

OTel Span is missing required attributes#36155

Closed
jonatan-ivanov wants to merge 1 commit intospring-projects:mainfrom
jonatan-ivanov:add-missing-otel-span-attributes
Closed

OTel Span is missing required attributes#36155
jonatan-ivanov wants to merge 1 commit intospring-projects:mainfrom
jonatan-ivanov:add-missing-otel-span-attributes

Conversation

@jonatan-ivanov
Copy link
Copy Markdown
Member

OTel semantic conventions mandate certain resource attributes to present on exported spans, see telemetry sdk semantic conventions. I'm not sure why it is so easy or possible removing the mandatory defaults but it seems it is intentional according to the docs/examples

Originally opened by @arik-dig: micrometer-metrics/tracing#294

OTel semantic conventions mandate certain resource attributes to present
on exported spans, see: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md#telemetry-sdk
I'm not sure why it is so easy or possible removing the mandatory
defaults but it seems it is intentional according to the docs/examples,
see: https://opentelemetry.io/docs/instrumentation/java/manual/#example
@jonatan-ivanov
Copy link
Copy Markdown
Member Author

I'm not sure 3.2.x is the right place for this, maybe this should be considered as a bug and done on 3.0.x.

@wilkinsona
Copy link
Copy Markdown
Member

If we're missing some attributes that are mandatory, it sounds like a bug to me. That said, if they're really mandatory, why can they be removed and why doesn't it fail when you do so?

@jonatan-ivanov
Copy link
Copy Markdown
Member Author

That's my concern too, I don't think it should be possible for users to remove mandatory defaults but the docs disagree, I opened an issue for this: open-telemetry/opentelemetry-java#5595

@snicoll snicoll changed the title Add missing OTel Span attributes OTel Span is missing required attributes Jul 17, 2023
@snicoll snicoll added type: bug A general bug and removed type: enhancement A general enhancement labels Jul 17, 2023
@snicoll snicoll modified the milestones: 3.2.x, 3.0.x Jul 17, 2023
@snicoll snicoll modified the milestones: 3.0.x, 3.0.9 Jul 17, 2023
snicoll pushed a commit that referenced this pull request Jul 17, 2023
OTel semantic conventions mandate certain resource attributes to present
on exported spans. This commits make sure that the attribute we add are
merged with the defaults, rather than replacing them.

See gh-36155
@snicoll snicoll closed this in bbaac07 Jul 17, 2023
@jonatan-ivanov jonatan-ivanov deleted the add-missing-otel-span-attributes branch July 17, 2023 18:55
@jonatan-ivanov jonatan-ivanov mentioned this pull request Jul 20, 2023
31 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

theme: observability Issues related to observability type: bug A general bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants