Table of Contents

Class ExternalRequestEventCodec

Namespace
Typhon.Profiler
Assembly
Typhon.Profiler.dll

Wire codec for ExternalRequest: a span record (12-byte common header, 25-byte span extension, the 16-byte trace context whenever the trace id is non-zero) followed by method: u8, status: u16, routeByteCount: u16, route: utf8.

public static class ExternalRequestEventCodec
Inheritance
ExternalRequestEventCodec
Inherited Members

Fields

MaxRouteBytes

Longest route the record keeps, in UTF-8 bytes; a longer one is cut.

public const int MaxRouteBytes = 128

Field Value

int

Methods

ComputeSize(bool, int)

Wire size for a route of routeByteCount bytes.

public static int ComputeSize(bool hasTraceContext, int routeByteCount)

Parameters

hasTraceContext bool
routeByteCount int

Returns

int

Decode(ReadOnlySpan<byte>)

Decodes one record.

public static ExternalRequestEventData Decode(ReadOnlySpan<byte> source)

Parameters

source ReadOnlySpan<byte>

Returns

ExternalRequestEventData

Encode(Span<byte>, byte, long, long, ulong, ulong, ulong, ulong, ExternalRequestMethod, ushort, ReadOnlySpan<byte>)

Encodes one record into destination, which must be ComputeSize(bool, int) bytes.

public static void Encode(Span<byte> destination, byte threadSlot, long startTimestamp, long endTimestamp, ulong spanId, ulong parentSpanId, ulong traceIdHi, ulong traceIdLo, ExternalRequestMethod method, ushort status, ReadOnlySpan<byte> routeUtf8)

Parameters

destination Span<byte>
threadSlot byte
startTimestamp long
endTimestamp long
spanId ulong
parentSpanId ulong
traceIdHi ulong
traceIdLo ulong
method ExternalRequestMethod
status ushort
routeUtf8 ReadOnlySpan<byte>