The OpenTelemetry API allows to use arbitrary SpanContext instances with io.opentelemetry.api.trace.SpanBuilder#addLink(io.opentelemetry.api.trace.SpanContext).
However the otel bridge implementation only works with OTelSpanContext that are created from Elastic traces, and we do not currently support to create OTelSpanContext from arbitrary IDs.
This PR currently introduces a warning and silently avoid throwing an exception.
What does this PR do?
The OpenTelemetry API allows to use arbitrary
SpanContext
instances withio.opentelemetry.api.trace.SpanBuilder#addLink(io.opentelemetry.api.trace.SpanContext)
.However the otel bridge implementation only works with
OTelSpanContext
that are created from Elastic traces, and we do not currently support to createOTelSpanContext
from arbitrary IDs.This PR currently introduces a warning and silently avoid throwing an exception.
Relates to https://github.com/elastic/apm-agent-java/issues/3662
Checklist