getsentry / getsentry/sentry-ruby

Expose on_rate_limit as part of the transport contract

Đang mở
#2,239 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@sl0thentr0py đang làm issue này rồi.

Từ ngày 31/1/2024.

Client Reports Improvement Ruby
Ngôn ngữ chính
Ruby
Star
988
Fork
542
Merge trung bình
17 giờ 40 phút
Pull request đã merge (30 ngày)
19

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.