Mercure tracing
The Mercure.rocks Hub emits OpenTelemetry spans for its main internal operations:
| Span name | Kind | Description |
|---|---|---|
mercure.publish | Producer | Covers the publish flow: authorization, validation, and dispatch to the transport |
mercure.subscribe | Consumer | Covers subscription setup: authorization, history replay, and transport registration |
mercure.subscriptions | Internal | Covers requests to the subscription API (/.well-known/mercure/subscriptions/...) |
mercure.transport.history | Internal | Covers history replay from the storage transport (Bolt, Redis...) |
Mercure's spans nest under the HTTP request span produced by Caddy's tracing directive, so enable it to start collecting traces:
route {
tracing
mercure {
# ...
}
}
Exporters, endpoints (OTLP gRPC or HTTP), protocols, resource attributes, and propagators are all configured through the standard OTEL_* environment variables.
Without a configured OpenTelemetry tracer provider, Mercure uses no-op spans and exports no traces.
#Next steps
- Health checks and monitoring for Prometheus metrics and health endpoints.
- Debugging for the structured logs that complement traces.