sentry-rust icon indicating copy to clipboard operation
sentry-rust copied to clipboard

feat: allow tracking state across requests in `tokio_thread`

Open thomaseizinger opened this issue 3 weeks ago • 1 comments

Description

Due to limitations in how async blocks interact with closures, it is impossible to borrow something from outside of a closure into an async block. A custom transport implementation may want to track state for the lifetime of the thread, in addition to the rate limiter.

We make this possible by adding another state argument.

Issues

Related: #949

Reminders

thomaseizinger avatar Dec 09 '25 03:12 thomaseizinger

Codecov Report

:x: Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 73.79%. Comparing base (196501d) to head (72c06ad).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #950      +/-   ##
==========================================
- Coverage   73.81%   73.79%   -0.02%     
==========================================
  Files          64       64              
  Lines        7504     7507       +3     
==========================================
+ Hits         5539     5540       +1     
- Misses       1965     1967       +2     

codecov[bot] avatar Dec 09 '25 04:12 codecov[bot]