Skip to content

Commit afcf084

Browse files
authored
Merge pull request #263303 from bachuv/vabachu/distributed-tracing-v2
Add Durable Functions Distributed Tracing V2 section
2 parents 4080b59 + aa445c2 commit afcf084

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

articles/azure-functions/durable/durable-functions-diagnostics.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,38 @@ Clients will get the following response:
539539
> [!WARNING]
540540
> The custom status payload is limited to 16 KB of UTF-16 JSON text because it needs to be able to fit in an Azure Table Storage column. You can use external storage if you need larger payload.
541541
542+
## Distributed Tracing
543+
544+
Distributed Tracing tracks requests and shows how different services interact with each other. In Durable Functions, it also correlates orchestrations and activities together. This is helpful to understand how much time steps of the orchestration take relative to the entire orchestration. It is also useful to understand where an application is having an issue or where an exception was thrown. This feature is supported for all languages and storage providers.
545+
546+
> [!NOTE]
547+
> Distributed Tracing V2 requires [Durable Functions v2.12.0](https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.DurableTask/2.12.0) or greater. Also, Distributed Tracing V2 is in a preview state and therefore some Durable Functions patterns are not instrumented. For example, Durable Entities operations are not instrumented and traces will not show up in Application Insights.
548+
549+
### Setting up Distributed Tracing
550+
551+
To set up distributed tracing, please update the host.json and set up an Application Insights resource.
552+
553+
#### host.json
554+
```
555+
"durableTask": {
556+
"tracing": {
557+
"distributedTracingEnabled": true,
558+
"Version": "V2"
559+
}
560+
}
561+
```
562+
563+
#### Application Insights
564+
If the Function app is not configured with an Application Insights resource, then please configure it following the instructions [here](../configure-monitoring.md#enable-application-insights-integration).
565+
566+
### Inspecting the traces
567+
In the Application Insights resource, navigate to **Transaction Search**. In the results, check for `Request` and `Dependency` events that start with Durable Functions specific prefixes (e.g. `orchestration:`, `activity:`, etc.). Selecting one of these events will open up a Gantt chart that will show the end to end distributed trace.
568+
569+
[![Gantt Chart showing Application Insights Distributed Trace.](./media/durable-functions-diagnostics/app-insights-distributed-trace-gantt-chart.png)](./media/durable-functions-diagnostics/app-insights-distributed-trace-gantt-chart.png#lightbox)
570+
571+
### Troubleshooting
572+
If you don't see the traces in Application Insights, please make sure to wait about five minutes after running the application to ensure that all of the data is propagated to the Application Insights resource.
573+
542574
## Debugging
543575

544576
Azure Functions supports debugging function code directly, and that same support carries forward to Durable Functions, whether running in Azure or locally. However, there are a few behaviors to be aware of when debugging:
Loading

0 commit comments

Comments
 (0)