Skip to content

fix: span ids not re-generating for headers created from scope#3051

Merged
buenaflor merged 10 commits intomainfrom
fix/span-ids-trace
Jul 11, 2025
Merged

fix: span ids not re-generating for headers created from scope#3051
buenaflor merged 10 commits intomainfrom
fix/span-ids-trace

Conversation

@buenaflor
Copy link
Copy Markdown
Contributor

📜 Description

Currently every trace header created from scope (propagation context), has the same span id.
We should always regenerate it. (same behaviour as in JS Browser)

💚 How did you test it?

Unit test, manual tests

📝 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

🔮 Next steps

@codecov
Copy link
Copy Markdown

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.05%. Comparing base (575ebaa) to head (ab987b3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3051      +/-   ##
==========================================
+ Coverage   87.98%   88.05%   +0.06%     
==========================================
  Files         287      286       -1     
  Lines        9533     9541       +8     
==========================================
+ Hits         8388     8401      +13     
+ Misses       1145     1140       -5     

☔ 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.

@buenaflor buenaflor changed the base branch from main to fix/trace-propagation-flutter July 8, 2025 12:32
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.

Just one small suggestion.

});
});

group('$isValidSampleRand', () {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

+1 for adding test for previously untested functionality.

@denrase
Copy link
Copy Markdown
Collaborator

denrase commented Jul 8, 2025

@buenaflor CI is failing: test/http_client/tracing_client_test.dart: TracingClient should add tracing headers from propagation context when tracing disabled (failed)

@buenaflor buenaflor changed the base branch from fix/trace-propagation-flutter to main July 11, 2025 10:00
cursor[bot]

This comment was marked as outdated.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 11, 2025

iOS Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1269.18 ms 1274.49 ms 5.31 ms
Size 7.86 MiB 9.44 MiB 1.58 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
2d34233 1258.19 ms 1268.92 ms 10.73 ms
b6c8720 1252.65 ms 1266.61 ms 13.96 ms
73a3c38 1263.37 ms 1277.90 ms 14.53 ms
93b7728 1247.23 ms 1264.87 ms 17.64 ms
0fb3800 1256.60 ms 1266.28 ms 9.68 ms
e2d675d 1238.48 ms 1242.76 ms 4.28 ms
9b99523 1256.06 ms 1270.33 ms 14.27 ms
73dca78 1246.65 ms 1265.42 ms 18.76 ms
aeb02f2 1244.29 ms 1256.55 ms 12.26 ms
6ba4675 1223.12 ms 1238.17 ms 15.04 ms

App size

Revision Plain With Sentry Diff
2d34233 7.86 MiB 9.44 MiB 1.58 MiB
b6c8720 7.86 MiB 9.44 MiB 1.58 MiB
73a3c38 7.86 MiB 9.44 MiB 1.58 MiB
93b7728 7.86 MiB 9.44 MiB 1.58 MiB
0fb3800 7.86 MiB 9.44 MiB 1.58 MiB
e2d675d 7.86 MiB 9.44 MiB 1.58 MiB
9b99523 7.86 MiB 9.44 MiB 1.58 MiB
73dca78 7.86 MiB 9.44 MiB 1.58 MiB
aeb02f2 7.86 MiB 9.44 MiB 1.58 MiB
6ba4675 7.86 MiB 9.44 MiB 1.58 MiB

Previous results on branch: fix/span-ids-trace

Startup times

Revision Plain With Sentry Diff
7887d07 1243.39 ms 1263.16 ms 19.78 ms
6527881 1259.62 ms 1266.16 ms 6.54 ms
0adaa4e 1240.43 ms 1261.94 ms 21.51 ms

App size

Revision Plain With Sentry Diff
7887d07 7.86 MiB 9.44 MiB 1.58 MiB
6527881 7.86 MiB 9.44 MiB 1.58 MiB
0adaa4e 7.86 MiB 9.44 MiB 1.58 MiB

@github-actions
Copy link
Copy Markdown
Contributor

Android Performance metrics 🚀

  Plain With Sentry Diff
Startup time 509.57 ms 553.94 ms 44.37 ms
Size 6.54 MiB 7.69 MiB 1.15 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
6ba4675 499.80 ms 632.43 ms 132.63 ms
2d34233 470.54 ms 558.90 ms 88.36 ms
93b7728 475.28 ms 489.13 ms 13.86 ms
827bf09 475.40 ms 547.14 ms 71.74 ms
b6c8720 457.41 ms 519.04 ms 61.63 ms
e2d675d 457.92 ms 529.17 ms 71.25 ms
dbd526b 504.88 ms 569.02 ms 64.15 ms
640ad0c 466.00 ms 552.67 ms 86.67 ms
c8596a6 474.00 ms 492.96 ms 18.96 ms
73dca78 476.53 ms 522.21 ms 45.68 ms

App size

Revision Plain With Sentry Diff
6ba4675 6.54 MiB 7.53 MiB 1015.26 KiB
2d34233 6.54 MiB 7.55 MiB 1.01 MiB
93b7728 6.54 MiB 7.69 MiB 1.15 MiB
827bf09 6.54 MiB 7.53 MiB 1015.27 KiB
b6c8720 6.54 MiB 7.69 MiB 1.15 MiB
e2d675d 6.54 MiB 7.69 MiB 1.15 MiB
dbd526b 6.54 MiB 7.69 MiB 1.15 MiB
640ad0c 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

Previous results on branch: fix/span-ids-trace

Startup times

Revision Plain With Sentry Diff
7887d07 470.67 ms 548.98 ms 78.31 ms
6527881 444.98 ms 522.31 ms 77.33 ms
0adaa4e 489.91 ms 545.98 ms 56.06 ms

App size

Revision Plain With Sentry Diff
7887d07 6.54 MiB 7.69 MiB 1.15 MiB
6527881 6.54 MiB 7.69 MiB 1.15 MiB
0adaa4e 6.54 MiB 7.69 MiB 1.15 MiB

@buenaflor buenaflor merged commit 3e83702 into main Jul 11, 2025
163 checks passed
@buenaflor buenaflor deleted the fix/span-ids-trace branch July 11, 2025 10:56
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