Skip to content

Add a Pusher.PushWithTimeout method, resetting the context timeout - #2089

Open
jwreschnig-utiq wants to merge 1 commit into
prometheus:mainfrom
jwreschnig-utiq:push-timeout
Open

Add a Pusher.PushWithTimeout method, resetting the context timeout#2089
jwreschnig-utiq wants to merge 1 commit into
prometheus:mainfrom
jwreschnig-utiq:push-timeout

Conversation

@jwreschnig-utiq

Copy link
Copy Markdown

This is an issue I find myself correcting often during our internal code review.

When a job fails due to a higher-level context being canceled (for example, a global timeout) it is easy to reuse that context to push metrics, which fails immediately and metrics pertaining to the original failure will be lost. Use this method for an additional grace period beyond the original context's deadline.

@jwreschnig-utiq
jwreschnig-utiq force-pushed the push-timeout branch 2 times, most recently from a6003d1 to fb911d6 Compare August 14, 2026 14:44
When a job fails due to a higher-level context being canceled (for
example, a global timeout) it is easy to reuse that context to push
metrics, which fails immediately and metrics pertaining to the original
failure will be lost. Use this method for an additional grace period
beyond the original context's deadline.

Signed-off-by: Joe Wreschnig <joe.wreschnig@utiq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant