Skip to content

How to refresh some metrics before responding to a metrics call #802

Answered by csmarchbanks
jooola asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, you will want to use a custom collector for this use case. The collect method will only be ran when your metrics are scraped and you will be sure to have up to date values and no need for a background thread.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jooola
Comment options

Answer selected by jooola
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants