stamina 23.2.0 #39
hynek
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Highlights
The highlight of this release are without question configurable retry hooks! You can now freely configure functions that are run whenever a retry is scheduled.
Can't wait to see what kind of third-party integrations y'all come up with – please show and tell us!
As a bonus, stamina now also comes with standard library's
logging
instrumentation out of the box.Full Changelog
Added
Instrumentation is now pluggable! You can define your own hooks that are run with retry details whenever a retry is scheduled. The documentation now has a whole chapter on instrumentation. #37
If structlog is not installed, the scheduled retry is now logged using the standard library
logging
module by default. #35Changed
Tenacity's internal
AttemptManager
object is no longer exposed to the user. This was an oversight and never documented.stamina.retry_context()
now yields instances ofstamina.Attempt
. #22Initialization of instrumentation is now delayed. This means that if there's no retries, there's no startup overhead from importing structlog and prometheus-client. #34
Some key names in structlog log messages have been renamed to better reflect their meaning (
slept
→waited_so_far
,attempt
→retry_num
, anderror
→caused_by
). You can rename them back using structlog'sstructlog.processors.EventRenamer
. #35Beta Was this translation helpful? Give feedback.
All reactions