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

4.x Hikari CP connections creation metric units is ms, should be seconds #9290

Open
tjquinno opened this issue Sep 26, 2024 · 1 comment
Open
Labels
4.x Version 4.x bug Something isn't working DB client Helidon DB Client metrics P3 triage

Comments

@tjquinno
Copy link
Member

tjquinno commented Sep 26, 2024

Environment Details

  • Helidon Version: 4.x
  • Helidon SE or Helidon MP
  • JDK version:
  • OS:
  • Docker version (if applicable):

Problem Description

See #8422 (comment) filed by @hyder (copied below for convenience)

hikari units are in milliseconds:

# TYPE hikaricp_connections_creation_milliseconds summary
hikaricp_connections_creation_milliseconds{mp_scope="vendor",pool="cloudbank",quantile="0.5",} 608.0

This is probably coming from the hikari lib itself. Would it be possible to submit a PR to hikari so it also uses seconds?

@tjquinno tjquinno added bug Something isn't working metrics DB client Helidon DB Client 4.x Version 4.x triage labels Sep 26, 2024
@tjquinno
Copy link
Member Author

I suspect the HikariCP integration records various time values--connection creation among them--as milliseconds because that code uses MP metrics histograms to record the values and histograms accept updates of long or int.

One possibility could be to rewrite the Helidon MicroProfileMetricsTracker class in helidon-integrations-cdi-datasource-hikaricp to use the neutral Helidon SE metrics API, where updates can be applied to distribution summaries as double values.

In addition, to preserve the existing behavior we would probably need to add a config setting to control whether HikariCP-related times were recorded as ms or seconds.

@m0mus m0mus added the P3 label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.x Version 4.x bug Something isn't working DB client Helidon DB Client metrics P3 triage
Projects
Status: High priority
Development

No branches or pull requests

2 participants