client_golang/prometheus/promhttp
Manuel Rüger f08b10c5bc
feat: Support zstd compression (#1496)
* feat: Support zstd encoding

This allows endpoints to respond with zstd compressed metric data, if
the requester supports it.

I have imported a content-encoding parser from
https://github.com/golang/gddo which is an archived repository to
support different content-encoding headers.

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Integrate review comments

* String typed enum

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Test with gzip compression

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Update prometheus/promhttp/http.go

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Reorder error handling

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Apply suggestions from code review

Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
Signed-off-by: Manuel Rüger <manuel@rueg.eu>

* Include review suggestions

Signed-off-by: Manuel Rüger <manuel@rueg.eu>

---------

Signed-off-by: Manuel Rüger <manuel@rueg.eu>
Co-authored-by: Bartlomiej Plotka <bwplotka@gmail.com>
2024-06-07 15:56:19 +01:00
..
delegator.go Implement Unwrap() for responseWriterDelegator (#1480) 2024-03-28 14:42:34 +01:00
delegator_test.go Implement Unwrap() for responseWriterDelegator (#1480) 2024-03-28 14:42:34 +01:00
http.go feat: Support zstd compression (#1496) 2024-06-07 15:56:19 +01:00
http_test.go feat: Support zstd compression (#1496) 2024-06-07 15:56:19 +01:00
instrument_client.go Revert "Remove unnecessary check if label is nil in observeWithExemplar (#1235)" 2023-05-03 09:41:26 +01:00
instrument_client_test.go Fix double-counting bug in promhttp.InstrumentRoundTripperCounter (#1118) 2022-08-22 08:28:46 +03:00
instrument_server.go Fix data-race in metric without code and method but with `WithLabelFromCtx` (#1318) 2023-08-01 17:11:17 +01:00
instrument_server_test.go Fix data-race in metric without code and method but with `WithLabelFromCtx` (#1318) 2023-08-01 17:11:17 +01:00
option.go Added clarification. 2023-05-03 09:41:34 +01:00
option_test.go Add possibility to dynamically get label values for http instrumentation (#1066) 2023-01-19 10:19:08 +00:00