| Language | C# (.NET 8) |
| SDK | Durable Task SDK |
This sample shows how to wire up OpenTelemetry with the Durable Task SDK to visualize orchestration flows in Jaeger. It demonstrates trace correlation across an orchestrator, activities, and sub-orchestrations so you can see the full distributed trace of an order-processing workflow.
docker compose up -dThis launches:
- DTS Emulator on
localhost:8080(gRPC) andlocalhost:8082(Dashboard) - Jaeger on
localhost:16686(UI),localhost:4317(OTLP gRPC), andlocalhost:4318(OTLP HTTP)
dotnet run --project WorkerIn a separate terminal:
dotnet run --project Client- Open the Jaeger UI at http://localhost:16686
- Select the durable-worker service from the dropdown
- Click Find Traces
- Click on a trace to see the full span tree — you'll see the orchestrator span with child spans for each activity (
ValidateOrder,ProcessPayment,ShipOrder,SendNotification)
You can also view the orchestration status in the DTS Dashboard at http://localhost:8082.
The worker registers the Microsoft.DurableTask activity source with OpenTelemetry and exports spans via OTLP to Jaeger. The Durable Task SDK automatically creates spans for orchestrations and activities, so you get distributed tracing out of the box.
Key configuration in Worker/Program.cs:
builder.Services.AddOpenTelemetry()
.ConfigureResource(resource => resource.AddService("durable-worker"))
.WithTracing(tracing =>
{
tracing
.AddSource("Microsoft.DurableTask")
.AddOtlpExporter();
});docker compose downSee docs/observability.md for more details on observability with the Durable Task Scheduler.