-
Notifications
You must be signed in to change notification settings - Fork 336
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
serve/rest: improve prometheus metrics encoding (#5143)
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 double-parsing an already valid UTF-8 string.
- Loading branch information
Showing
2 changed files
with
21 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters