[jboss-jira] [JBoss JIRA] (WFLY-11394) Wrong units of jvm.uptime metric - milliseconds vs. seconds

Jeff Mesnil (Jira) issues at jboss.org
Thu Nov 22 09:01:00 EST 2018


     [ https://issues.jboss.org/browse/WFLY-11394?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Mesnil resolved WFLY-11394.
--------------------------------
    Resolution: Won't Fix


I agree, the unit of the metrics is handled differently by the MP Metrics endpoints.

The JSON format returns the "raw" value and leaves to the client to find the unit by looking at the metrics metadata with the OPTIONS HTTP method.
Prometheus format returns the "base" value (eg seconds for time units) and appends the unit to the metric name.

> Wrong units of jvm.uptime metric - milliseconds vs. seconds
> -----------------------------------------------------------
>
>                 Key: WFLY-11394
>                 URL: https://issues.jboss.org/browse/WFLY-11394
>             Project: WildFly
>          Issue Type: Bug
>          Components: MP Metrics
>            Reporter: Rostislav Svoboda
>            Assignee: Jeff Mesnil
>            Priority: Major
>
> Wrong units of jvm.uptime metric - milliseconds vs. seconds
> {code}
> curl -H "Accept: application/json" -X OPTIONS http://localhost:9990/metrics/base/jvm.uptime
> {
>     "jvm.uptime": {
>         "unit": "milliseconds",
>         "type": "gauge",
>         "description": "Displays the start time of the Java virtual machine in milliseconds. This attribute displays the approximate time when the Java virtual machine started.",
>         "displayName": "JVM Uptime",
>         "tags": ""
>     }
> {code}
> This metric reports results in seconds, not in milliseconds as description says.
> {code}
> curl http://localhost:9990/metrics/base/jvm.uptime
> # HELP base:jvm_uptime_seconds Displays the start time of the Java virtual machine in milliseconds. This attribute displays the approximate time when the Java virtual machine started.
> # TYPE base:jvm_uptime_seconds gauge
> base:jvm_uptime_seconds 2011.875
> {code}



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list