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

remove confusing message Successfully sent cached envelope #1542

Merged

Conversation

SimonCropp
Copy link
Contributor

In the CachingTransport we have:

_options.LogDebug("Sending cached envelope: {0}", envelope.TryGetEventId());

await _innerTransport.SendEnvelopeAsync(envelope, cancellation).ConfigureAwait(false);

_options.LogDebug("Successfully sent cached envelope: {0}", envelope.TryGetEventId());

But inside the HttpTransport we have:

if (response.StatusCode != HttpStatusCode.OK)
{
    await HandleFailureAsync(response, processedEnvelope, cancellationToken).ConfigureAwait(false);
    return;
}

So for error response codes (eg bad payloads like #1523 ) it is swallowed.

so the diagnostic log says

Sending cached envelope: ...
Sentry rejected the envelope...
Successfully sent cached envelope...

IMO since HttpTransport does a Envelope '{0}' sent successfully on success. the CachingTransport Successfully sent is redundant on success, and misleading on failure.

@codecov-commenter
Copy link

codecov-commenter commented Mar 19, 2022

Codecov Report

Merging #1542 (1c816d4) into main (341087d) will decrease coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1542      +/-   ##
==========================================
- Coverage   84.32%   84.30%   -0.02%     
==========================================
  Files         219      219              
  Lines        7418     7417       -1     
  Branches     1418     1418              
==========================================
- Hits         6255     6253       -2     
  Misses        736      736              
- Partials      427      428       +1     
Impacted Files Coverage Δ
src/Sentry/Internal/Http/CachingTransport.cs 79.16% <ø> (-0.15%) ⬇️
src/Sentry/Exceptions/SentryStackFrame.cs 76.92% <0.00%> (-1.10%) ⬇️

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 341087d...1c816d4. Read the comment docs.

@SimonCropp SimonCropp merged commit 6268305 into main Mar 20, 2022
@SimonCropp SimonCropp deleted the remove-confusing-message-Successfully-sent-cached-envelope branch March 20, 2022 00:55
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.

3 participants