Distributed tracing sample for Azure Durable Functions
To create the virtual environment start by doing a poetry install
poetry install
In case you don't already have a Application Insights provisioned, you can use the make file to do so with.
Copy the file .env.sample
to be .env
at the root of the repository.
Used for the provisioning are the ENV_LOCATION
and ENV_PROJECT_NAME
, which are pre-populated with default values and can be replaced if needed.
FUNCTION_URL=http://localhost:7071/api/handlers
APPLICATIONINSIGHTS_CONNECTION_STRING=
ENV_LOCATION="westeurope"
ENV_PROJECT_NAME="func-spike"
In the .env
at the root of the repository make sure the following section ar populated with the correct connection string.
APPLICATIONINSIGHTS_CONNECTION_STRING=<connection-string>
To run the sample API use the following make command:
make serve
- Install VSCode extension(Azure market place: Azurite)
- Run Azurite (VSCode Extension Commands)
In the function
directory create a local.settings.json
with the following content:
{
"IsEncrypted": false,
"Values": {
"FUNCTIONS_WORKER_RUNTIME": "python",
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"APPLICATIONINSIGHTS_CONNECTION_STRING":"<Connection-String>"
}
}
Run the function use the following make command:
make start-func