Closed cyril-s closed 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.
@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.
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?
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.
Make output more human readable by sorting metrics by name after TextToMetricFamilies of prometheus TextParses scrambles them