quickwit-oss / quickwit

Cloud-native search engine for observability. An open-source alternative to Datadog, Elasticsearch, Loki, and Tempo.
https://quickwit.io
Other
6.99k stars 291 forks source link

serve/rest: improve prometheus metrics encoding #5143

Closed lucab closed 1 week ago

lucab commented 2 weeks ago

This tweaks the logic behind the /metrics endpoint in order to properly log encoding errors. It also switches the existing code to use a pre-allocated String buffer, skipping some small reallocations while encoding and avoiding parsing already valid UTF-8 content.