Skip to content

Commit 2aa5bf0

Browse files
authored
Update durable-functions-diagnostics.md
1 parent dcc6e07 commit 2aa5bf0

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

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

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,36 @@ Clients will get the following response:
538538
> [!WARNING]
539539
> 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.
540540
541+
## Distributed Tracing
542+
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 where an application is having an issue or where an exception was thrown. This feature is supported for all languages and storage providers.
543+
544+
> [!NOTE]
545+
> This is a preview feature so there are some features that are not supported. For example, Durable entities are not supported yet.
546+
547+
### Setting up Distributed Tracing
548+
To set up distributed tracing, please update the host.json and set up an Application Insights resource.
549+
550+
#### host.json
551+
```
552+
"durableTask": {
553+
"tracing": {
554+
"DistributedTracingEnabled": true,
555+
"Version": "V2"
556+
}
557+
}
558+
```
559+
560+
#### Application Insights
561+
Create an Application Insights resource and set the connection string as a value for `APPLICATIONINSIGHTS_CONNECTION_STRING`.
562+
563+
### Inspecting the traces
564+
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.
565+
566+
![Application Insights Distributed Trace Gantt Chart](./media/durable-functions-diagnostics/app-insights-distributed-trace-gantt-chart.png)
567+
568+
### Troubleshooting
569+
If you don't see the traces in Application Insights, please make sure to wait about five minutes after running the application to make sure all of the data propagated to the Application Insights resource.
570+
541571
## Debugging
542572

543573
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:

0 commit comments

Comments
 (0)