Does Timer functionality exist in Prometheus.Client? #176
-
I'm migrating our applications from Prometheus-net to Prometheus.Client. I've been able to migrate all of the functionality we were using EXCEPT for the ITimer functionality. Here is a sample of our existing code (with Prometheus-net):
Does this functionality exist in Prometheus.Client or in an extension somewhere? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
We have similar functionality: ObserveDuration and ObserveDurationAsync extension methods that could be used for Histogram and Summary. For example:
The benefit of this approach - it's a determined moment of the observation (unlike nonintuitive at least for me observation in timer dispose). I hope this helps =) |
Beta Was this translation helpful? Give feedback.
We have similar functionality: ObserveDuration and ObserveDurationAsync extension methods that could be used for Histogram and Summary.
For example:
The benefit of this approach - it's a determined moment of the observation (unlike nonintuitive at least for me observation in timer dispose).
I hope this helps =)