Liking cljdoc? Tell your friends :D

wagoe.observability.tracing.shell.adapters.otlp

OpenTelemetry OTLP tracer: real, exportable distributed tracing behind the ITracer port. Spans are exported over OTLP/HTTP (protobuf) to any OpenTelemetry collector — SigNoz, Grafana Tempo, Jaeger, Honeycomb, or a Datadog OTel endpoint. Only the endpoint changes; there is no backend-specific code here (that is the whole point of OTLP).

Transport is OTLP/HTTP protobuf via the okhttp sender bundled with opentelemetry-exporter-otlp. gRPC is intentionally not bundled (it would add grpc-netty to every app's classpath) — use :protocol :http/protobuf.

Context propagation uses W3C traceparent, so nested with-span calls and spans started on the current thread become parent/child automatically. The span handle returned by start-span! is the OpenTelemetry Span.

OpenTelemetry OTLP tracer: real, exportable distributed tracing behind the
`ITracer` port. Spans are exported over OTLP/HTTP (protobuf) to any
OpenTelemetry collector — SigNoz, Grafana Tempo, Jaeger, Honeycomb, or a
Datadog OTel endpoint. Only the endpoint changes; there is no backend-specific
code here (that is the whole point of OTLP).

Transport is OTLP/HTTP protobuf via the okhttp sender bundled with
`opentelemetry-exporter-otlp`. gRPC is intentionally not bundled (it would add
grpc-netty to every app's classpath) — use `:protocol :http/protobuf`.

Context propagation uses W3C `traceparent`, so nested `with-span` calls and
spans started on the current thread become parent/child automatically. The
span handle returned by `start-span!` is the OpenTelemetry `Span`.
raw docstring

->attributesclj

(->attributes m)

Convert a Clojure map into OpenTelemetry Attributes. Keys become strings; values are typed by class (string/long/double/boolean), anything else is stringified. nil or empty yields empty Attributes.

Convert a Clojure map into OpenTelemetry `Attributes`. Keys become strings;
values are typed by class (string/long/double/boolean), anything else is
stringified. `nil` or empty yields empty Attributes.
sourceraw docstring

build-sdkclj

(build-sdk {:keys [endpoint service-name timeout-ms headers]
            :or {endpoint "http://localhost:4318"
                 service-name "wagoe"
                 timeout-ms 10000}})

Build an OpenTelemetrySdk with a batch OTLP/HTTP span exporter. Returns the sdk (hold it to flush/shutdown on halt).

Build an `OpenTelemetrySdk` with a batch OTLP/HTTP span exporter. Returns the
sdk (hold it to flush/shutdown on halt).
sourceraw docstring

create-tracerclj

(create-tracer)
(create-tracer config)
source

create-tracing-componentclj

(create-tracing-component)
(create-tracing-component config)

Build the OTLP tracer component (wiring entry point; mirrors the no-op / logging adapters). Validates config, stands up the OpenTelemetry SDK, and returns an OtlpTracer.

Build the OTLP tracer component (wiring entry point; mirrors the no-op /
logging adapters). Validates config, stands up the OpenTelemetry SDK, and
returns an `OtlpTracer`.
sourceraw docstring

sdk-from-processorclj

(sdk-from-processor processor service-name)

Build an OpenTelemetrySdk around an arbitrary SpanProcessor with a W3C-propagating tracer provider tagged service.name. Production wraps a batch OTLP exporter; tests inject a simple in-memory processor.

Build an `OpenTelemetrySdk` around an arbitrary `SpanProcessor` with a
W3C-propagating tracer provider tagged `service.name`. Production wraps a
batch OTLP exporter; tests inject a simple in-memory processor.
sourceraw docstring

shutdown!clj

(shutdown! tracer)
(shutdown! tracer timeout-ms)

Flush + shut down the tracer's SDK (call on Integrant halt). Blocks up to timeout-ms for the batch processor to drain.

Flush + shut down the tracer's SDK (call on Integrant halt). Blocks up to
`timeout-ms` for the batch processor to drain.
sourceraw docstring

tracer-from-sdkclj

(tracer-from-sdk sdk)

Wrap a built OpenTelemetrySdk as an OtlpTracer.

Wrap a built `OpenTelemetrySdk` as an `OtlpTracer`.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close