You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl http://localhost:8080/metrics returns JSON, I had to call curl -H "Accept: text/plain" http://localhost:8080/metrics to get Prometheus format
MP Metrics 1.1 spec says Prometheus text format - default response format when the HTTP Accept header does not match any more specific media type like application/json.
Se section 2.3. Exposing metrics via REST API of the spec
Helidon Version: 0.10.4
Helidon MP
JDK version: 1.8.0_171
OS: macOS Mojave
$ curl -v http://localhost:8080/metrics
* Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8080 (#0)
> GET /metrics HTTP/1.1
> Host: localhost:8080
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: application/json
< Date: Wed, 24 Oct 2018 10:11:38 +0200
< transfer-encoding: chunked
< connection: keep-alive
<
* Connection #0 to host localhost left intact
{"base":{"classloader.totalLoadedClass.count":6248,"cpu.systemLoadAverage":2.7119140625,"thread.count":19,"classloader.currentLoadedClass.count":6246,"jvm.uptime":75082,"gc.PS MarkSweep.count":1,"memory.committedHeap":211812352,"thread.max.count":26,"gc.PS Scavenge.count":4,"cpu.availableProcessors":8,"thread.daemon.count":14,"classloader.totalUnloadedClass.count":2,"memory.maxHeap":3817865216,"memory.usedHeap":66577096,"gc.PS MarkSweep.time":25,"gc.PS Scavenge.time":52},"vendor":{"requests.count":3,"requests.meter":{"count":3,"meanRate":0.0405695117705537,"oneMinRate":0.020664007757838578,"fiveMinRate":0.006037556417397182,"fifteenMinRate":0.0021495791878664424}}}
The text was updated successfully, but these errors were encountered:
MP metrics endpoint provides JSON output by default, Prometheus format should be the default
Using Helidon MP Example from https://helidon.io/docs/latest/#/getting-started/02_base-example
curl http://localhost:8080/metrics
returns JSON, I had to callcurl -H "Accept: text/plain" http://localhost:8080/metrics
to get Prometheus formatMP Metrics 1.1 spec says
Prometheus text format - default response format when the HTTP Accept header does not match any more specific media type like application/json.
Se section 2.3. Exposing metrics via REST API of the spec
The text was updated successfully, but these errors were encountered: