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: Keep events in case of nonserializable context #1401

Merged
merged 9 commits into from
Dec 19, 2021
Merged

Conversation

bitsandfoxes
Copy link
Contributor

No description provided.

Copy link
Member

@bruno-garcia bruno-garcia left a comment

Choose a reason for hiding this comment

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

Turns out the serializes does push data into the writer before it fails. So it can end up at a broken state when we handle the exception. Added some compensating code there to fix the JSON and some extra logging.

@bruno-garcia
Copy link
Member

Turns out what exception is thrown changed from netcore 2.1 and other targets.

@codecov-commenter
Copy link

codecov-commenter commented Dec 19, 2021

Codecov Report

Merging #1401 (4e7168b) into main (878bba7) will decrease coverage by 0.28%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1401      +/-   ##
==========================================
- Coverage   83.01%   82.72%   -0.29%     
==========================================
  Files         217      217              
  Lines        7295     7306      +11     
  Branches     1411     1415       +4     
==========================================
- Hits         6056     6044      -12     
- Misses        804      831      +27     
+ Partials      435      431       -4     
Impacted Files Coverage Δ
src/Sentry/Envelopes/EnvelopeItem.cs 93.07% <ø> (ø)
src/Sentry/Internal/Http/EnvelopeHttpContent.cs 75.00% <50.00%> (-25.00%) ⬇️
src/Sentry/Internal/Extensions/JsonExtensions.cs 84.04% <77.77%> (+5.70%) ⬆️
src/Sentry/PlatformAbstractions/FrameworkInfo.cs 0.00% <0.00%> (-100.00%) ⬇️
...ntry/PlatformAbstractions/RegistryKeyExtensions.cs 0.00% <0.00%> (-100.00%) ⬇️
...Sentry/PlatformAbstractions/FrameworkInfo.NetFx.cs 0.00% <0.00%> (-70.43%) ⬇️
...rmAbstractions/NetFxInstallationsEventProcessor.cs 4.54% <0.00%> (-68.19%) ⬇️
...ntry/PlatformAbstractions/FrameworkInstallation.cs 25.00% <0.00%> (-37.50%) ⬇️
...ntry/Integrations/NetFxInstallationsIntegration.cs 28.57% <0.00%> (-28.58%) ⬇️
src/Sentry/PlatformAbstractions/RuntimeInfo.cs 53.44% <0.00%> (-5.18%) ⬇️
... and 15 more

Continue to review full report at Codecov.

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

@bruno-garcia bruno-garcia merged commit 9f3770f into main Dec 19, 2021
@bruno-garcia bruno-garcia deleted the fix/keep-events branch December 19, 2021 21: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.

None yet

4 participants