Skip to content

Implement sampled flag in propagation context#3084

Merged
buenaflor merged 17 commits intomainfrom
cursor/implement-sampled-flag-in-propagation-context-1420
Jul 21, 2025
Merged

Implement sampled flag in propagation context#3084
buenaflor merged 17 commits intomainfrom
cursor/implement-sampled-flag-in-propagation-context-1420

Conversation

@buenaflor
Copy link
Copy Markdown
Contributor

@buenaflor buenaflor commented Jul 16, 2025

📜 Description

Adds a sampled flag to PropagationContext to indicate if the current trace is sampled.

💡 Motivation and Context

In HTTP calls we just reference the propagation context sampled and propagate that in the sentry-trace

💚 How did you test it

Unit test, manual testing

📝 Checklist

  • I reviewed submitted code
  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
  • I updated the docs if needed
  • All tests passing
  • No breaking changes

Co-authored-by: giancarlo.buenaflor <giancarlo.buenaflor@sentry.io>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.79%. Comparing base (3ec248c) to head (e81df7e).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3084      +/-   ##
==========================================
- Coverage   87.90%   87.79%   -0.12%     
==========================================
  Files         287      287              
  Lines        9754     9763       +9     
==========================================
- Hits         8574     8571       -3     
- Misses       1180     1192      +12     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 16, 2025

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 478.67 ms 532.09 ms 53.42 ms
Size 6.54 MiB 7.69 MiB 1.15 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
575ebaa 478.00 ms 585.76 ms 107.76 ms
ec78888 457.94 ms 519.96 ms 62.02 ms
81f83eb 471.40 ms 522.14 ms 50.74 ms
0fb3800 465.64 ms 536.77 ms 71.13 ms
e2d675d 457.92 ms 529.17 ms 71.25 ms
9b99523 456.91 ms 490.55 ms 33.64 ms
c8596a6 474.00 ms 492.96 ms 18.96 ms
73dca78 476.53 ms 522.21 ms 45.68 ms
793f4dc 462.68 ms 544.21 ms 81.53 ms
93b7728 475.28 ms 489.13 ms 13.86 ms

App size

Revision Plain With Sentry Diff
575ebaa 6.54 MiB 7.69 MiB 1.15 MiB
ec78888 6.54 MiB 7.69 MiB 1.15 MiB
81f83eb 6.54 MiB 7.69 MiB 1.15 MiB
0fb3800 6.54 MiB 7.69 MiB 1.15 MiB
e2d675d 6.54 MiB 7.69 MiB 1.15 MiB
9b99523 6.54 MiB 7.69 MiB 1.15 MiB
c8596a6 6.54 MiB 7.53 MiB 1015.27 KiB
73dca78 6.54 MiB 7.69 MiB 1.15 MiB
793f4dc 6.54 MiB 7.69 MiB 1.15 MiB
93b7728 6.54 MiB 7.69 MiB 1.15 MiB

@buenaflor buenaflor marked this pull request as ready for review July 17, 2025 10:03
Copy link
Copy Markdown
Collaborator

@denrase denrase left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@buenaflor
Copy link
Copy Markdown
Contributor Author

@sentry review

@buenaflor buenaflor merged commit 6f47800 into main Jul 21, 2025
166 of 168 checks passed
@buenaflor buenaflor deleted the cursor/implement-sampled-flag-in-propagation-context-1420 branch July 21, 2025 10:49
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.

3 participants