-
Notifications
You must be signed in to change notification settings - Fork 419
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
ddtrace/opentracer: consider FollowsFrom references as children #905
Conversation
This change ensures that Opentracing spans using FollowsFrom references will be considered as child spans. Closes #376
* 'v1' of https://github.com/DataDog/dd-trace-go: Implement DD_PROFILING_OUTPUT_DIR for dev/debug (DataDog#924) contrib/go-pg/pg.v10: add INTEGRATION flag check for tests (DataDog#921) contrib/go-redis/redis.v8: optimize BeforeProcess and BeforeProcessPipeline (DataDog#920) CI: check go.sum is up-to-date (DataDog#918) README: Fix go get instructions (DataDog#913) internal/log: Improve API for testing (DataDog#916) ddtrace/tracer: add support for agent discovery endpoint, feature flags, stats & drops (DataDog#859) internal/version: bump to v1.31.0 (DataDog#910) CONTRIBUTING.md: add link to contrib/README.md (DataDog#802) profiler: Disable agentless mode for WithAPIKey (DataDog#906) contrib/Shopify/sarama: fix possible deadlock in WrapAsyncProducer (DataDog#907) contrib/database/sql.tracedConn implement driver.SessionResetter (DataDog#908) ddtrace/opentracer: consider FollowsFrom references as children (DataDog#905) ddtrace/opentracer: add support for opentracing.TracerContextWithSpanExtension (DataDog#855) ddtrace/tracer: follow noDebugStack setting when using SetTag with an error (DataDog#900) contrib/net/http: add a getter to retrieve original round tripper (DataDog#903) ddtrace/tracer: ensure Flush call is synchronous (DataDog#901)
@gbbr May I ask why? Excuse my bluntness, but I will give you an example of why I think this is a bad idea:
Thank you for listening! |
Of course you may ask 🙂 We did this to be consistent. All the other tracers (in other languages) do the same thing. Datadog APM does not currently support this type of relationship so this is the default behaviour. If this is really an issue for you, we could maybe add a feature flag to disable it, but then Let me know how you want to proceed. P.S. You may want to try to create a feature request for adding full support of FollowsFrom relations in the UI using our support. The more people request it, the higher the chance that it becomes a reality. But I can't make any promises. |
Thanks, I will try to open the feature request. Given the current behavior, what I intend to do is make sure parent spans are disconnected from "non-child" spans but add the parent trace ID as a tag to the "non-child" and create a facet for it - this will allow me to manually hop between the traces. If this could be the default behavior instead of treating them as real children it would be much easier for me. It would also be future proof, in case you do decide to use this relationship in another way. In any case, that's what I would do, if I were you :) On another topic (somewhat related), do you have any ERs or plans to pursue the issue of searching tags from the root span (trace) together with an inner span? I'll explain: the root of the trace usually contains the most useful contextual tags (e.g. the HTTP request tags and business context tags), but a lot of times I want to analyze a certain operation within that trace (e.g. how long a DB query takes on average) - this would be an inner span that does not have the contextual tags, unless I programmatically duplicate them, which is pretty painful. So I would like to be able to query something like Does that make any sense? Thanks again. |
Thanks for explaining. On the first part, with adding the trace ID as a tag on children. I don't think that's something we want to do. It feels like a hack to help a specific use-case work around limitations of the product. This isn't something we want to encourage moving forward or provide an option for at this point. On the other hand, advocating to add support for "follows-from" references is something worthwhile pursuing. On your question on searching tags in the UI, that's a bit out of scope of this repository and I might not give the best answer. We are updating our product regularly with new features and interesting workflows, so I suggest also reaching out to our support for this case. They will be more than helpful and knowledgeable on the topic. |
On the other hand, to not close all doors, to this suggestion:
We may be able to add a feature flag which results in this behaviour. If I understand correctly, this feature flag would cause:
Is my assumption correct? |
Yes, this is what I was going for - except I thought linking should be with I think what you described will work well if:
It's actually a bit weird that you can search logs by trace ID (and not span ID) but you can't search traces by trace ID. And on the more philosophical level - I don't see this as a hack because, as a data platform, I'd expect Datadog to have everything be exposed as data you can query/aggregate/observe first, and have the UI features come second. But that's just me :) |
P.s. I would start using it right away even with just (3). |
I agree! Definitely mention this to support too. It might not be difficult to add, but this is just an assumption.
I agree with your point. |
Maybe the tags could then be:
But frankly I don't like this too much because again it feels like a workaround. I'd rather wait to see how a support ticket asking for making Span IDs searchable works out first. Does this sound like a reasonable plan to you? |
I would go with:
And also
Since the relationships are defined for spans. I don't see this as a workaround - I think tags are the (correct/only?) way to add searchable data to traces. Any additional features would be great, but I see this as a must. Of course |
I'm a bit on the fence here. I'm not against it but I want to make sure there is no other better solution. Let's wait for @knusbaum to share a 3rd point of view 🙏🏻 |
Thanks, I am trying to think how to make an enhancement request to your support out of this... |
I’d say the feature request is full support for FollowsFrom relationships. Workarounds won’t take us too far. |
@itaysabato, @gbbr |
This change ensures that Opentracing spans using FollowsFrom references
will be considered as child spans.
Closes #376