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
This PR stops reporting datasource timeout configuration as metrics across the c3p0, DBCP and HikariCP plugins.
Previously, timeout-related values such as c3p0's maxIdleTime, DBCP's maxWaitMillis, and HikariCP's connectionTimeout, validationTimeout, idleTimeout and leakDetectionThreshold were exported as datasource gauges. These are static configuration values rather than runtime pool status, and mixing them into the datapool metrics — with units and scales that differ from connection counts — distorted line-chart visualization and made connection-related trends hard to interpret.
Removing them keeps the datasource metric family focused on real runtime pool state, so the remaining gauges share consistent semantics and the visualization is accurate and readable.
Thanks for the PR. The mixed-unit chart is a real problem, but I don't think a new metric is the right fix.
OAP's only MAL rule for this is meter-analyzer-config/datasource.yaml, and it reads just datasource (datasource.sum(['service', 'instance', 'name', 'status'])). Nothing consumes datasource_time, so the agent would keep collecting these four values and OAP would silently drop them. They'd never be stored or queryable.
connectionTimeout, validationTimeout, idleTimeout and leakDetectionThreshold are pool configuration, not runtime metrics. They're flat lines. HikariCP's own Micrometer tracker doesn't export them either.
So I'd suggest we stop collecting them instead of adding a new metric:
Remove the four timeout gauges from PoolingSealInterceptor. Keep minimumIdle and maximumPoolSize in datasource: they're counted in connections, and they serve as limit lines for the active/total connection counts.
Remove the four entries from hikaricp-scenario/config/expectedData.yaml, rather than renaming them.
Update the CHANGES.md line to say these config values are no longer reported.
No OAP MAL or UI changes are needed. The datasource rule sums over every status value, so it keeps working unchanged. The UI's datasource chart will then show only connection counts, which fixes the chart you showed.
For consistency, please do the same for dbcp's maxWaitMillis and c3p0's maxIdleTime, which are the same kind of time-based config in the same metric family. That means updating dbcp-2.x-scenario and both c3p0 scenarios. Either this PR or a follow-up works.
The runtime signals about connection timeouts are already covered:
threadsAwaitingConnection greater than 0 shows the pool is running out of connections.
An actual getConnection() timeout marks the HikariCP/Connection/getConnection span as an error, with the exception attached.
wuwen5
changed the title
Fix/hikaricp metric split
Stop reporting datasource timeout configuration as metrics
Sep 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CHANGESlog.This PR stops reporting datasource timeout configuration as metrics across the c3p0, DBCP and HikariCP plugins.
Previously, timeout-related values such as c3p0's maxIdleTime, DBCP's maxWaitMillis, and HikariCP's connectionTimeout, validationTimeout, idleTimeout and leakDetectionThreshold were exported as datasource gauges. These are static configuration values rather than runtime pool status, and mixing them into the datapool metrics — with units and scales that differ from connection counts — distorted line-chart visualization and made connection-related trends hard to interpret.
Removing them keeps the datasource metric family focused on real runtime pool state, so the remaining gauges share consistent semantics and the visualization is accurate and readable.
old

new
