Skip to content

TraceOutgoingRemoteCall StartAsync deprecated #16

@AndersLindPedersen

Description

@AndersLindPedersen

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions