QubitProducts / exporter_exporter

A reverse proxy designed for Prometheus exporters
Apache License 2.0
336 stars 55 forks source link

sort proxied metrics #27

Closed cyril-s closed 4 years ago

cyril-s commented 4 years ago

Make output more human readable by sorting metrics by name after TextToMetricFamilies of prometheus TextParses scrambles them

tcolgate commented 4 years ago

This will not scale well for services with large numbers of metrics. If a human user wishes to see metrics in a sorted order, they an curl and pipe through sort.

dmitry-sinina commented 4 years ago

@tcolgate this PR is addressing issue when exporter_exporter changes order of metrics returned by "backend" exporter. This is not clean why proxy should parse "backend" exporter response and serialize it again especially from scalability point of view.

dmitry-sinina commented 4 years ago

There is no issue when backend listening https. Will it be better to make configuration parameter to allow raw proxying for http also, because currently we have different behavior for http and https?

tcolgate commented 4 years ago

The current logic is a bit odd, and I can't remeber the justification. It makes sense to allow raw proxying for non-https requests. The intent of parsing is to ensure we only send valid metrics back to prometheus I think that's still reasonable, but it is equally reaonable to disable it.