Skip to content

fix: disable otelpgx pool.acquire spans in Datadog - #794

Merged
shyim merged 1 commit into
mainfrom
cursor/disable-otelpgx-acquire-spans-9015
Aug 12, 2026
Merged

fix: disable otelpgx pool.acquire spans in Datadog#794
shyim merged 1 commit into
mainfrom
cursor/disable-otelpgx-acquire-spans-9015

Conversation

@shyim

@shyim shyim commented Aug 12, 2026

Copy link
Copy Markdown
Member

Summary

Why

Prod emits high volumes of low-signal pool.acquire / client.request spans that add little monitoring value in Datadog.

Test plan

  • mise run lint
  • mise run test
  • Confirm in Datadog APM that pool.acquire / related client.request noise drops while named DB query spans remain.
Open in Web Open in Cursor 

Drop high-volume, low-signal acquire tracing while keeping
query/exec/prepare spans (including sqlc SpanNameFunc naming).

Co-authored-by: Soner <github@shyim.de>
@shyim
shyim marked this pull request as ready for review August 12, 2026 07:00
@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR disables otelpgx connection-pool acquire spans to reduce low-signal Datadog telemetry while retaining existing database operation tracing.

  • Adds WithDisableAcquireTracer() when constructing the shared database tracer.
  • Leaves pool configuration, SQL span naming, and query/exec/prepare tracing unchanged.

Confidence Score: 5/5

The PR appears safe to merge with no actionable defects identified.

The pinned otelpgx version supports the new option, and its scoped behavior suppresses pool-acquire tracing without changing pool operation or the existing query span instrumentation.

Important Files Changed

Filename Overview
api/internal/database/db.go Adds the supported acquire-tracer opt-out to the shared pool tracer configuration without affecting connection behavior or database-operation spans.

Reviews (1): Last reviewed commit: "fix: disable otelpgx pool.acquire spans ..." | Re-trigger Greptile

@shyim
shyim merged commit f54b3bf into main Aug 12, 2026
6 checks passed
@shyim
shyim deleted the cursor/disable-otelpgx-acquire-spans-9015 branch August 12, 2026 07:14
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.

2 participants