OtlpJsonEncoder
zio.blocks.telemetry.otel.OtlpJsonEncoder
object OtlpJsonEncoder
Minimal OTLP JSON encoder for traces, metrics, and logs.
Encodes telemetry data into OTLP JSON format (protobuf JSON mapping) without external JSON library dependencies. Uses StringBuilder internally.
Encoding rules follow the protobuf JSON mapping:
- bytes (traceId, spanId) → lowercase hex strings
- int64/uint64 → quoted string numbers
- enums → integer numbers
- field names → camelCase
Attributes
- Source
- OtlpJsonEncoder.scala
- Graph
-
- Supertypes
- Self type
-
OtlpJsonEncoder.type
Members list
In this article