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

fix: Use the same SdkInfo for envelope header and event #4629

Merged
merged 12 commits into from
Dec 16, 2024

Conversation

krystofwoldrich
Copy link
Member

📜 Description

This PR unifies event body sdk info and envelope header sdk info.

💡 Motivation and Context

This can be used for better debugging when envelope is broken.

💚 How did you test it?

unit tests

📝 Checklist

You have to check all boxes before merging:

  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

@krystofwoldrich krystofwoldrich changed the base branch from main to kw/remove-integrations-from-extras December 12, 2024 21:17
Copy link

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySerialization.m

Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 98.00995% with 4 lines in your changes missing coverage. Please review.

Project coverage is 90.906%. Comparing base (419f1d4) to head (9c8e7f0).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ests/SentryTests/Protocol/SentrySdkInfo+Equality.m 60.000% 4 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4629       +/-   ##
=============================================
+ Coverage   90.890%   90.906%   +0.015%     
=============================================
  Files          618       618               
  Lines        71060     71148       +88     
  Branches     25947     25942        -5     
=============================================
+ Hits         64587     64678       +91     
+ Misses        6376      6373        -3     
  Partials        97        97               
Files with missing lines Coverage Δ
Sources/Sentry/SentryClient.m 98.670% <100.000%> (-0.027%) ⬇️
Sources/Sentry/SentryEnvelope.m 90.526% <100.000%> (-0.050%) ⬇️
Sources/Sentry/SentrySdkInfo.m 100.000% <100.000%> (+7.936%) ⬆️
Sources/Sentry/SentrySerialization.m 98.712% <100.000%> (-0.006%) ⬇️
...ts/SentryTests/Helper/SentryFileManagerTests.swift 99.513% <100.000%> (ø)
.../SentryTests/Helper/SentrySerializationTests.swift 99.797% <100.000%> (+0.003%) ⬆️
...ts/Networking/SentryNSURLRequestBuilderTests.swift 100.000% <100.000%> (ø)
...sts/SentryTests/Protocol/SentryEnvelopeTests.swift 96.072% <100.000%> (ø)
Tests/SentryTests/Protocol/SentrySdkInfoNilTests.m 100.000% <100.000%> (ø)
...ests/SentryTests/Protocol/SentrySdkInfoTests.swift 100.000% <100.000%> (+3.703%) ⬆️
... and 1 more

... and 13 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 419f1d4...9c8e7f0. Read the comment docs.

Copy link

github-actions bot commented Dec 12, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1222.04 ms 1255.24 ms 33.19 ms
Size 22.31 KiB 756.94 KiB 734.63 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
ad7cec6 1203.22 ms 1224.74 ms 21.52 ms
b35ccd0 1224.59 ms 1241.08 ms 16.49 ms
31ac438 1216.17 ms 1242.68 ms 26.51 ms
ecd9ecd 1191.76 ms 1216.92 ms 25.16 ms
a2af9fa 1236.62 ms 1253.12 ms 16.50 ms
8919322 1231.83 ms 1255.24 ms 23.41 ms
6d00d1b 1235.04 ms 1251.21 ms 16.17 ms
44ce888 1208.98 ms 1224.72 ms 15.74 ms
e778bd2 1224.66 ms 1252.16 ms 27.50 ms
50bb751 1234.10 ms 1248.29 ms 14.19 ms

App size

Revision Plain With Sentry Diff
ad7cec6 20.76 KiB 427.32 KiB 406.55 KiB
b35ccd0 21.58 KiB 573.14 KiB 551.56 KiB
31ac438 20.76 KiB 393.37 KiB 372.61 KiB
ecd9ecd 20.76 KiB 420.23 KiB 399.47 KiB
a2af9fa 20.76 KiB 432.87 KiB 412.11 KiB
8919322 22.84 KiB 403.18 KiB 380.34 KiB
6d00d1b 21.58 KiB 694.62 KiB 673.04 KiB
44ce888 22.85 KiB 414.65 KiB 391.80 KiB
e778bd2 20.76 KiB 426.15 KiB 405.39 KiB
50bb751 21.58 KiB 417.86 KiB 396.27 KiB

Previous results on branch: kw/fix-unify-sdk-info

Startup times

Revision Plain With Sentry Diff
a45f37b 1231.85 ms 1253.65 ms 21.80 ms
89fa296 1239.02 ms 1263.04 ms 24.02 ms
2896ddf 1229.35 ms 1260.76 ms 31.40 ms
00c9acf 1220.58 ms 1247.20 ms 26.62 ms

App size

Revision Plain With Sentry Diff
a45f37b 22.31 KiB 756.94 KiB 734.64 KiB
89fa296 22.31 KiB 756.69 KiB 734.38 KiB
2896ddf 22.31 KiB 756.96 KiB 734.65 KiB
00c9acf 22.31 KiB 756.68 KiB 734.38 KiB

Copy link

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySerialization.m

Copy link

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySerialization.m

@krystofwoldrich krystofwoldrich marked this pull request as draft December 13, 2024 09:20
brustolin
brustolin previously approved these changes Dec 13, 2024
Copy link
Contributor

@brustolin brustolin left a comment

Choose a reason for hiding this comment

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

LGTM

I have one comment that I will leave it at your discretion.

Sources/Sentry/SentrySdkInfo.m Outdated Show resolved Hide resolved
@brustolin brustolin dismissed their stale review December 13, 2024 09:31

I forgot it was a draft still

Base automatically changed from kw/remove-integrations-from-extras to main December 13, 2024 11:38
Copy link

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySerialization.m

Copy link

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySerialization.m

@krystofwoldrich
Copy link
Member Author

I've realized I missed deserialization. f9aa976

Now it's ready.

@krystofwoldrich krystofwoldrich marked this pull request as ready for review December 15, 2024 19:48
Copy link

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySerialization.m

Copy link

🚨 Detected changes in high risk code 🚨

High-risk code can easily blow up and is hard to test. We had severe bugs in the past. Be extra careful when changing these files, and have an extra careful look at these:

  • Sources/Sentry/SentrySerialization.m

@krystofwoldrich krystofwoldrich enabled auto-merge (squash) December 16, 2024 10:32
@krystofwoldrich krystofwoldrich merged commit 716a5b0 into main Dec 16, 2024
69 of 70 checks passed
@krystofwoldrich krystofwoldrich deleted the kw/fix-unify-sdk-info branch December 16, 2024 10:32
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