Skip to content

change the Accept header sent to the exporters#41

Merged
gmllt merged 3 commits intomasterfrom
rda
Jan 12, 2023
Merged

change the Accept header sent to the exporters#41
gmllt merged 3 commits intomasterfrom
rda

Conversation

@romain-dartigues
Copy link
Copy Markdown
Contributor

@romain-dartigues romain-dartigues commented Dec 15, 2022

change the Accept header sent to the exporters

Create a new version of the API endpoint (/v2) and deprecate /v1.
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

Romain Dartigues added 2 commits December 15, 2022 15:43
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
  - v1: `application/openmetrics-text; version=0.0.1,text/plain;version=0.0.4;q=0.5,*/*;q=0.1`
  - v2: `text/plain; version=0.0.4; charset=utf-8`
@gmllt gmllt merged commit bbc8a4d into master Jan 12, 2023
@romain-dartigues romain-dartigues deleted the rda branch March 17, 2024 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants