-
Notifications
You must be signed in to change notification settings - Fork 7
Description
As stated in documentation the StartAsync method is deprecated.
I want to use the TraceAsync, but is a bit confused on how to retrieve the Tag when TraceAsync requires an action. My action is a RPC and the tag is a prerequisite to that.
Consider this:
`
IOutgoingRemoteCallTracer outgoingRemoteCallTracer = oneAgentSdk.TraceOutgoingRemoteCall(
"RemoteMethod", "RemoteServiceName",
"mrcp://endpoint/service", ChannelType.TCP_IP, "myRemoteHost:1234");
outgoingRemoteCallTracer.SetProtocolName("MyRemoteCallProtocol");
try
{
string tag = outgoingRemoteCallTracer.GetDynatraceStringTag();
outgoingRemoteCallTracer.TraceAsync(_client.RpcCall(tag));
}
catch (Exception e)
{
outgoingRemoteCallTracer.Error(e);
// handle or rethrow
}
finally
{
outgoingRemoteCallTracer.End();
}
`
Currently we are using the StartAsync and supressing the deprecated log message.