Class RouteTelemetryExtensions

Assembly: redb.Route.dll

The tracing contract of a transport, on the shared : open the span
(
outbound, inbound), carry the context to the next hop
() and mark a failed call (). Every span
carries redb.route.endpoint, sanitized, and honours RouteEngineOptions.EnableTelemetry of the context.
A connector supplies only the carrier and its names; the W3C and baggage handling lives here once.

public static class RouteTelemetryExtensions

Inheritance

Object→RouteTelemetryExtensions

Methods

ExtractTraceContext<TCarrier>(TCarrier, TraceHeaderReader<TCarrier>)

The W3C context carrier holds, or default when it holds none or an invalid one. For

public static ActivityContext ExtractTraceContext<TCarrier>(TCarrier carrier, TraceHeaderReader<TCarrier> readHeader)

InjectTraceContext<TCarrier>(Activity?, TCarrier, TraceHeaderWriter<TCarrier>)

Writes the trace context of activity — or, without one, of the ambient activity — to an

public static void InjectTraceContext<TCarrier>(Activity? activity, TCarrier carrier, TraceHeaderWriter<TCarrier> writeHeader)

IsTracingEnabled(IRouteContext?)

Whether spans are opened for context: its RouteEngineOptions.EnableTelemetry.

public static bool IsTracingEnabled(this IRouteContext? context)

RecordFailure(Activity?, Exception)

Marks the span failed by exception: status and an

public static void RecordFailure(this Activity? activity, Exception exception)

StartConsumerSpan<TCarrier>(IRouteContext?, string, ActivityKind, string, string, string, TCarrier, TraceHeaderReader<TCarrier>, InboundParent, string?, string?, IEnumerable<ActivityLink>?)

Opens the span of an inbound message or request. Its parent is chosen by parent; with

public static TransportSpan StartConsumerSpan<TCarrier>(IRouteContext? context, string name, ActivityKind kind, string systemAttribute, string systemValue, string endpointUri, TCarrier carrier, TraceHeaderReader<TCarrier> readHeader, InboundParent parent = InboundParent.Carrier, string? destination = null, string? operation = null, IEnumerable<ActivityLink>? links = null)

StartTransportSpan(IRouteContext?, string, ActivityKind, string, string, string, string?, string?)

for an

public static Activity? StartTransportSpan(IRouteContext? context, string name, ActivityKind kind, string systemAttribute, string systemValue, string endpointUri, string? destination = null, string? operation = null)

StartTransportSpan(string, ActivityKind, string, string, string, string?, string?)

Starts a messaging / RPC / I/O span for a transport operation.

public static Activity? StartTransportSpan(string name, ActivityKind kind, string systemAttribute, string systemValue, string endpointUri, string? destination = null, string? operation = null)