-
Notifications
You must be signed in to change notification settings - Fork 288
Support externally-provided trace/span IDs #397
Comments
@yurishkuro Would love your feedback: POC just to get design talk going. I appreciate your time. So far this pulls out the references building and parent detection into It exposes another span constructor ( |
@dm03514 this looks like its copying a bunch of code that already exists in this repo I think a better approach is to introduce a new non-standard type of span reference SELF (discussed here opentracing/specification#81). If such reference is passed to the through the child and ID generation logic. |
@yurishkuro another POC, would love your feedback. Thank you |
looks reasonable. It's hard to review, could you create a WIP PR? |
refs jaegertracing#397 Signed-off-by: Daniel Mican <[email protected]>
* POC: Self Referenced Span refs #397 Signed-off-by: Daniel Mican <[email protected]> * Self Ref Span: Moves SelfRef -> constants Signed-off-by: Daniel Mican <[email protected]> * SelfRef: removes extra pointer Signed-off-by: Daniel Mican <[email protected]> * SelfRef: README Signed-off-by: Daniel Mican <[email protected]> * SelfRef: README Signed-off-by: Daniel Mican <[email protected]> * SelfRef: startSpan unit test Signed-off-by: Daniel Mican <[email protected]> * SelfRef: startSpanWithOptions check for selRef before tracking references. Provides a selfRef factory method hidningn constant/implementation details Signed-off-by: Daniel Mican <[email protected]> * SelfRef: Lint Signed-off-by: Daniel Mican <[email protected]> * SelfRef: README update Signed-off-by: Daniel Mican <[email protected]> * SelfRef: Rebuild, github timeout Signed-off-by: Daniel Mican <[email protected]> * SelfRef: Rebuild Signed-off-by: Daniel Mican <[email protected]>
Just to update this is working perfectly for my use case! Thank you again. My use case is long lived (hours, days, weeks) of low traffic (100's to 1000's / day) spans. Because of how long they live I needed to shuffle them out of memory. Right now I am exporting the operation name, SpanContext ID as string, tags and start time:
Then when a span needs to be finished/updated it is loaded back and the context is rebuilt:
Is there anything I could do to help with opentracing/specification#81 ? Is it possible to revisit it? I personally could benefit from SELF being part of the spec (for lightstep & dd-trace). I read that |
Have you tried actually finishing the span more than once? Jaeger should be able to handle that and merge multiple span records into one (not sure what it would do with timestamps). This way you wouldn't need to save the tags, and in fact you might be able to operate purely in the OpenTracing API (where things like Regarding the process in OpenTracing, I think there needs to be an RFC proposed. But so far you only solved your use case by accessing a lot of Jaeger-specific methods, so simply adding SELF to OpenTracing wouldn't solve the issue without requiring the additional merging behavior. |
I will experiment with the multiple finishes. I noticed that issue with |
Resolved by #411. |
Problem
I need to use jaeger-client-go daeling with some existed trace Log and uload them to jager agent
As exiting Log has had traceId, spanId and so on, so I need to NewTrace and NewSpan all by myself, in Python, I can create a span with a existed spanContex, but in Go, I can not find such method
jaeger-client-go has a NewSpanContext method, but not method named: Span.SetContext() Or NewSpan()
So could you please add a method: Span.SetContext or Newspan(SpanContext, Tracer, operationName, tags, startTime, references)?
thanks
The text was updated successfully, but these errors were encountered: