Hey!
I am curious about the next, my workflows and activities are currently receiving tracing data in the headers
{"fields": {"_tracer-data": {"baggage": "account_sid=ACxxxxxxx,request_id=RQxxxxxx","traceparent": "00-94acfa350abf1f246aec15e9683c4e41-8a7e7c24c742241c-01"}}}
does temporal for java or spring boot started automatically inject the baggage values in the traces spans and log attributes?, I am trying to follow the same approach opentelemetry give me for the spring boot api using this baggage processor opentelemetry-java-contrib/baggage-processor/README.md at main · open-telemetry/opentelemetry-java-contrib · GitHub
I think i found the issue
// Attributes passed to the OT SpanBuilder MUST
// be set before the OTel Span is created,
// so those attributes are available to the Sampling API.
for (int i = 0; i < this.spanBuilderAttributeKeys.size(); i++) {
AttributeKey key = this.spanBuilderAttributeKeys.get(i);
Object value = this.spanBuilderAttributeValues.get(i);
builder.setAttribute(key, value);
}
io.opentelemetry.api.trace.Span span = builder.startSpan();
if (error != null) {
span.setStatus(error ? StatusCode.ERROR : StatusCode.OK);
}
return new SpanShim(span, baggage);
}
// The first SpanContext with Child Of type in the entire list is used as parent,
// else the first SpanContext is used as parent.
@Nullable
The span is been started without set the baggage data, so the baggage process will intercept it but no baggage have been populated, that’s why i see traces without the baggage data.
Are the temporal-opentracing interceptors populating the headers received as Span attributes?
I found documentation that explains why the BaggageSpanProcessor (from the OpenTelemetry API) isn’t capturing baggage data. It appears to be a limitation that occurs when using OpenTracing and OpenTelemetry together in the same project.
Given this limitations is there any plan to support directly Otel without the need to use the shim sdk-java/temporal-opentracing at master · temporalio/sdk-java · GitHub ?