Skip to content

dbo11y: in explain_plan collector grab connection while fetching plan #3957

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

Merged
merged 1 commit into from
Jul 8, 2025

Conversation

cristiangreco
Copy link
Contributor

PR Description

The collector issues an USE statement to set the schema before running the EXPLAIN statement. This requires grabbing a dedicated db connection from the pool to avoid issues with concurrent queries from other collectors that may be running on the same connection.

Which issue(s) this PR fixes

n.a.

Notes to the Reviewer

PR Checklist

  • CHANGELOG.md updated
  • Documentation added
  • Tests updated
  • Config converters updated

The collector issues an `USE` statement to set the schema
before running the `EXPLAIN` statement. This requires grabbing a
dedicated db connection from the pool to avoid issues with concurrent
queries from other collectors that may be running on the same
connection.
@cristiangreco cristiangreco marked this pull request as ready for review July 8, 2025 12:25
Copy link
Contributor

@fridgepoet fridgepoet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By the way, is there any test we can update for this?

@cristiangreco
Copy link
Contributor Author

By the way, is there any test we can update for this?

Apparently this path is not covered by tests. I'll look into that as a followup if that's ok.

@cristiangreco cristiangreco merged commit 0cf797e into main Jul 8, 2025
53 of 55 checks passed
@cristiangreco cristiangreco deleted the cristian/dbo11y-explainplan-conn branch July 8, 2025 15:40
@fridgepoet
Copy link
Contributor

Happy to help out with any followup tasks if needed, Cristian, just lemme know!

@cristiangreco
Copy link
Contributor Author

Happy to help out with any followup tasks if needed, Cristian, just lemme know!

Sure, if you want to go ahead with adding some specific tests here I'll leave it with you.

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