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

How to get attribute from span #2345

Closed
HolyMiss opened this issue Oct 8, 2023 · 3 comments
Closed

How to get attribute from span #2345

HolyMiss opened this issue Oct 8, 2023 · 3 comments

Comments

@HolyMiss
Copy link

HolyMiss commented Oct 8, 2023

image
The current Span class only provides the SetAttribute method. What should I do if I want to get the attributes in span in the Propagater I implemented?

@github-actions github-actions bot added the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 8, 2023
@lalitb
Copy link
Member

lalitb commented Oct 8, 2023

otel-cpp doesn't provide Readable Span interface. To optimize performance, the SDK implementation avoids keeping an intermediate copy of the attributes passed via Span::SetAttribute(), opting instead to serialize them directly to the exporter format. This approach complicates the provision of a Readable Span. Previous discussions, and somewhat non-trivial solution on this can be found in issues #2108 and #1475.

@lalitb
Copy link
Member

lalitb commented Oct 12, 2023

@HolyMiss - Do you have further questions, or the issue can be closed based on above reasoning ?

@HolyMiss
Copy link
Author

@HolyMiss - Do you have further questions, or the issue can be closed based on above reasoning ?

no thanks!

@marcalff marcalff removed the needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. label Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants