sentry-rust
sentry-rust copied to clipboard
feat: allow tracking state across requests in `tokio_thread`
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
- Add GH Issue ID & Linear ID (if applicable)
- Add an entry to CHANGELOG.md, following the format of existing entries
- The PR title should use Conventional Commits style (
feat:,fix:,ref:,meta:, etc.) - Useful links for external contributors: Sentry SDK development docs, Discord community
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