Skip to content

tracing: lazyTags don't make it to Jaeger #85166

@andreimatei

Description

@andreimatei

There’s two ways in which traces make it to Jaeger. Both of them ignore lazy tags.

  1. We can generate a jaeger json from a recording. The json can then be dragged-and-dropped into Jaeger, which renders the trace. This happens here:
    func (r Recording) ToJaegerJSON(stmt, comment, nodeStr string) (string, error) {
  2. You can ask crdb to trace everything and export all traces to Jaeger.

Case 1) I think needs a bit of code to render the lazy tags and add them to the json.
Case 2) is conceptually tricky, although in practice I think there’s only one thing we can do. The point of the lazy tags is that they’re only rendered on demand. OpenTelemetry has no interface to express such “demand”. What we can do is render the lazy tags just before the otel span is finished, and add the stringified version to the otel span as an otel tag. That would happen here:

s.otelSpan.End()

Jira issue: CRDB-18074

Metadata

Metadata

Assignees

Labels

A-observability-infA-tracingRelating to tracing in CockroachDB.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions