Class OtlpEnvelope

Namespace
Kuestenlogik.Bowire.Protocol.Otlp
Assembly
Kuestenlogik.Bowire.Protocol.Otlp.dll

A single OTLP export received by the passive listener.

public sealed record OtlpEnvelope : IEquatable<OtlpEnvelope>
Inheritance
OtlpEnvelope
Implements
Inherited Members

Remarks

Phase 1 keeps the payload as either decoded JSON (when the exporter set Content-Type: application/json) or raw bytes captured as base64 (every other content type — the OTLP default is application/x-protobuf). Phase 2 swaps the base64 branch for an inline protobuf decode via vendored opentelemetry-proto descriptors.

Constructors

OtlpEnvelope(OtlpSignalKind, DateTimeOffset, string, string?, string?, long, string?)

A single OTLP export received by the passive listener.

public OtlpEnvelope(OtlpSignalKind Kind, DateTimeOffset ReceivedAt, string ContentType, string? BodyJson, string? BodyBase64, long BodyBytes, string? RemoteIp)

Parameters

Kind OtlpSignalKind

Which OTLP signal the envelope carries.

ReceivedAt DateTimeOffset

UTC instant the receiver enqueued the envelope.

ContentType string

Raw Content-Type header from the export.

BodyJson string

JSON payload when the exporter encoded as JSON. Null otherwise.

BodyBase64 string

Base64 bytes when the exporter encoded as protobuf (or anything else). Null when BodyJson is set.

BodyBytes long

Total payload size in bytes — useful for "how big was the export" before any decode.

RemoteIp string

Remote IP of the exporter, when the receiver could resolve it.

Remarks

Phase 1 keeps the payload as either decoded JSON (when the exporter set Content-Type: application/json) or raw bytes captured as base64 (every other content type — the OTLP default is application/x-protobuf). Phase 2 swaps the base64 branch for an inline protobuf decode via vendored opentelemetry-proto descriptors.

Properties

BodyBase64

Base64 bytes when the exporter encoded as protobuf (or anything else). Null when BodyJson is set.

public string? BodyBase64 { get; init; }

Property Value

string

BodyBytes

Total payload size in bytes — useful for "how big was the export" before any decode.

public long BodyBytes { get; init; }

Property Value

long

BodyJson

JSON payload when the exporter encoded as JSON. Null otherwise.

public string? BodyJson { get; init; }

Property Value

string

ContentType

Raw Content-Type header from the export.

public string ContentType { get; init; }

Property Value

string

Kind

Which OTLP signal the envelope carries.

public OtlpSignalKind Kind { get; init; }

Property Value

OtlpSignalKind

ReceivedAt

UTC instant the receiver enqueued the envelope.

public DateTimeOffset ReceivedAt { get; init; }

Property Value

DateTimeOffset

RemoteIp

Remote IP of the exporter, when the receiver could resolve it.

public string? RemoteIp { get; init; }

Property Value

string

Methods

Deconstruct(out OtlpSignalKind, out DateTimeOffset, out string, out string?, out string?, out long, out string?)

public void Deconstruct(out OtlpSignalKind Kind, out DateTimeOffset ReceivedAt, out string ContentType, out string? BodyJson, out string? BodyBase64, out long BodyBytes, out string? RemoteIp)

Parameters

Kind OtlpSignalKind
ReceivedAt DateTimeOffset
ContentType string
BodyJson string
BodyBase64 string
BodyBytes long
RemoteIp string

Equals(OtlpEnvelope?)

public bool Equals(OtlpEnvelope? other)

Parameters

other OtlpEnvelope

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(OtlpEnvelope?, OtlpEnvelope?)

public static bool operator ==(OtlpEnvelope? left, OtlpEnvelope? right)

Parameters

left OtlpEnvelope
right OtlpEnvelope

Returns

bool

operator !=(OtlpEnvelope?, OtlpEnvelope?)

public static bool operator !=(OtlpEnvelope? left, OtlpEnvelope? right)

Parameters

left OtlpEnvelope
right OtlpEnvelope

Returns

bool