Gauge `collect` function not working
See original GitHub issueI’m trying to use the async collect
function to asynchronously take a measurement.
In Typescript, the type is giving an error:
Argument of type '{ name: string; help: string; collect(): Promise<void>; }' is not assignable to parameter of type 'GaugeConfiguration<string>'.
Object literal may only specify known properties, and 'collect' does not exist in type 'GaugeConfiguration<string>'.
And if I ignore the error, it seems that the function is not getting called at all.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:13
Top Results From Across the Web
gauge.set_function() doesn't work in multiprocess mode #504
This doesn't work with gauge.set_function() which does not record its value. The provided function is just called during collection.
Read more >How and when to use a Prometheus gauge - Tom Gregory
Functions not relevant to gauges. Most Prometheus functions do work with gauges, but there are some important exceptions such as increase ...
Read more >How to use Micrometer Gauge the correct way? - Stack Overflow
You have couple solutions here: either build a Gauge using a builder and specifying the strongReference(true) or (better) make sure you hold ...
Read more >prometheus - Go Packages
A Collector manages the collection of a number of Metrics, but for convenience, a Metric can also “collect itself”. Note that Gauge, Counter ......
Read more >Metric types - Prometheus.io
Alerting based on metrics. Metric types. Counter; Gauge; Histogram; Summary. The Prometheus client libraries offer four core metric types. These are currently ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Any update?
Any updates on this issue now that the related issues are fixed?