You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When calling a WCF service, if the method signature uses Task<*>, the trace id is often lost.
To Reproduce
Given the below runtime environment, our apps dropped trace ids associated with its logs.
Trace Ids are not lost when the WCF method signature does NOT return a Task. (It worked when our method signature returned a string instead of Task<string>)
When the method signature includes Task<string> (or any other type of task). Trace ids are generally lost. (It's not 100% of the time, we suspect a race condition).
The signature or manner of the client did not change the loss of trace id. (We could await, or call in an async method, or call it as a synchronous call, etc).
AfterReceiveRequest would always have a trace_id
Inside the message body, we could get the trace_id from DD
BeforeSendReply would not have a trace_id
Expected behavior
We expect to see a trace_id in the DD logs, as well as in the BeforeSendReply method.
Runtime environment (please complete the following information):
OS: Windows Server 2022 Datacenter, Version 10.0.20348 Build 20348
CLR: .NET Framework 4.8
Additional context
We implemented a "workaround" where we stuff the trace_id into state and in our logs override the DD fields (trace_id and span_id) from state. We're assuming this is a threading issue or race condition.
The text was updated successfully, but these errors were encountered:
Describe the bug
When calling a WCF service, if the method signature uses
Task<*>
, the trace id is often lost.To Reproduce
Task
. (It worked when our method signature returned astring
instead ofTask<string>
)Task<string>
(or any other type of task). Trace ids are generally lost. (It's not 100% of the time, we suspect a race condition).AfterReceiveRequest
would always have a trace_idBeforeSendReply
would not have a trace_idExpected behavior
We expect to see a trace_id in the DD logs, as well as in the
BeforeSendReply
method.Runtime environment (please complete the following information):
Additional context
We implemented a "workaround" where we stuff the trace_id into state and in our logs override the DD fields (trace_id and span_id) from state. We're assuming this is a threading issue or race condition.
The text was updated successfully, but these errors were encountered: