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: Don't block on sending envelopes #546

Merged
merged 5 commits into from Feb 3, 2023
Merged

fix: Don't block on sending envelopes #546

merged 5 commits into from Feb 3, 2023

Conversation

loewenheim
Copy link
Contributor

Fixes #543.

I am unsure if there is anything better than eprintln we can do in the error case—would using e.g. the sentry_debug macro exacerbate the problem because it also tries to send on the same channel?

@loewenheim loewenheim self-assigned this Feb 3, 2023
@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #546 (110a37e) into master (3e7eec2) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #546      +/-   ##
==========================================
- Coverage   70.88%   70.87%   -0.02%     
==========================================
  Files          66       66              
  Lines        6623     6624       +1     
==========================================
  Hits         4695     4695              
- Misses       1928     1929       +1     

@@ -85,7 +85,12 @@ impl TransportThread {
}

pub fn send(&self, envelope: Envelope) {
let _ = self.sender.send(Task::SendEnvelope(envelope));
// Using send here would mean that when the channel fills up for whatever
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member

@Swatinem Swatinem left a comment

Choose a reason for hiding this comment

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

using sentry_debug is a better idea in that case I would say. It does need some locking to figure out is debug logging is enabled.

@loewenheim loewenheim enabled auto-merge (squash) February 3, 2023 13:18
@loewenheim loewenheim merged commit aa17af4 into master Feb 3, 2023
@loewenheim loewenheim deleted the fix/transport branch February 3, 2023 13:24
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.

sentry-tracing can significantly slow down instrumented code if the TransportThread can't keep up
3 participants