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

chore: sample trace before flush unless already sampled #3946

Closed
wants to merge 2 commits into from

Conversation

ZStriker19
Copy link
Contributor

What does this PR do?
This PR causes a trace to be sampled during flush with the intent of making sampling lazy.
Motivation:
Lazy sampling allows sampling on tags and resource

Additional Notes:

How to test the change?

Unsure? Have a question? Request a review!

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.84%. Comparing base (4fff83a) to head (7203b51).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3946      +/-   ##
==========================================
- Coverage   97.85%   97.84%   -0.01%     
==========================================
  Files        1303     1303              
  Lines       78139    78142       +3     
  Branches     3894     3895       +1     
==========================================
- Hits        76462    76461       -1     
- Misses       1677     1681       +4     
Flag Coverage Δ
97.84% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@pr-commenter
Copy link

pr-commenter bot commented Sep 25, 2024

Benchmarks

Benchmark execution time: 2024-09-25 20:58:19

Comparing candidate commit 529895a in PR branch zachg/sample_before_trace_flush with baseline commit 4fff83a in branch master.

Found 3 performance improvements and 0 performance regressions! Performance is the same for 21 metrics, 1 unstable metrics.

scenario:tracing - 1 span trace - no network

  • 🟩 throughput [+1075.173op/s; +1418.034op/s] or [+9.211%; +12.149%]

scenario:tracing - 10 span trace - no network

  • 🟩 throughput [+294.722op/s; +435.034op/s] or [+11.654%; +17.202%]

scenario:tracing - 100 span trace - no network

  • 🟩 throughput [+57.473op/s; +82.268op/s] or [+20.344%; +29.120%]

@ZStriker19 ZStriker19 closed this Oct 16, 2024
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.

2 participants