Cloud Observability
Sagaweaw emits OpenTelemetry spans automatically for every saga lifecycle event. If you already have an OTel-compatible backend configured — Grafana Cloud, Datadog, New Relic, Honeycomb, Jaeger — the spans appear there with no extra code.
How it works
Sagaweaw uses the Micrometer Observation API (Spring Boot 4.x: spring-boot-starter-opentelemetry). When OTel is on the classpath, every saga and step emits a span automatically:
saga.started saga.name=pix-payment saga.id=f3a9b2c1
saga.step.invoke saga.step.name=charge-payment saga.step.attempt=1
saga.step.failed saga.step.name=charge-payment
saga.step.compensating
saga.compensated
You configure where those spans go — Sagaweaw doesn't care which backend you use.
Grafana Cloud (free forever — 10k metrics, 50GB logs)
Step 1 — Add OTel to your project
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-opentelemetry</artifactId>
</dependency>
Step 2 — Set environment variables
Get your OTLP endpoint and token from grafana.com/products/cloud (free account, no credit card):
# application.properties
management.tracing.sampling.probability=1.0
OTEL_SERVICE_NAME=my-service
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp-gateway-prod-us-east-0.grafana.net/otlp
OTEL_EXPORTER_OTLP_HEADERS=Authorization=Basic <your-base64-token>
Step 3 — Start the application
Saga spans appear in Grafana Tempo immediately. No code changes.
Datadog
OTEL_SERVICE_NAME=my-service
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.datadoghq.com
OTEL_EXPORTER_OTLP_HEADERS=DD-API-KEY=<your-api-key>
New Relic (free tier — 100GB/month)
OTEL_SERVICE_NAME=my-service
OTEL_EXPORTER_OTLP_ENDPOINT=https://otlp.nr-data.net
OTEL_EXPORTER_OTLP_HEADERS=api-key=<your-license-key>
Honeycomb
OTEL_SERVICE_NAME=my-service
OTEL_EXPORTER_OTLP_ENDPOINT=https://api.honeycomb.io
OTEL_EXPORTER_OTLP_HEADERS=x-honeycomb-team=<your-api-key>
Jaeger (self-hosted)
OTEL_SERVICE_NAME=my-service
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
What you see in the backend
For each saga execution, your observability backend receives:
| Span | Attributes |
|---|---|
saga.started | saga.name, saga.id |
saga.step.invoke | saga.step.name, saga.step.attempt, saga.step.type |
saga.step.completed | saga.step.name, saga.step.duration_ms |
saga.step.failed | saga.step.name, error.message |
saga.step.compensating | saga.step.name |
saga.step.compensated | saga.step.name |
saga.completed | saga.name, saga.id, saga.duration_ms |
saga.compensated | saga.name, saga.id |
Disable tracing
If you don't want OTel spans from Sagaweaw:
sagaweaw.tracing.enabled=false
Prometheus + Grafana (self-hosted)
Sagaweaw also exposes Micrometer metrics automatically when micrometer-registry-prometheus is on the classpath:
# Saga success rate
rate(sagaweaw_sagas_completed_total[24h])
/ (rate(sagaweaw_sagas_completed_total[24h]) + rate(sagaweaw_sagas_failed_total[24h]))
# Dead letters pending — alert on this
sagaweaw_dead_letters_pending
A pre-built Grafana dashboard JSON is available in the dashboard UI — click the download button to get it and import into your Grafana instance in 30 seconds.