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

Move attributes to span builder for use by samplers #2587

Merged
merged 3 commits into from
Mar 17, 2021

Conversation

trask
Copy link
Member

@trask trask commented Mar 17, 2021

Moves the majority of attributes in HttpClientTracer and HttpServerTracer from being set on Span to being set on SpanBuilder, which allows these attributes to be used by samplers.

Fixes #388

Comment on lines +35 to +36
request.setAttribute("traceId", spanContext.getTraceId());
request.setAttribute("spanId", spanContext.getSpanId());
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll send a follow-up PR to change these attribute names to trace_id and span_id to match logging MDC attribute names.

@trask trask marked this pull request as ready for review March 17, 2021 04:52
Copy link
Member

@mateuszrzeszutek mateuszrzeszutek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 👍 👍

@iNikem iNikem merged commit 0ce9ca5 into open-telemetry:main Mar 17, 2021
@trask trask deleted the set-attrs-on-span-builder branch April 4, 2021 02:52
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

Successfully merging this pull request may close these issues.

Make attributes such as http.url available before a span is started
3 participants