Skip to content

How to disable metrics export at runtime after a fork? #4204

Answered by lzchen
llacroix asked this question in Q&A
Discussion options

You must be logged in to vote

You could possibly write a custom exporter to filter out metrics and ignore certain metrics based off of current process id to replicate a similar behavior (if you are only interested in not having these metrics be exported). If you don't want your metrics to be collected AT ALL in the new process you would have to do some hacky stuff and clear out the metrics fields yourself using the private fields (which we do not recommend, and is not supported).

Replies: 1 comment 1 reply

Comment options

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

Answer selected by llacroix
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