Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Metric type in prompb #5351

Open
Pryz opened this Issue Mar 13, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@Pryz
Copy link

Pryz commented Mar 13, 2019

Would it be possible to add the type of the metrics in the prompb proto ? Right now there is no way for a remote service to know if the forwarded metrics are counters or gauges for instance.

I was looking at implementing a remote storage (write only currently but will consider a read handler if the write one is working as expected) to forward Prometheus metrics to statsd-like systems. However, since the prompb proto is not exposing the type of the metrics, it makes the translating job quite complicated.

The best would be the have the TYPE and HELP in prompb (https://godoc.org/github.com/prometheus/client_model/go#MetricFamily).

Thanks !

@Pryz

This comment has been minimized.

Copy link
Author

Pryz commented Mar 13, 2019

After chatting on #prometheus, seems like the current way is to call the target metadata api (https://github.com/prometheus/prometheus/blob/master/docs/querying/api.md#querying-target-metadata) to get the information about the metric.

@brian-brazil

This comment has been minimized.

Copy link
Member

brian-brazil commented Mar 13, 2019

That'd be quite involved, as we'd need to store it in the TSDB first and this isn't time series data. I'd suggest working with the Prometheus text format directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.