Hi @steffan
Is it possible to have an independent span (nil parent) that is also a child span of another span?
My use case is I have a span like /api/endpoint----stuff--db-call----http-call--stuff--return-response, and I can have child spans for db-call and http-call inside that span so I know how long those parts take which is cool,
but I also want that http-call bit to be it's own span as well, so that I can setup alerts for that specific endpoint SLA's.
currently if I create an independent span with parent: nil, i can get that, but then my api span looks like this instead
/api/endpoint----stuff---db-call------(no http info)------------stuff--return-response, without the span info for http-call.
Once approach I thought to use is to save the timings of the child span I'm interested in, and then afterwards use that timings from the attributes to create a new asynchronous span for that duration - that work-around could work, but is there an easier way ?
Thank you very much, I'll look into it 👍 yes thats the right assumption 😎
I assume http-call is a span around a call to an external service you don't control? This would be a client span, in other words, a span with kind CLIENT. Perhaps you should look at the query options in your telemetry backend to search for client spans. You may have other search criteria available to further refine the results. I don't think overriding :parent to nil serves any purpose here.