Skip to content

log: do not require a Tracer in AmbientContext #74291

@knz

Description

@knz

This emerged from a discussion with @andreimatei in the context of #72912 and #73940 .

Quoth andrei:

I think it'd be a good idea to get the AmbientCtx out of the business of tracing completely; let's get rid of AnnotateCtxWithSpan().
It does too many things, and it adds this semi-dependency on a Tracer to the AmbientCtx.
There's not that many callers to this method; let them create the span explicitly.
This will also make it easier to track where a span with a given name is created - which is something I look for frequently.
Also, there's currently just too many ways to create a span, with helpers upon helpers. We should be cutting down on them.

Jira issue: CRDB-12018

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-tracingRelating to tracing in CockroachDB.C-enhancementSolution expected to add code/behavior + preserve backward-compat (pg compat issues are exception)T-observability

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions