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

Utilize is_recording instead of Defaultspan for instrumentations if sampled #1057

Closed
lzchen opened this issue Aug 31, 2020 · 0 comments · Fixed by #1241
Closed

Utilize is_recording instead of Defaultspan for instrumentations if sampled #1057

lzchen opened this issue Aug 31, 2020 · 0 comments · Fixed by #1241
Assignees
Labels
good first issue Good first issue release:required-for-ga To be resolved before GA release

Comments

@lzchen
Copy link
Contributor

lzchen commented Aug 31, 2020

If a span is determined to be not sampled returned from the sampler, a DefaultSpan implementation is returned. This was beneficial because we could use the same code for all span related logic but have different behaviour whether it is a real span or a Defaultspan. However, we will be having performance losses using the mechanism for instrumentations, in which we call all the methods and set all attributes on the span (even if they do nothing) -> see requests. Most other languages check the "is_recording" flag and do not run any of the span related logic if not recording. We should do the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good first issue release:required-for-ga To be resolved before GA release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant