-
-
Notifications
You must be signed in to change notification settings - Fork 169
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: Lock global options whenever they are accessed #333
Conversation
Codecov Report
@@ Coverage Diff @@
## master #333 +/- ##
==========================================
+ Coverage 87.37% 87.66% +0.29%
==========================================
Files 49 49
Lines 4039 4045 +6
==========================================
+ Hits 3529 3546 +17
+ Misses 510 499 -11 |
644ba11
to
bdc0060
Compare
This also changes the DSN to a heap allocated, refcounted type since the http worker thread needs to hold onto its own reference.
5bf9697
to
7e81099
Compare
this now decouples preparing an event, which also removes the need for a special breakpad transport and mutating the global transport. Also the crashed session is now attached to the crashed envelope, and has a correct errors count options are now refcounted internally instead of taking locks for long times. the user consent is now done as an atomic operation.
After discussing this a little bit, I completely reworked this again. The only mutable access to options now is the user consent, which was changed to an atomic. Instead of swapping out transports, capturing an event was split up into preparing the event, and then capturing it with an explicit transport. This also gets rid of the special case breakpad transport because the minidump can now be attached directly to an envelope instead of making roundtrips via that special transport. While at it, inproc/breakpad now only send a single envelope on crash, with the session in it, which also now has an error count that covers the crash itself. |
0fcd432
to
c375f0b
Compare
Wraps all accesses of the global objects object in a lock. This also changes the DSN to be a heap allocated and refcounted type, since the http workers need to separately own a reference.
fixes #280