-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change the Accept header sent to the exporters
Create a new version of the API endpoint (`/v2`). This new version change the `Accept` HTTP header sent to the exporters requested (from `application/openmetrics-text` … to `text/plain`) because the Go library we use does not seems to support all OpenMetrics specificities ^1. The requests sent to the exporters contains a new HTTP header `X-Promfetcher-API-version` with the Promfetchers API version. ^1: Java actuator does respect the OpenMetrics specifications; the double quotes in the comments is not supported for example: > # HELP process_cpu_usage The \"recent cpu usage\" for the Java Virtual Machine process See also: [1]: prometheus/client_golang#829 (comment) [2]: prometheus/common#214
- Loading branch information
1 parent
de8eb40
commit 82206db
Showing
4 changed files
with
47 additions
and
8 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package models | ||
|
||
//XPromfetcherApiVersion name of the HTTP header corresponding to the Promfetcher API version | ||
const XPromfetcherApiVersion = `X-Promfetcher-API-version` |
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