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
KindOtlpSignalKindWhich OTLP signal the envelope carries.
ReceivedAtDateTimeOffsetUTC instant the receiver enqueued the envelope.
ContentTypestringRaw
Content-Typeheader from the export.BodyJsonstringJSON payload when the exporter encoded as JSON. Null otherwise.
BodyBase64stringBase64 bytes when the exporter encoded as protobuf (or anything else). Null when BodyJson is set.
BodyByteslongTotal payload size in bytes — useful for "how big was the export" before any decode.
RemoteIpstringRemote 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
BodyBytes
Total payload size in bytes — useful for "how big was the export" before any decode.
public long BodyBytes { get; init; }
Property Value
BodyJson
JSON payload when the exporter encoded as JSON. Null otherwise.
public string? BodyJson { get; init; }
Property Value
ContentType
Raw Content-Type header from the export.
public string ContentType { get; init; }
Property Value
Kind
Which OTLP signal the envelope carries.
public OtlpSignalKind Kind { get; init; }
Property Value
ReceivedAt
UTC instant the receiver enqueued the envelope.
public DateTimeOffset ReceivedAt { get; init; }
Property Value
RemoteIp
Remote IP of the exporter, when the receiver could resolve it.
public string? RemoteIp { get; init; }
Property Value
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
KindOtlpSignalKindReceivedAtDateTimeOffsetContentTypestringBodyJsonstringBodyBase64stringBodyByteslongRemoteIpstring
Equals(OtlpEnvelope?)
public bool Equals(OtlpEnvelope? other)
Parameters
otherOtlpEnvelope
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(OtlpEnvelope?, OtlpEnvelope?)
public static bool operator ==(OtlpEnvelope? left, OtlpEnvelope? right)
Parameters
leftOtlpEnveloperightOtlpEnvelope
Returns
operator !=(OtlpEnvelope?, OtlpEnvelope?)
public static bool operator !=(OtlpEnvelope? left, OtlpEnvelope? right)
Parameters
leftOtlpEnveloperightOtlpEnvelope