Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrometheusExporter for MP metrics conversion error #2838

Closed
larslorenzen opened this issue Jun 13, 2018 · 0 comments
Closed

PrometheusExporter for MP metrics conversion error #2838

larslorenzen opened this issue Jun 13, 2018 · 0 comments

Comments

@larslorenzen
Copy link

Description


When exporting metrics of a rest method annotated with @Timed, some of the values are zero because of a conversion bug.

These conversion values:

    private static final double NANOSECOND_CONVERSION = 1 / 1_000_000_000;
    private static final double MICROSECOND_CONVERSION = 1 / 1_000_000;
    private static final double MILLISECOND_CONVERSION = 1 / 1_000;

all convert to zero and therefore @Timed quantiles are 0.
The conversion to double is done after the integer division so all 3 conversion values are 0.0d.

Expected Outcome

Correct conversion is done for the timer metrics samples exported in prometheus format.

Current Outcome

All reported quantiles are 0.

Steps to reproduce (Only for bug reports)

Create a rest resource with a @Timed annotated method and call that method a few times.
Then observe /metrics in prometheus format.

Samples

application:de_llorenzen_resource_accept_seconds{quantile="0.5"} 0.0
application:de_llorenzen_resource_accept_seconds{quantile="0.75"} 0.0
application:de_llorenzen_resource_accept_seconds{quantile="0.95"} 0.0
application:de_llorenzen_resource_accept_seconds{quantile="0.98"} 0.0
application:de_llorenzen_resource_accept_seconds{quantile="0.99"} 0.0
application:de_llorenzen_resource_accept_seconds{quantile="0.999"} 0.0

Context (Optional)

fish.payara.microprofile.metrics.writer.PrometheusExporter

Environment

  • Payara Version: 5.181, 5.182
  • Edition: All
  • JDK Version: 8 Oracle
  • Operating System: Linux / Mac
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

No branches or pull requests

1 participant