Skip to content

fix(asyncpg): Use Sentry span attribute name conventions#6306

Merged
ericapisani merged 2 commits into
masterfrom
py-2424-fix-asyncpg-span-names
May 20, 2026
Merged

fix(asyncpg): Use Sentry span attribute name conventions#6306
ericapisani merged 2 commits into
masterfrom
py-2424-fix-asyncpg-span-names

Conversation

@ericapisani
Copy link
Copy Markdown
Member

Summary

  • Update asyncpg span attributes to use db.system.name and db.namespace instead of deprecated db.system and db.name
  • Retain deprecated attribute names for non-streamed spans for backwards compatibility

Fixes PY-2424
Fixes #6299

Update span attribute names to align with Sentry standards:
- db.system → db.system.name
- db.name → db.namespace

Refactor _set_db_data to handle StreamedSpan (using set_attribute) and
regular Span (using set_data) separately. The deprecated attributes
are retained in the non-streamed path for backwards compatibility.

Fixes PY-2424
Fixes #6299
@ericapisani ericapisani requested a review from a team as a code owner May 20, 2026 13:45
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 20, 2026

PY-2424

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Codecov Results 📊

282 passed | Total: 282 | Pass Rate: 100% | Execution Time: 42.56s

All tests are passing successfully.

❌ Patch coverage is 0.00%. Project has 15024 uncovered lines.

Files with missing lines (1)
File Patch % Lines
asyncpg.py 9.15% ⚠️ 149 Missing

Generated by Codecov Action

@ericapisani ericapisani enabled auto-merge (squash) May 20, 2026 13:55
@ericapisani ericapisani merged commit c44340a into master May 20, 2026
157 checks passed
@ericapisani ericapisani deleted the py-2424-fix-asyncpg-span-names branch May 20, 2026 14:03
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.

asyncpg _set_db_data and _wrap_connect use deprecated attribute names when streaming is enabled

2 participants