-
Notifications
You must be signed in to change notification settings - Fork 882
Description
What problem do you want to solve?
So whenever a pool is being used, uppon completion, asyncpg executes following statement:
SELECT pg_advisory_unlock_all();\nCLOSE ALL;\nUNLISTEN *;\nRESET ALL;
to cleanup the connection's state so it can be used for another request. I'm wondering if there's a way to exclude those from being instrumented as they can pollute traces (especially if there's a task that periodically queries the database).
Describe the solution you'd like
Perhaps additional option next to capture_parameters in the constructor? For example:
AsyncPGInstrumentor(capture_parameters=True,capture_connection_cleanup=False).instrument()capture_connection_cleanup could default to True
Describe alternatives you've considered
I was trying to add custom sampler and reading db.statement from attributes, but at that moment the attributes are not available yet.
Additional Context
No response
Would you like to implement a fix?
None
Tip
React with π to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.