Skip to content

TracingChannel

Namespace: E2E.Decision.Sdk

public sealed class TracingChannel

The five channels of a tracing channel (diagnosticsChannel.TracingChannel): start, end, asyncStart, asyncEnd and error. Each is a Channel named tracing:{name}:{event}, as in Node.

Inheritance: object

View source

public Channel AsyncEnd { get; }

Published when the operation’s task completes.

Value: Channel

public Channel AsyncStart { get; }

Published when the operation’s task completes, before AsyncEnd.

Value: Channel

public Channel End { get; }

Published when the operation’s synchronous part returns.

Value: Channel

public Channel Error { get; }

Published when the operation fails.

Value: Channel

public bool HasSubscribers { get; }

tracingChannel.hasSubscribers.

Value: bool

public Channel Start { get; }

Published when the operation starts.

Value: Channel

public void Subscribe(TracingChannelSubscribers subscribers)

tracingChannel.subscribe.

Parameters

Name Type Description
subscribers TracingChannelSubscribers

TracePromiseAsync<T>(Func<Task<T>>, TelemetryTracingChannelMessage)

Section titled “TracePromiseAsync<T>(Func<Task<T>>, TelemetryTracingChannelMessage)”
public Task<T> TracePromiseAsync<T>(Func<Task<T>> execute, TelemetryTracingChannelMessage message)

tracingChannel.tracePromise: runs <code class=“paramref”>execute</code> and publishes start and end around the call, then error (when it fails), asyncStart and asyncEnd when its task completes, with Result or Error set on <code class=“paramref”>message</code>. The task’s own result or failure is returned.

Type parameters

Name Description
T

Parameters

Name Type Description
execute Func<Task<T>>
message TelemetryTracingChannelMessage

Returns: Task<T>

public void Unsubscribe(TracingChannelSubscribers subscribers)

tracingChannel.unsubscribe.

Parameters

Name Type Description
subscribers TracingChannelSubscribers