Skip to content

Mercure tracing

The Mercure.rocks Hub emits OpenTelemetry spans for its main internal operations:

Span nameKindDescription
mercure.publishProducerCovers the publish flow: authorization, validation, and dispatch to the transport
mercure.subscribeConsumerCovers subscription setup: authorization, history replay, and transport registration
mercure.subscriptionsInternalCovers requests to the subscription API (/.well-known/mercure/subscriptions/...)
mercure.transport.historyInternalCovers 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