Skip to content
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.
This repository has been archived by the owner on Dec 23, 2023. It is now read-only.

How to set a custom Tracestate to a root span #2054

Open
@HongZhaoHua

Description

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

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions