Expose on_rate_limit as part of the transport contract

Abierto
#2,239 0 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 2 días

@sl0thentr0py ya está trabajando en esto.

Desde el 31/1/2024.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

Client Reports Improvement Ruby

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

Lenguaje dominante
Ruby
Estrellas
990
Forks
552
Merge medio
2 d 16 h
PR fusionados (30 d)
29

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de getsentry/sentry-ruby

Todos los issues de getsentry/sentry-ruby

Issues similares

Más issues de Ruby

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.