Skip to content

Instrument ClickHouse-Go for Database Level Tracing #21

Description

@taitelee

Problem

The trace currently ends when the Go code calls the database. We can see "how long" the query took from the Go side, but we can't see what ClickHouse was doing internally or if the query was delayed by ClickHouse's own internal execution plan.

Proposed Solution

Leverage the native OpenTelemetry support in clickhouse-go/v2.

  • Pass the context.Context (which now contains the Trace ID) into every Exec, Query, or Prepare call.
  • ClickHouse Side: Ensure the ClickHouse server is configured to accept OpenTelemetry headers (available in version 23.x+).
  • Benefit: SigNoz will show a dedicated span for the database execution, including the actual SQL query performed.

Alternatives Considered

None

Additional Context

None

Metadata

Metadata

Assignees

Labels

area/observabilityMetrics, logs, traces, health, profilingenhancementNew feature or request

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions