Pure ergonomics for tracing — the with-span macro. Depends only on the
tracing port; the side effects happen in the tracer the macro is handed.
Pure ergonomics for tracing — the `with-span` macro. Depends only on the tracing port; the side effects happen in the tracer the macro is handed.
Ports for distributed tracing.
A minimal, backend-agnostic span/tracer abstraction. Feature code depends on
ITracer (via the wagoe.observability.tracing.core/with-span sugar) and
never on a concrete backend. The default adapter is no-op; a :logging
adapter records spans to the log; an OTLP adapter (OpenTelemetry) is wired
behind the same port so any OTel backend (SigNoz, Grafana Tempo, Jaeger, …)
works by pointing at its collector.
A span is an opaque handle returned by start-span! and passed back to the
other methods. No-op adapters may return a sentinel; real adapters return
whatever they need to correlate + finish the span.
Ports for distributed tracing. A minimal, backend-agnostic span/tracer abstraction. Feature code depends on `ITracer` (via the `wagoe.observability.tracing.core/with-span` sugar) and never on a concrete backend. The default adapter is no-op; a `:logging` adapter records spans to the log; an OTLP adapter (OpenTelemetry) is wired behind the same port so any OTel backend (SigNoz, Grafana Tempo, Jaeger, …) works by pointing at its collector. A `span` is an opaque handle returned by `start-span!` and passed back to the other methods. No-op adapters may return a sentinel; real adapters return whatever they need to correlate + finish the span.
Malli schemas for tracing configuration.
Malli schemas for tracing configuration.
Logging tracer: records spans to the log (start, end + duration, events, exceptions). Useful for local development and for seeing the trace shape without standing up an OpenTelemetry collector. Not a sampled/exportable tracer — for real distributed tracing use the OTLP adapter.
A span carries a generated trace-id/span-id, a start timestamp, and an atom
of accumulated attributes so set-attributes! calls made mid-span are folded
in and appear on the final span.end line (matching how a real backend
mutates its span object).
Logging tracer: records spans to the log (start, end + duration, events, exceptions). Useful for local development and for seeing the trace shape without standing up an OpenTelemetry collector. Not a sampled/exportable tracer — for real distributed tracing use the OTLP adapter. A span carries a generated trace-id/span-id, a start timestamp, and an atom of accumulated attributes so `set-attributes!` calls made mid-span are folded in and appear on the final `span.end` line (matching how a real backend mutates its span object).
No-op tracer: satisfies ITracer but records nothing. The default, so feature code can use the tracing port even when tracing is disabled.
No-op tracer: satisfies ITracer but records nothing. The default, so feature code can use the tracing port even when tracing is disabled.
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`.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |