TracingChannel
Namespace: E2E.Decision.Sdk
public sealed class TracingChannelThe 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
Properties
Section titled “Properties”AsyncEnd
Section titled “AsyncEnd”public Channel AsyncEnd { get; }Published when the operation’s task completes.
Value: Channel
AsyncStart
Section titled “AsyncStart”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
HasSubscribers
Section titled “HasSubscribers”public bool HasSubscribers { get; }tracingChannel.hasSubscribers.
Value: bool
public Channel Start { get; }Published when the operation starts.
Value: Channel
Methods
Section titled “Methods”Subscribe(TracingChannelSubscribers)
Section titled “Subscribe(TracingChannelSubscribers)”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>
Unsubscribe(TracingChannelSubscribers)
Section titled “Unsubscribe(TracingChannelSubscribers)”public void Unsubscribe(TracingChannelSubscribers subscribers)tracingChannel.unsubscribe.
Parameters
| Name | Type | Description |
|---|---|---|
subscribers |
TracingChannelSubscribers |