You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If you want to create an exporter that rely on a long running command to create a metric it can happen that a scrape from prometheus runs into a timeout.
Describe the solution you'd like
A good solution can be that we use a cache for such commands. So the following will happen:
prometheus will scrape a metric
exporter will start the long running command (asynchronous, in background sth. else)
exporter will deliver a default value until the command does not fill up the cache with a real value (e.g. a negativ value or status unknown)
the command runs in background and the collected value will stored in cache once it has finished
prometheus will scrape again and get the cached value
the exporter check if there is already a background command running. If there is already a command running it won't start a new one. If there is no background job running it starts the command
the cache will always updated if there is no command running
Describe alternatives you've considered
Trying to work with asyncio already in combination with async_lru(see #41) but this does not really work because the long running command will still block the exporter. The command will not really do stuff in background.
Additional context
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
If you want to create an exporter that rely on a long running command to create a metric it can happen that a scrape from prometheus runs into a timeout.
Describe the solution you'd like
A good solution can be that we use a cache for such commands. So the following will happen:
Describe alternatives you've considered
Trying to work with
asyncio
already in combination withasync_lru
(see #41) but this does not really work because the long running command will still block the exporter. The command will not really do stuff in background.Additional context
The text was updated successfully, but these errors were encountered: