This end-to-end PowerShell sample demonstrates distributed tracing with OpenTelemetry across multiple Azure Functions in a functionapp using Durable Functions.
- PowerShell >= 7.4
- Azure Functions Core Tools
- An OTEL-compatible endpoint
-
Clone the repository:
git clone https://github.com/Azure-Samples/functions-quickstart-powershell-azd-otel.git cd functions-quickstart-powershell-azd-otel -
Run build.ps1:
cd src ./build.ps1 ```
-
Configure your OTEL endpoint:
- Update the environment variables in local.settings.json to point to your OTEL collector endpoint. You will need to add these settings to your functionapp's environment after deployment as well.
-
Invoke the functions
- Start a Durable orchestration by sending a GET request to the StartDurableOrchestration HTTP URL exposed by the functionapp, either in Core Tools or Azure.
- This sample demonstrates tracing across multiple Durable function invocations, including an HTTP starter function, orchestrations and activities. Additional telemetry filtering may be necessary to reduce the volume of Azure Storage operations performed by Durable Functions.
- This sample uses the standalone PowerShell SDK
AzureFunctions.PowerShell.Durable.SDK - This sample uses an OTLP collector endpoint because exporting OpenTelemetry + Distributed Tracing to Application Insights is currently not supported in PowerShell