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
This is supported in prometheus/metric.go, using the function NewMetricWithTimestamp. But, is does not seem to be supported by this repo, i.e. there is no NewMetricWithTimestamp() in sql_exporter/metric.co. Also, the metric definitions are a bit different between these two libraries. So, it is not trivial to call the existing function with an sql_exporter/metric.
I found it was more straightforward to create a similar struct and function in sql_exporter/metric.go.
I haven't tested it yet with Prometheus, but, I'm wondering if it will work? Any tips or advice about using custom timestamps for Prometheus with this library? The change mirrors the existing function. But, my main question is how it will be handled by Prometheus. Kind of a newb, so I'm not really sure even why the metric definitions are so different between the libraries. (yet both appear to work with Prometheus)
And also, after I add the timestamp, how can I display it locally in the localhost:9399/metrics?
The text was updated successfully, but these errors were encountered:
I'm interested in using custom timestamps, as discussed here:
https://stackoverflow.com/questions/65610580/how-can-we-add-our-own-timestamp-in-prometheus-metric-series
This is supported in prometheus/metric.go, using the function NewMetricWithTimestamp. But, is does not seem to be supported by this repo, i.e. there is no NewMetricWithTimestamp() in sql_exporter/metric.co. Also, the metric definitions are a bit different between these two libraries. So, it is not trivial to call the existing function with an sql_exporter/metric.
I found it was more straightforward to create a similar struct and function in sql_exporter/metric.go.
I haven't tested it yet with Prometheus, but, I'm wondering if it will work? Any tips or advice about using custom timestamps for Prometheus with this library? The change mirrors the existing function. But, my main question is how it will be handled by Prometheus. Kind of a newb, so I'm not really sure even why the metric definitions are so different between the libraries. (yet both appear to work with Prometheus)
And also, after I add the timestamp, how can I display it locally in the localhost:9399/metrics?
The text was updated successfully, but these errors were encountered: