Open
Conversation
b133fd6 to
93db900
Compare
03b4c49 to
08697e5
Compare
|
d20984f to
dd39920
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Track and report discarded events per the client reports spec: - sample_rate: events dropped by sample rate - before_send: events, transactions, logs, and metrics dropped by before_send hooks - ratelimit_backoff: envelope items dropped by rate limiter - network_error: envelope items lost on send failure - send_error: envelope items rejected by the server (4xx/5xx) - queue_overflow: logs and metrics dropped when batcher is full Reports are opportunistically attached to outgoing envelopes. Opt-out via sentry_options_set_send_client_reports(). See https://develop.sentry.dev/sdk/telemetry/client-reports/
Subtract reported values instead of zeroing to preserve concurrent increments that happen between read and reset.
Use the item type string directly to determine the data category instead of going through the lossy RL category mapping.
The rate limiter is updated from the response headers before the status code is returned. Pass NULL to skip the stale rate limiter check since all items were already serialized and sent.
Split http_send_request so the rate limiter is updated after recording discards, not before. This ensures items that were rate-limited during serialization are not also counted as send_error.
3a646a5 to
47ca4e4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Track and report discarded events per the client reports spec:
sample_rate: events dropped by the sample ratebefore_send: events, transactions, logs, and metrics dropped by before-send hooksratelimit_backoff: envelope items dropped by rate limiternetwork_error: envelope items lost on send failuresend_error: envelope items rejected by the server (4xx/5xx)queue_overflow: logs and metrics dropped when the batcher is fullReports are opportunistically attached to outgoing envelopes. Opt-out via
sentry_options_set_send_client_reports().Close: #1216