How to determine Parent Span from a ReadableSpan, check if Parent Span is Remote?
jj22ee opened this issue · comments
I would like to determine if the parent span (if it exists) is Remote, given a ReadableSpan
. This information is needed in my implementation of a SpanExporter's export function.
ReadableSpan
is the only information provided when implementing theExport
functionality of SpanExporter. (see ConsoleExporter)
In Python and Java, this is easy. We can get the parent span from the current span, then check the contex's isRemote
value.
However, in JS, the ReadableSpan
span only provides the parent's Id:
If we are able to get a span given an Id, this would help, but I haven't found a way to get a span given a span Id in the OTel JavaScript APIs.
Is there a workaround, or can OTel JS be updated to be able to get the parent span context given a ReadableSpan?
- This only affects the JavaScript OpenTelemetry library
- This may affect other libraries, but I would like to get opinions here first
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 14 days.