vectordotdev/vector

prometheus_exporter does not support Content-Encoding

Open

#19,962 建立於 2024年2月27日

在 GitHub 查看
 (8 留言) (1 反應) (0 負責人)Rust (21,837 star) (2,126 fork)batch import
good first issuesink: prometheus_exportertype: feature

描述

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Use Cases

Vector's prometheus_exporter does not appear to support gzip content-encoding:

$ curl -v --compressed http://localhost:9598/metrics
*   Trying [::1]:9598...
* Connected to localhost (::1) port 9598
> GET /metrics HTTP/1.1
> Host: localhost:9598
> User-Agent: curl/8.4.0
> Accept: */*
> Accept-Encoding: deflate, gzip, br, zstd
>
< HTTP/1.1 200 OK
< content-type: text/plain; version=0.0.4
< content-length: 103854
< date: Tue, 27 Feb 2024 20:42:05 GMT
<
# HELP vector_adaptive_concurrency_averaged_rtt adaptive_concurrency_averaged_rtt
...

Whereas other Promtheus exporters such as node_exporter automagically do this:

$ curl -I --compressed -v http://localhost:9100/metrics
*   Trying [::1]:9100...
* Connected to localhost (::1) port 9100
> HEAD /metrics HTTP/1.1
> Host: localhost:9100
> User-Agent: curl/8.4.0
> Accept: */*
> Accept-Encoding: deflate, gzip, br, zstd
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Content-Encoding: gzip
Content-Encoding: gzip
< Content-Type: text/plain; version=0.0.4; charset=utf-8
Content-Type: text/plain; version=0.0.4; charset=utf-8
< Date: Tue, 27 Feb 2024 20:43:28 GMT
Date: Tue, 27 Feb 2024 20:43:28 GMT

I have many metrics on the same key / labels - so would be beneficial to have this compressed at the network-layer.

Attempted Solutions

No response

Proposal

No response

References

No response

Version

0.34.1

貢獻者指南

prometheus_exporter does not support Content-Encoding · vectordotdev/vector#19962 | Good First Issue