Skip to content

Add DB client metrics to aiopg instrumentation#4826

Open
henry3260 wants to merge 1 commit into
open-telemetry:mainfrom
henry3260:aiopg-db-client-metrics
Open

Add DB client metrics to aiopg instrumentation#4826
henry3260 wants to merge 1 commit into
open-telemetry:mainfrom
henry3260:aiopg-db-client-metrics

Conversation

@henry3260

Copy link
Copy Markdown
Contributor

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Adds DB client operation duration and returned rows metrics to aiopg when database semantic-convention opt-in is enabled. It preserves the existing async execution path and supports optional meter providers for automatic and manual instrumentation. No additional dependencies are required.

Fixes # (issue)

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

  • uv run --all-packages --group dev tox -e py312-test-instrumentation-aiopg-wrapt2
  • uv run --all-packages --group dev pre-commit run ruff --all-files

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

@henry3260
henry3260 requested a review from a team as a code owner July 16, 2026 18:08
@henry3260
henry3260 marked this pull request as draft July 16, 2026 18:08
@henry3260
henry3260 force-pushed the aiopg-db-client-metrics branch from ec80b99 to 7cde606 Compare July 16, 2026 18:13
@henry3260
henry3260 marked this pull request as ready for review July 16, 2026 18:14
@henry3260
henry3260 force-pushed the aiopg-db-client-metrics branch 5 times, most recently from c000a23 to c039e33 Compare July 16, 2026 19:13
@henry3260
henry3260 force-pushed the aiopg-db-client-metrics branch from c039e33 to 339d546 Compare July 17, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants