Closed BaterPL closed 8 months ago
So basically you get two separate callback invocations but you want them to logically belong to the same operation? Unfortunately, that is not supported by the SDK. You might have more luck with OpenTelemetry/System.Diagnostics.Activity: https://docs.dynatrace.com/docs/shortlink/otel-wt-dotnet
If you want to keep using the SDK for this, consider tracing them separately and maybe using an in-process link tracer between them (assuming there isn't already a span/trace node active in AfterReceiveReply.
Hi,
I have a question about tracing async calls to the WCF server. For some time now we were using
IClientMessageInspector
to track requests, starting trace and adding dynatrace header inBeforeSendRequest
and stopping tracer inAfterReceiveReply
. It works perfectly fine for synchronous API, but for asynchronous the behavior is unpredictable. I've read in readme that Start/End is not supposed to be used in async flow, so I expect it to cause that issue asBeforeSendRequest
andAfterReceiveReply
might be performed on different threads.I know you provide
TrackAsync
method, but it's not possible to wrap these two methods mentioned above, as they are invoked by WCF. How should I approach this problem?