Skip to content

Latest commit

 

History

History

README.md

Distributed Tracing with Durable Functions

.NET | Durable Functions

Description

This sample demonstrates how to enable distributed tracing in Durable Functions using the Durable Task Scheduler backend. It shows the end-to-end trace correlation across orchestrators, activities, and HTTP triggers — viewable in both Jaeger (local) and Application Insights (Azure).

Prerequisites

  1. .NET 8 SDK or later
  2. Docker
  3. Azure Functions Core Tools v4+

Quick Run (Local with Jaeger)

  1. Start the infrastructure:

    docker compose up -d
  2. Run the function app:

    func start
  3. Trigger an orchestration:

    curl -X POST http://localhost:7071/api/StartOrchestration
  4. View traces:

Key Configuration

Distributed tracing is enabled in host.json:

{
  "extensions": {
    "durableTask": {
      "tracing": {
        "distributedTracingEnabled": true,
        "version": "V2"
      }
    }
  }
}

Using with Application Insights (Azure)

When deployed to Azure with Application Insights configured:

  1. Navigate to your Application Insights resource
  2. Go to Transaction Search
  3. Filter for events with Durable Functions prefixes (orchestration:, activity:)
  4. Click on an event to see the Gantt chart showing the full orchestration flow

Learn More