OtlpSerialization
Serializes OTLP payloads into HTTP request bodies.
Signal exporters build trace, metric, and log data structures in memory. This module provides the service that turns those structures into JSON or protobuf HTTP bodies before they are posted to an OTLP collector.
Layers
Signature
declare const layerJson: Layer<OtlpSerialization, never, never>;layerProtobuf
Added in v4.0.0
Source
Provides OtlpSerialization using protobuf-encoded OTLP bodies with the application/x-protobuf content type.
Signature
declare const layerProtobuf: Layer<OtlpSerialization, never, never>;Services
OtlpSerialization
Added in v4.0.0
Source
Service for serializing OTLP traces, metrics, and logs into HTTP request bodies.
Signature
declare class OtlpSerialization extends Shape<
"effect/observability/OtlpSerialization",
{
readonly logs: (data: LogsData) => HttpBody;
readonly metrics: (data: MetricsData) => HttpBody;
readonly traces: (data: TraceData) => HttpBody;
},
this
> {
constructor(_: never);
}
Provides
OtlpSerializationusing OTLP/HTTP JSON bodies.