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
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.
Alternatives Considered
None
Additional Context
None