Skip to content

Exclude heartbeat test connection from application metrics, pool listener and captureStackTrace#152

Merged
rbygrave merged 2 commits into
mainfrom
feature/metrics-exclude-testConnection
Jun 30, 2026
Merged

Exclude heartbeat test connection from application metrics, pool listener and captureStackTrace#152
rbygrave merged 2 commits into
mainfrom
feature/metrics-exclude-testConnection

Conversation

@rob-bygrave

Copy link
Copy Markdown
Collaborator

No description provided.

 Follow-up to excluding the heartbeat test connection from the pool usage metrics. The periodic heartbeat validation borrows a real pooled
 connection, which also fired the DataSourcePoolListener borrow/return
 callbacks and triggered captureStackTrace - neither of which represent
 application use of the pool.

 Mark the connection borrowed for heartbeat validation via a heartbeat
 flag on PooledConnection. getPooledConnection(true) then skips
 captureStackTrace and onAfterBorrowConnection, and returnTheConnection
 skips onBeforeReturnConnection, keeping the listener borrow/return
 callbacks symmetric and limited to application use.
@rbygrave rbygrave self-assigned this Jun 30, 2026
@rbygrave rbygrave merged commit bc4f8b5 into main Jun 30, 2026
2 checks passed
@rbygrave rbygrave deleted the feature/metrics-exclude-testConnection branch June 30, 2026 23:22
@rob-bygrave rob-bygrave added this to the 10.10 milestone Jul 1, 2026
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

Successfully merging this pull request may close these issues.

2 participants