-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow SpanContext to be provided when starting a Span #411
Comments
@nicktrav I don't fully understand your use case. Is the goal to extended the same span across two different process? What do you mean by |
@rghetia The use case is a process that aggregates telemetry information and exports it to a tracing backend. I say "fully formed" in the sense that all the process has to do is take the span data coming in "as is" and send it on its way. To do this, we need some way of creating Spans with an explicit context, rather than generating new trace / span IDs, as is done here: opentelemetry-go/sdk/trace/span.go Lines 255 to 259 in b80b336
The specific use-case is Istio's Mixer component (I'm looking into what it would take to use open-telemetry rather than open-census). There's a gRPC service that's exposed that accepts span payloads in the form of protobuf bytes sent from remote Envoy proxy processes. Mixer unpacks, aggregates and filters these span payloads before pushing it into a backend. You can see how this is happening here: |
This sounds similar to otel-collector. It allows to receive spans, processes it and then exports it to one or more backend. |
Closing this as it is not part of the specification. |
I have a potential use-case where a process will be responsible for accepting incoming span payloads (could be in multiple wire formats) and then shipping them to various locations (initially Stackdriver) via one or more exporters.
Given that the incoming span payloads are fully formed, I'd like to be able to preserve the existing
SpanContext
when creating a newSpan
instance. The current implementation insdk/trace/span.go
always generates one for us:opentelemetry-go/sdk/trace/span.go
Lines 255 to 259 in b80b336
I'd like to propose allowing an explicit
SpanContext
to be set, using something like aStartOption
(e.g. something likefunc WithSpanContext(c SpanContext) StartOption
).The text was updated successfully, but these errors were encountered: