getsentry / getsentry/sentry-ruby

Expose on_rate_limit as part of the transport contract

Offen
#2,239 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @sl0thentr0py Auf GitHub ansehen
Client Reports Improvement Ruby
Vorherrschende Sprache
Ruby
Sterne
987
Forks
541
Ø Merge
17 Std. 40 Min.
Gemergte PRs (30 T.)
19

Beschreibung

I see, thanks for the explanation of your use case.
So a few points

* we never do a retry ever on our side, a dropped event is a dropped event
* the server's rate limiting is merely interpreted as 'stop doing stuff for a while'
* technically it is breaking yes, but this is considered internal to the http transport implementation and not really part of the API contract

That said, there are a couple of options for you now
* make your own transport deriving from `Sentry::HTTPTransport` and override `send_data` there and do what you wish there
* I can expose a `on_rate_limit` hook in the transport class similar to `on_error` to make that easier so you just need to define that one method to retry

does that work?

_Originally posted by @sl0thentr0py in https://github.com/getsentry/sentry-ruby/pull/2216#discussion_r1472958970_

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.