Skip to content

sql,tracing: harmonize span/traceID representation #60668

@tbg

Description

@tbg

Describe the problem

In SQL, traceIDs/spanIDs are currently represented using DInt, which is an int64-backed type. The tracing package uses uint64s. While this isn't a technical issue, it might be confusing to see int64(x) via SQL and uint64(x) in logs.

Expected behavior
SQL and tracing should agree. Either we use BIGINT in SQL or uint64 in tracing. If we do the latter, we have to be a little careful about the migration (we have to stick to uint64 on the wire, in (*Tracer).InjectX/ExtractX).

Additional data / screenshots
Discussed on https://reviewable.io/reviews/cockroachdb/cockroach/59992

Jira issue: CRDB-3163

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-sql-observabilityRelated to observability of the SQL layerA-tracingRelating to tracing in CockroachDB.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)X-staleno-issue-activity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions