This directory contains samples demonstrating telemetry integration with different distributed tracing providers for Durable Task applications.
Distributed tracing allows you to monitor and debug orchestrations across your entire application stack. These samples show how to configure various telemetry exporters.
| Sample | Description |
|---|---|
| OpenTelemetry | Integration with OpenTelemetry for vendor-neutral distributed tracing |
| ApplicationInsights | Integration with Azure Application Insights |
The OpenTelemetry sample demonstrates how to configure distributed tracing with multiple exporters including Console, Application Insights, and Zipkin.
using var tracerProvider = Sdk.CreateTracerProviderBuilder()
.SetResourceBuilder(ResourceBuilder.CreateDefault().AddService("MySample"))
.AddSource("DurableTask.Core")
.AddConsoleExporter()
.AddZipkinExporter()
.AddAzureMonitorTraceExporter(options =>
{
options.ConnectionString = Environment.GetEnvironmentVariable("AZURE_MONITOR_CONNECTION_STRING");
})
.Build();See the OpenTelemetry README for detailed setup instructions.
The Application Insights sample demonstrates direct integration with Azure Application Insights without OpenTelemetry.
services.AddApplicationInsightsTelemetryWorkerService();
services.TryAddEnumerable(
ServiceDescriptor.Singleton<ITelemetryModule, DurableTelemetryModule>());- .NET 6.0 SDK or later
- Azure Storage Emulator (Azurite) or Azure Storage account
- (Optional) Application Insights resource
- (Optional) Zipkin instance for OpenTelemetry sample