Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Apache SkyWalking asks for an extendable mechanism of SpanContext #131

Open
wu-sheng opened this issue Jul 3, 2018 · 9 comments
Open

Apache SkyWalking asks for an extendable mechanism of SpanContext #131

wu-sheng opened this issue Jul 3, 2018 · 9 comments
Labels

Comments

@wu-sheng
Copy link

wu-sheng commented Jul 3, 2018

Hi, I am trying to build OC exporters for SkyWalking in Java, go and C++. First, I use Java. But I am facing a block because SkyWalking requires a totally different header with Zipkin B3.

SW3 header: https://github.com/apache/incubator-skywalking/blob/master/docs/en/Skywalking-Cross-Process-Propagation-Headers-Protocol-v1.md#header-item

A simple scenario is, in Tomcat span -> HTTP client(outgoing) span request, when build the span in HTTP client, do inject I think, we need the Context from Tomcat span.

For that, we don't just need to inject/extract, we need to put exact info into the ** SpanContext**. From Java's SpanContext, it is un-extendable. I have checked with @songy23 , look like it is.

So, here, I am asking, could we discuss this mechanism? @bogdandrutu @rakyll @Ramonza

@songy23 songy23 added the trace label Jul 3, 2018
@wu-sheng
Copy link
Author

wu-sheng commented Jul 3, 2018

I expect to support extra key-value pair in ** SpanContext**, which only propagate in Process only. Then **Inject/Extract` could work by using that context.

@wu-sheng wu-sheng changed the title Apache SkyWalking asks for an un-extendable mechanism Apache SkyWalking asks for an extendable mechanism of SpanContext Jul 4, 2018
@reyang
Copy link
Contributor

reyang commented Jul 6, 2018

@bogdandrutu @SergeyKanzhelev @wu-sheng @songy23 @rakyll @Ramonza
Having vendor specific information in the context (SpanContext) is a generic requirement:

  1. put vendor-specific trace information in SpanContext and propagate within the process
  2. register callback, get notified when a child span is created so there is a chance for the callback to update vendor-specific info in SpanContext
  3. propagate vendor specific trace info across process boundaries:
    3.1 (while receiving requests) deserialize from the request headers and update the SpanContext
    3.2 (while sending requests) extract the info from SpanContext and update the request headers

#70 has proposed a solution for this, please refer to the "tracestate" section.

@wu-sheng
Copy link
Author

wu-sheng commented Jul 6, 2018

@reyang agree. Hope we can have these interop points.

@codefromthecrypt
Copy link

codefromthecrypt commented Jul 6, 2018 via email

@wu-sheng
Copy link
Author

wu-sheng commented Jul 6, 2018

@adriancole Could you provide an example to show how to use the extendable mechanism? Such as exact context key-value, notification when creating a span or inject/extract implementor.

@codefromthecrypt
Copy link

codefromthecrypt commented Jul 7, 2018 via email

@codefromthecrypt
Copy link

codefromthecrypt commented Jul 7, 2018 via email

@wu-sheng
Copy link
Author

@reyang @bogdandrutu Any update about this and #70 , to allow SkyWalking to extend ** SpanContext** ?

@reyang
Copy link
Contributor

reyang commented Aug 27, 2018

@wu-sheng SpanContext now has a member called Tracestate (currently implemented for Java and Python), which is a key-value-pair. Please refer to #132 and census-instrumentation/opencensus-python#259.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants