Expose on_rate_limit as part of the transport contract

Aberta
#2,239 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 2 dias

@sl0thentr0py já está trabalhando nisso.

Desde 31/1/2024.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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

Linguagem predominante
Ruby
Estrelas
990
Forks
552
Merge médio
2d 16h
PRs com merge (30d)
29

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de getsentry/sentry-ruby

Todas as issues de getsentry/sentry-ruby

Issues semelhantes

Mais issues de Ruby

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.