-
Notifications
You must be signed in to change notification settings - Fork 4.1k
tracing: lazyTags don't make it to Jaeger #85166
Copy link
Copy link
Closed
Labels
A-observability-infA-tracingRelating to tracing in CockroachDB.Relating to tracing in CockroachDB.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
Description
There’s two ways in which traces make it to Jaeger. Both of them ignore lazy tags.
- 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) { - 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:
cockroach/pkg/util/tracing/span_inner.go
Line 107 in 6f8be65
| s.otelSpan.End() |
Jira issue: CRDB-18074
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-observability-infA-tracingRelating to tracing in CockroachDB.Relating to tracing in CockroachDB.C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.