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

Prometheus/OpenMetrics output for timer is incorrectly scaled when non-default units specified in metadata #4237

Closed
tjquinno opened this issue May 18, 2022 · 0 comments
Assignees
Labels
2.x Issues for 2.x version branch 3.x Issues for 3.x version branch bug Something isn't working metrics P2
Milestone

Comments

@tjquinno
Copy link
Member

Environment Details

  • Helidon Version: 2.4.2, 2.5.0
  • Helidon SE or Helidon MP MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

The values for a timer reported in Prometheus format are incorrect when the timer metadata specifies units of seconds. The reported are off by several powers of 10.

Steps to reproduce

  1. Create a new MP QuickStart app. Add this to the GreetResource#getDefaultMessage method:
    @Timed(name = "gets", absolute = true, unit = MetricUnits.SECONDS)
  2. Build and run.
  3. curl http://localhost:8080/greet
  4. curl -H "Accept: application/json" http://localhost:8080/metrics/application | jq
    Notice the very small values reported.
  5. curl http://localhost:8080/metrics/application
    Notice the much larger values reported.
@tjquinno tjquinno added bug Something isn't working metrics P2 2.x Issues for 2.x version branch 3.x Issues for 3.x version branch labels May 18, 2022
@tjquinno tjquinno added this to the 2.5.1 milestone May 18, 2022
@tjquinno tjquinno self-assigned this May 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.x Issues for 2.x version branch 3.x Issues for 3.x version branch bug Something isn't working metrics P2
Projects
Archived in project
Development

No branches or pull requests

1 participant