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: Move header reference out of extern C #3538

Merged
merged 18 commits into from Jan 29, 2024
Merged

fix: Move header reference out of extern C #3538

merged 18 commits into from Jan 29, 2024

Conversation

brustolin
Copy link
Contributor

@brustolin brustolin commented Jan 4, 2024

📜 Description

Removing header references from extern C because they are causing compile errors with Android Studio and flutter.

💡 Motivation and Context

close getsentry/sentry-dart#1781

💚 How did you test it?

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • 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.
  • 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.

🔮 Next steps

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (50bb751) 89.224% compared to head (d18153a) 89.246%.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3538       +/-   ##
=============================================
+ Coverage   89.224%   89.246%   +0.021%     
=============================================
  Files          529       529               
  Lines        57697     57710       +13     
  Branches     20642     20647        +5     
=============================================
+ Hits         51480     51504       +24     
+ Misses        5306      5289       -17     
- Partials       911       917        +6     
Files Coverage Δ
...yCrash/Recording/Tools/SentryCrashMachineContext.h 100.000% <ø> (ø)
...ntryCrash/Recording/Tools/SentryCrashStackCursor.h 100.000% <ø> (ø)

... and 17 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 50bb751...d18153a. Read the comment docs.

Copy link

github-actions bot commented Jan 4, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1293.52 ms 1327.94 ms 34.42 ms
Size 21.58 KiB 417.85 KiB 396.27 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
e324230 1244.43 ms 1252.98 ms 8.55 ms
d760c3f 1200.95 ms 1233.96 ms 33.00 ms
5d6ce0e 1227.57 ms 1241.08 ms 13.51 ms
7cd187e 1223.41 ms 1249.40 ms 26.00 ms
407ff99 1216.63 ms 1235.50 ms 18.87 ms
dc0db9e 1246.06 ms 1260.46 ms 14.40 ms
881a955 1230.98 ms 1246.22 ms 15.24 ms
98cca71 1210.75 ms 1240.64 ms 29.89 ms
9faf217 1268.86 ms 1274.82 ms 5.96 ms
e1eed6b 1224.63 ms 1234.84 ms 10.20 ms

App size

Revision Plain With Sentry Diff
e324230 22.85 KiB 408.88 KiB 386.03 KiB
d760c3f 22.84 KiB 403.17 KiB 380.33 KiB
5d6ce0e 22.85 KiB 405.38 KiB 382.53 KiB
7cd187e 20.76 KiB 401.66 KiB 380.89 KiB
407ff99 20.76 KiB 427.87 KiB 407.10 KiB
dc0db9e 20.76 KiB 419.62 KiB 398.86 KiB
881a955 22.85 KiB 407.63 KiB 384.79 KiB
98cca71 22.85 KiB 411.14 KiB 388.29 KiB
9faf217 20.76 KiB 419.70 KiB 398.94 KiB
e1eed6b 20.76 KiB 432.17 KiB 411.41 KiB

Previous results on branch: fix/c-extern

Startup times

Revision Plain With Sentry Diff
0d66751 1227.15 ms 1243.82 ms 16.66 ms
6caebaa 1228.79 ms 1242.29 ms 13.50 ms

App size

Revision Plain With Sentry Diff
0d66751 21.58 KiB 417.86 KiB 396.28 KiB
6caebaa 21.58 KiB 418.70 KiB 397.12 KiB

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

Can we add something in CI that prevents that mistake in the future? What else is missing so we can merge this @brustolin?

@brustolin
Copy link
Contributor Author

Can we add something in CI that prevents that mistake in the future? What else is missing so we can merge this @brustolin?

This is kind of a shot in the dark. Everything I read about it says it's okay (or we should) to move the includes out of extern C. CI is not complaining about it, and other tests where I forced the file to use a C++ compiler were okay. But I could not reproduce the error before the changes.

I'm waiting for the user to test this branch; I sent them instructions in the original issue.

@kahest
Copy link
Member

kahest commented Jan 9, 2024

The user in getsentry/sentry-dart#1781 (comment) reported that this fixed their issue

philipphofmann and others added 15 commits January 10, 2024 11:25
Make the option enablePreWarmedAppStartTracing stable.
Cancel in progress workflow runs when pushing new commits to a PR
to save CI computing time.

Fixes GH-3213
Split the UIKit and Application Init span into one span for UIKit Init
and another for Application Init. The UIKit Init span ends when the
users start the SentrySDK. We recommend that the SentrySDK is the first
to call in the UIApplication.didFinishLaunching method because
otherwise, users won't receive any potential crash reports for code
running before our SDK. Therefore, we pick the start time of our SDK as
when the UIApplicationDelegate.didFinishLaunching is called.

Fixes GH-3345
Set the up-tests environment when running UI tests in CI so that we can
apply filters in Sentry.
Send the complete list of debug meta for app start transactions so we
can calculate statistics on the number and size of libraries loaded on
the backend when the app starts.

Fixes GH-3541
Don't override sentry-trace and baggage headers in a http request.
Cross platform SDKs may set this headers and we're overriding it.
The teardown of the SentryFramesTracker didn't work properly in tests.
The clearTestState method continuously initialized a new frames tracker
cause it accessed the property dependency container. This is fixed now
by calling SentryFramesTracker.stop directly in
SentryDependencyContainer.reset which is also called in clearTestState.
Furthermore, the SentryFramesTracker.stop now resets all frames and
removes all observers.
* Remove dispatch queue metadata collection

* Hardcode "main" as the name of the main thread

* Format code

* Update CHANGELOG.md

* use thread wrapper main thread dispatch

---------

Co-authored-by: Sentry Github Bot <bot+github-bot@sentry.io>
Co-authored-by: Andrew McKnight <andrew.mcknight@sentry.io>
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM

@brustolin brustolin merged commit 008799d into main Jan 29, 2024
71 checks passed
@brustolin brustolin deleted the fix/c-extern branch January 29, 2024 07:42
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.

Cannot running with Android Studio IDE
7 participants