Emit spans which show exponential backoff delay and jitter #84
lopopolo-openai
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
I'm not 100% positive on what you mean by that, but what is missing from https://stamina.hynek.me/en/stable/api.html#stamina.instrumentation.RetryDetails to implement a retry hook? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a function that internally uses
stamina.retry_context
to retry a cross service network call. We use tracing on these requests to allow perf debugging. I've attached below the spans that get emitted by this code. I am fairly certain the gaps between the spans here at least in part are windows where stamina is doing exponential backoff and jitter between the retries, but I am not sure if there is other stuff going on in there too.Would it be possible to take a callback or something that can be used to get stamina to emit spans for the relevant delays in the retry cycle? It would be excellent if these spans included info about the amount of backoff and jitter, and what the next attempt number will be.
Beta Was this translation helpful? Give feedback.
All reactions