Skip to content
This repository was archived by the owner on Dec 23, 2023. It is now read-only.
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

@HongZhaoHua

Description

@HongZhaoHua

I want to set a custom Tracestate to a root span.

But the api only support set a Tracestate as follow:

tracestate.set("key", "value");
SpanContext spanContext = SpanContext.create(traceId, spanId, traceOption, tracestate);
Span span = tracer.spanBuilderWithRemoteParent(spanName, spanContext);

But in this way.
if spanContext.isValid == true, i only can get a non root span.
if spanContext.isValid == false, i will loss tracestate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions