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

feat: lazy sampling #3956

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from
Draft

feat: lazy sampling #3956

wants to merge 14 commits into from

Conversation

ZStriker19
Copy link

What does this PR do?
This PR enables lazy sampling with the feature being the ability to sample on tags and resource values for root spans. It does this by:

  1. Removing sampling at span start
  2. Change the metadata values returned by TraceOperation so that values from the root span will be returned if available, allowing sampling on all tags that will end up attached to the root span.
  3. Running sampling in TraceOperation.to_digest which runs before context propagation
  4. Running sampling in Tracer.flush which runs before spans are written to the agent.

Motivation:
The ability to sample on tags and resource will be helpful to users trying to reduce costs in a precise way as well as keep those spans that are truly useful to them.

Additional Notes:

How to test the change?

Unsure? Have a question? Request a review!

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.

1 participant