feat(asyncpg): add capture_connection_cleanup option to silence pool cleanup spans#4373
feat(asyncpg): add capture_connection_cleanup option to silence pool cleanup spans#4373RiyaChaturvedi37 wants to merge 13 commits intoopen-telemetry:mainfrom
Conversation
…cleanup spans Closes open-telemetry#4264
5547d9b to
73f9258
Compare
|
Thank you for this @RiyaChaturvedi37 ! I have added some comments |
|
Note: The large diff (+2440/-2389) is due to Windows line ending (CRLF) differences in the existing file on my local machine. The actual code changes are minimal — only 3 files with the new feature, tests, and changelog entry. I apologize for the noise! |
tammy-baylis-swi
left a comment
There was a problem hiding this comment.
Thank you for fixes, lgtm! Just suggested a small docs update. The Maintainers will also have to review this.
Done! Added the clarifying comment as suggested. |
|
This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment. |
Closes #4264
Description
Adds a new
capture_connection_cleanupoption toAsyncPGInstrumentorto allow silencing connection cleanup spans when using a pool.
When using a connection pool, asyncpg executes cleanup statements after
each invocation:
These can pollute traces, especially for tasks that periodically query
the database. This option allows users to silence these spans.
Usage:
The option defaults to
Trueto maintain backward compatibility.Type of change