Skip to content

OtlpSerialization

OtlpSerialization service for tree-shakable protobuf support.

This module provides the OtlpSerialization service that abstracts the encoding of OTLP telemetry data to HttpBody.

3 exports Added in v1.0.0 Source

Layers

layerJson

Added in v1.0.0 Source

JSON serializer layer for OTLP telemetry data.

It encodes telemetry data as JSON with application/json content type.

Signature

declare const layerJson: Layer.Layer<OtlpSerialization>;

Protobuf serializer layer for OTLP telemetry data.

This serializer encodes telemetry data using Protocol Buffers binary format with application/x-protobuf content type. It provides more efficient wire format compared to JSON.

Signature

declare const layerProtobuf: Layer.Layer<OtlpSerialization>;

Tags

Signature

declare class OtlpSerialization extends any {
  constructor();
}