You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 23, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 23, 2023. It is now read-only.
How to set a custom Tracestate to a root span #2054
Tracer tracer = Tracing.getTracer();
TraceId traceId = TraceId.generateRandomId(RandomUtility.getRandom());
SpanId spanId = SpanId.generateRandomId(RandomUtility.getRandom());
TraceOptions traceOption = TraceOptions.builder().build();
Tracestate traceState = Tracestate.builder().set("userId", "xxxxx").build();
SpanContext spanContext = SpanContext.create(traceId, spanId, traceOption, traceState);
// TODO I hope get a root span, but in fact, i just get a non root span
Span span = tracer.spanBuilderWithRemoteParent("root", spanContext).startSpan();
Activity
HongZhaoHua commentedon Sep 14, 2020
here is the code:
How do I build a root span with Tracestate?