-
Notifications
You must be signed in to change notification settings - Fork 404
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
Links between Spans from different Traces #1279
Comments
Tracer::StartSpan provides option to link unrelated spans. Let us know if this is what you are looking for ? |
Thanks for hint. This partially solves my case. Main issue with this approach is that I do not know target Trace for link when I create my Span. I would have to either create extra child Span later in order to put link there, or delay Span creation until link target is known. Both workaround have their downsides. BTW, please create some example how to create links. It is not obvious that |
Valid points. There are also downsides in allowing the linking of spans after span creation, more discussed here. AS of now, specs don't allow it, thought it can change in the future.
There are few examples in unit-tests here, but they are not realistic and can be improved. WIll add few examples. |
OK, I see. I thought that links are simply specialized kind of attributes, but it turns out that there is more logic associated with them. So I will use one of workarounds mentioned earlier. |
Closing as discussed above. Please reopen if there are any further issues. |
I have three applications: A, B and C. App C is 3rd-party for us (we cannot modify it). App B works as a gateway to app C - it contains only logic needed to establish connection with app C and pass packets in both directions.
When A sends something to B, it creates new Trace and passed it to B. The same when B sends something to A. However we are not able to to pass trace context to C and get it back. App B only examines data in packet header and is not able to link response to request sent earlier - this needs access to packet data, which is processed by app A only.
Is your feature request related to a problem?
I would like to be able to create link between Spans from two different Traces. According to specification this should be possible. However current C++ Tracing API allows to create link to parent Span only.
Describe the solution you'd like
Please add new method (e.g. AddLink) to Span class. Ability to add it via StartSpanOptions during Span creation time also may be handy.
Describe alternatives you've considered
At this moment we can only add attribute with ID of request's trace, or our custom app-specific ID. This allows to find related trace during debugging with extra manual steps.
The text was updated successfully, but these errors were encountered: