Skip to content

opentelemetry-instrumentation-aiopg: fix manual connection attributes#4821

Open
henry3260 wants to merge 2 commits into
open-telemetry:mainfrom
henry3260:aiopg-manual-connection-attributes
Open

opentelemetry-instrumentation-aiopg: fix manual connection attributes#4821
henry3260 wants to merge 2 commits into
open-telemetry:mainfrom
henry3260:aiopg-manual-connection-attributes

Conversation

@henry3260

@henry3260 henry3260 commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

Fix aiopg manual instrumentation to read database connection attributes from the underlying psycopg2 connection. Also simplify operation-name resolution by delegating empty arguments to the shared DBAPI helper. No additional dependencies are required.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • uvx tox -e py310-test-instrumentation-aiopg-wrapt2
  • uvx tox -e py312-test-instrumentation-aiopg-wrapt2

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

See contributing.md for styleguide, changelog guidelines, and more.

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@emdneto emdneto moved this to Ready for review in Python PR digest Jul 16, 2026
@henry3260
henry3260 force-pushed the aiopg-manual-connection-attributes branch from 467d180 to f011407 Compare July 16, 2026 03:51
@henry3260
henry3260 requested a review from a team as a code owner July 16, 2026 03:51
@henry3260
henry3260 force-pushed the aiopg-manual-connection-attributes branch from f011407 to 4e45147 Compare July 16, 2026 03:56

@xrmx xrmx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR. Could you please also add some basic tests in docker-tests (tests/opentelemetry-docker-tests)? So that we test against the real thing and not just mocks.

@github-project-automation github-project-automation Bot moved this from Ready for review to Reviewed PRs that need fixes in Python PR digest Jul 16, 2026
@henry3260

Copy link
Copy Markdown
Contributor Author

Thanks for the PR. Could you please also add some basic tests in docker-tests (tests/opentelemetry-docker-tests)? So that we test against the real thing and not just mocks.

Sure :)

@henry3260
henry3260 force-pushed the aiopg-manual-connection-attributes branch from 4e45147 to 8a050ba Compare July 16, 2026 08:54
@henry3260
henry3260 force-pushed the aiopg-manual-connection-attributes branch from 8a050ba to 58da5f5 Compare July 16, 2026 09:14
@henry3260
henry3260 requested a review from xrmx July 16, 2026 09:23
@emdneto emdneto moved this from Reviewed PRs that need fixes to Ready for merge in Python PR digest Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready for merge

Development

Successfully merging this pull request may close these issues.

3 participants