Observability
Monitor Excalibur applications with OpenTelemetry, health checks, and integrations.
Start here
The Production Observability Guide explains which metrics matter, what to alert on, and how to build dashboards that tell you something useful.
Before You Start
- .NET 8.0+ (or .NET 9/10 for latest features)
- Install the required package:
dotnet add package Excalibur.Dispatch - For cloud-specific instrumentation, install the provider package (e.g.,
Excalibur.Dispatch.Observability) - Familiarity with OpenTelemetry concepts and Dispatch pipeline
Monitoring Integrations
| Platform | Guide | Description |
|---|---|---|
| Telemetry Configuration | Setup | Configure OpenTelemetry meters and tracing |
| Metric Naming Conventions | Reference | Meter and instrument naming patterns |
| Metrics Reference | Reference | Complete metrics catalog |
| Health Checks | Built-in | Application health monitoring |
| Azure Monitor | Cloud | Azure Application Insights |
| AWS CloudWatch | Cloud | AWS monitoring and logging |
| Google Cloud | Cloud | GCP monitoring |
| Datadog | APM | Datadog integration |
| Grafana | Dashboards | Pre-built dashboards |
OpenTelemetry
Dispatch provides native OpenTelemetry support for distributed tracing and metrics. Use the UseOpenTelemetry() convenience method to enable both:
builder.Services.AddDispatch(dispatch =>
{
dispatch.UseOpenTelemetry(); // Enables tracing + metrics (recommended)
});
Or enable them individually for more control:
builder.Services.AddDispatch(dispatch =>
{
dispatch.UseTracing(); // Distributed tracing only
dispatch.UseMetrics(); // Metrics only
});
This registers:
- TracingMiddleware - Creates OpenTelemetry spans for each message
- MetricsMiddleware - Records processing duration, success/failure counts
- IDispatchMetrics - Meter definitions for
Excalibur.Dispatch.Core
Meter Registration
Register all framework meters at once using the convenience methods:
builder.Services.AddOpenTelemetry()
.AddAllDispatchMetrics()
.AddAllDispatchTracing();
Or register selectively using meter name patterns:
builder.Services.AddOpenTelemetry()
.WithMetrics(metrics =>
{
metrics.AddMeter("Excalibur.Dispatch.*"); // Core, circuit breaker, streaming
metrics.AddMeter("Excalibur.Dispatch.Transport.*"); // Transport-layer metrics (Kafka, RabbitMQ, etc.)
metrics.AddMeter("Excalibur.Data.*"); // Persistence, CDC, audit metrics
metrics.AddMeter("Excalibur.EventSourcing.*"); // Event store metrics
});
See Telemetry Configuration for the full setup guide and Metrics Reference for the complete catalog of 100+ metrics.
Related Documentation
- Deployment - Deployment guides with monitoring setup
- Security - Security monitoring
See Also
- Telemetry Configuration - Configure OpenTelemetry metrics and tracing registration
- Metric Naming Conventions - Meter and instrument naming patterns across packages
- Metrics Reference - Complete catalog of 100+ available metrics
- Health Checks - Application health monitoring for load balancers and orchestrators
- Production Observability Guide - Which metrics matter, what to alert on, and dashboard patterns