zio.blocks.telemetry.otel

Members list

Type members

Classlikes

object B3Propagator

B3 propagation format (Zipkin's trace context standard).

B3 propagation format (Zipkin's trace context standard).

Provides both single-header (b3) and multi-header (X-B3-*) variants.

Attributes

See also
Source
B3Propagator.scala
Supertypes
class Object
trait Matchable
class Any
Self type
case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Source
BuildInfo.scala
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
object ExportResult

Attributes

Companion
trait
Source
ExportResult.scala
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
sealed trait ExportResult

Outcome of an OTLP export attempt. Success means the collector accepted the payload. Failure carries a diagnostic message and a retryable flag that tells BatchProcessor whether to retry (e.g. HTTP 429/5xx) or drop the batch (e.g. HTTP 400).

Outcome of an OTLP export attempt. Success means the collector accepted the payload. Failure carries a diagnostic message and a retryable flag that tells BatchProcessor whether to retry (e.g. HTTP 429/5xx) or drop the batch (e.g. HTTP 400).

Attributes

Companion
object
Source
ExportResult.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Failure
object Success
final case class ExporterConfig(endpoint: String = ..., headers: Map[String, String] = ..., timeout: Duration = ..., maxQueueSize: Int = ..., maxBatchSize: Int = ..., flushIntervalMillis: Long = ...)

Configuration for OTLP JSON exporters.

Configuration for OTLP JSON exporters.

Value parameters

endpoint

collector base URL (default http://localhost:4318)

flushIntervalMillis

milliseconds between automatic background flushes

headers

extra HTTP headers sent with every export (e.g. auth tokens); redacted in toString

maxBatchSize

maximum items sent in a single export request

maxQueueSize

maximum items buffered before oldest are dropped

timeout

connect and read timeout per HTTP request

Attributes

Source
ExporterConfig.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class HttpResponse(statusCode: Int, body: Array[Byte], headers: Map[String, Seq[String]])

Response from an HTTP sender. Headers are stored with their original casing; lookups via firstHeader are case-insensitive. The body is the raw response bytes (may be empty).

Response from an HTTP sender. Headers are stored with their original casing; lookups via firstHeader are case-insensitive. The body is the raw response bytes (may be empty).

Attributes

Source
HttpSender.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
trait HttpSender

SPI for sending OTLP export payloads over HTTP. Implementations must be synchronous (blocking). Retry and backoff are handled by the caller (BatchProcessor). shutdown() should release any held resources (connections, thread pools).

SPI for sending OTLP export payloads over HTTP. Implementations must be synchronous (blocking). Retry and backoff are handled by the caller (BatchProcessor). shutdown() should release any held resources (connections, thread pools).

Attributes

Companion
object
Source
HttpSender.scala
Supertypes
class Object
trait Matchable
class Any
object HttpSender

Attributes

Companion
trait
Source
HttpSender.scala
Supertypes
class Object
trait Matchable
class Any
Self type
HttpSender.type
final case class NamedMetric(name: String, description: String, unit: String, data: MetricData)

A named metric descriptor pairing metric metadata with its data.

A named metric descriptor pairing metric metadata with its data.

Value parameters

data

the aggregated metric data

description

human-readable description

name

the metric name

unit

the unit of measurement

Attributes

Source
OtlpJsonEncoder.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class OtelContext(spanContext: Option[SpanContext])

Bridges the otel module's ContextStorage with zio-blocks Context[R].

Bridges the otel module's ContextStorage with zio-blocks Context[R].

OtelContext captures the current span context from a ContextStorage, enabling type-safe context threading via Context[R & OtelContext].

Value parameters

spanContext

the active span context, if any

Attributes

Companion
object
Source
OtelContext.scala
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object OtelContext

Attributes

Companion
class
Source
OtelContext.scala
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type

Minimal OTLP JSON encoder for traces, metrics, and logs.

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
Supertypes
class Object
trait Matchable
class Any
Self type
trait Propagator

A propagator extracts and injects SpanContext from/into a carrier using getter/setter functions. This abstraction enables context propagation across process boundaries (e.g., HTTP headers, message queue metadata).

A propagator extracts and injects SpanContext from/into a carrier using getter/setter functions. This abstraction enables context propagation across process boundaries (e.g., HTTP headers, message queue metadata).

Attributes

Source
Propagator.scala
Supertypes
class Object
trait Matchable
class Any
Known subtypes

W3C TraceContext propagator implementing the traceparent/tracestate headers.

W3C TraceContext propagator implementing the traceparent/tracestate headers.

traceparent format: {version:2hex}-{trace-id:32hex}-{span-id:16hex}-{flags:2hex} Only version "00" is supported.

Attributes

See also
Source
W3CTraceContextPropagator.scala
Supertypes
trait Propagator
class Object
trait Matchable
class Any
Self type