jenningsloy318 / redfish_exporter

exporter to get metrics from redfish based hardware such as lenovo/dell/superc servers
Apache License 2.0
70 stars 61 forks source link

fix: collector_duration_seconds metric #46

Closed arnaldomf closed 2 years ago

arnaldomf commented 2 years ago

This PR fixes the collector_duration_seconds metric measurement.

In the original code, the metric value is calculated right after the collector's goroutines started, as the wg.Wait happens only after RedfishCollector.Collect returns. So the collector_duration_seconds's value was always in the order of milliseconds, even though the goroutines took 10's of seconds to return.