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: GCP flush before error thrown. #1249

Merged
merged 2 commits into from
Oct 11, 2021
Merged

Fix: GCP flush before error thrown. #1249

merged 2 commits into from
Oct 11, 2021

Conversation

lucas-zimerman
Copy link
Collaborator

This adds a new flush method called FlushBeforeRequestCompleted, instead of flushing after the request is sent like in FlushOnCompletedRequest, this flag sends the envelopes before sending the response to the user.

It's a required flow for some serverless/Faas platforms that will kill the process after flushing the HttpResponse to the receiver.

I made it internal for now and ideally in the future we could have a simple enum that will set the flush type (none, on completed, before completed).

Close #1213

@lucas-zimerman lucas-zimerman added the Bug Something isn't working label Oct 8, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2021

Codecov Report

Merging #1249 (e32e05e) into main (6f14500) will decrease coverage by 1.28%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1249      +/-   ##
==========================================
- Coverage   80.61%   79.33%   -1.29%     
==========================================
  Files         212      212              
  Lines        6913     6920       +7     
  Branches     1591     1596       +5     
==========================================
- Hits         5573     5490      -83     
- Misses        809      911     +102     
+ Partials      531      519      -12     
Impacted Files Coverage Δ
src/Sentry.AspNetCore/SentryAspNetCoreOptions.cs 100.00% <100.00%> (ø)
src/Sentry.AspNetCore/SentryMiddleware.cs 98.68% <100.00%> (+0.11%) ⬆️
src/Sentry.Google.Cloud.Functions/SentryStartup.cs 100.00% <100.00%> (ø)
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 5 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 6f14500...e32e05e. Read the comment docs.

@lucas-zimerman lucas-zimerman merged commit abd6dc3 into main Oct 11, 2021
@lucas-zimerman lucas-zimerman deleted the fix/gcp-flush branch October 11, 2021 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Google Cloud Functions: Envelopes are not being sent to Sentry
3 participants