Skip to content

feat(clickhouse_driver): Add db.query.text to streamed query spans#6635

Open
ericapisani wants to merge 2 commits into
masterfrom
py-2547-add-db-attr-clickhouse
Open

feat(clickhouse_driver): Add db.query.text to streamed query spans#6635
ericapisani wants to merge 2 commits into
masterfrom
py-2547-add-db-attr-clickhouse

Conversation

@ericapisani

@ericapisani ericapisani commented Jun 23, 2026

Copy link
Copy Markdown
Member

Adds the db.query.text attribute to ClickHouse driver spans when span
streaming is enabled. This brings ClickHouse driver spans in line with other
database integrations like asyncpg that already include query text in streamed
spans.

Fixes #6634
Fixes PY-2547

When span streaming is enabled, include the query text as a span attribute in the db.query.text field. Update test assertions to verify the attribute is present.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
@linear-code

linear-code Bot commented Jun 23, 2026

Copy link
Copy Markdown

PY-2547

@ericapisani ericapisani marked this pull request as ready for review June 23, 2026 17:17
@ericapisani ericapisani requested a review from a team as a code owner June 23, 2026 17:17
Comment thread tests/integrations/clickhouse_driver/test_clickhouse_driver.py Outdated
@github-actions

Copy link
Copy Markdown
Contributor

Codecov Results 📊

91401 passed | ⏭️ 6136 skipped | Total: 97537 | Pass Rate: 93.71% | Execution Time: 331m 35s

📊 Comparison with Base Branch

Metric Change
Total Tests
Passed Tests
Failed Tests
Skipped Tests

✨ No test changes detected

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2403 uncovered lines.
❌ Project coverage is 89.89%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
- Coverage    89.90%    89.89%    -0.01%
==========================================
  Files          192       192         —
  Lines        23763     23763         —
  Branches      8206      8206         —
==========================================
+ Hits         21362     21360        -2
- Misses        2401      2403        +2
- Partials      1344      1346        +2

Generated by Codecov Action

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.

Set db.query.text attribute on clickhouse_driver

1 participant