chore: add "http.server.requests" metric#11
Conversation
This commit adds a new metric to test UTF-8 metrics with Prometheus.
Example
```
$ curl -H "Accept: text/plain;version=1.0.0;escaping=allow-utf-8" localhost:8080/metrics
(following the OpenTelemetry semantic conventions)
{"http.server.requests","http.request.method"="get"} 171
{"http.server.requests","http.request.method"="post"} 167
...
```
machine424
left a comment
There was a problem hiding this comment.
It’s a good idea to include this as part of the same app.
LGTM
IIUC, we can only make use of this in e2e and docs once the stack fully supports utf-8?
We can (should be able to) use it now to ensure that Prometheus translates utf-8 strings to their legacy form (e.g. replacing invalid chars by |
AFAIK, the schemes only control what Prometheus will ask for via the |
|
Yes sorry for the misunderstanding on my side! What I wanted to say is that we can merge it now because it shouldn't break any test and it will help us validating proper utf-8 support once available in the stack. |
|
TIL, the golang client is able to format metrics based on the content https://github.com/prometheus/client_golang/blob/c316de06dea0caf0631f9eca944bc74cca1eb19c/prometheus/promhttp/http.go#L217-L221 |
This commit adds a new metric to test UTF-8 metrics with Prometheus.
Example