Skip to content

opentelemetry-instrumentation-asyncpg: migrate to stable database and server semantic conventions#4725

Closed
ravitejapioneerblaze-code wants to merge 1 commit into
open-telemetry:mainfrom
ravitejapioneerblaze-code:fix/asyncpg-semconv
Closed

opentelemetry-instrumentation-asyncpg: migrate to stable database and server semantic conventions#4725
ravitejapioneerblaze-code wants to merge 1 commit into
open-telemetry:mainfrom
ravitejapioneerblaze-code:fix/asyncpg-semconv

Conversation

@ravitejapioneerblaze-code

Copy link
Copy Markdown

Fixes #1635

Description

Migrates the asyncpg instrumentation from incubating semantic conventions to the latest stable database and server semantic conventions.

Changes

  • DB_NAME, DB_STATEMENT, DB_SYSTEM, DB_USER, NET_PEER_NAME, NET_PEER_PORT, NET_TRANSPORT (incubating) replaced with stable DB_NAMESPACE, DB_QUERY_TEXT, DB_SYSTEM_NAME, SERVER_ADDRESS, SERVER_PORT
  • Bumped schema_url from 1.11.0 to 1.29.0
  • Updated tests to assert against the new stable attribute constants
  • DB_USER and NET_TRANSPORT were dropped as there's no direct stable equivalent in the current semconv spec

Testing

All existing asyncpg tests pass locally (py312, default/wrapt1/wrapt2 variants). ruff lint passes on modified files.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Jun 20, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

ravitejapioneerblaze-code added a commit to ravitejapioneerblaze-code/opentelemetry-python-contrib that referenced this pull request Jun 20, 2026
@ravitejapioneerblaze-code ravitejapioneerblaze-code requested a review from a team as a code owner June 20, 2026 21:35

@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. We cannot switch to the stable semconvs directly though, using the new semantic conventions should be opt-in, see 85a51e6

@github-project-automation github-project-automation Bot moved this to Reviewed PRs that need fixes in Python PR digest Jun 24, 2026
@xrmx

xrmx commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Oh we have already #4733 doing that, closing.

@xrmx xrmx closed this Jun 24, 2026
@github-project-automation github-project-automation Bot moved this from Reviewed PRs that need fixes to Done in Python PR digest Jun 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Make sure asyncpg instrumentation follows semantic conventions

2 participants