ObservableGauge hardcoded to sample once per minute? #3422
-
This may not be strictly OpenTelemetry-DotNet related. I am not sure given that this and _meter.CreateObservableGauge("simulation_frames_per_second_gauge",
() => { return GetSimulationFramesPerSecond(serverShortName); },
description: "The number of server simulation frames per second"); However I cannot find any documentation nor any APIs that indicate that it is possible to set frequency with which the Gauge is sampled and it appears to be hardcoded to once per minute only. Am I missing something or is it not possible to set the frequency with which an |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Observable instrument callbacks are performed along with collection. If the collection (or exporter) interval is 30 secs, then Observable instrument callbacks are performed every 30 secs. So depending on the exporter you use, you can control the export internal, and hence call back frequency. For pullbased (Prometheus), callbacks occur only when the scrape request comes. (There is no ability to have different frequencies for Observable instrument callback invocation and Exporting. This was discussed in the spec, but was decided to be not included in initial version.) |
Beta Was this translation helpful? Give feedback.
Observable instrument callbacks are performed along with collection. If the collection (or exporter) interval is 30 secs, then Observable instrument callbacks are performed every 30 secs. So depending on the exporter you use, you can control the export internal, and hence call back frequency.
For pullbased (Prometheus), callbacks occur only when the scrape request comes.
(There is no ability to have different frequencies for Observable instrument callback invocation and Exporting. This was discussed in the spec, but was decided to be not included in initial version.)