Dynatrace offers a default package (in python) which enables forwarding logs from an eventhub to their platform. Here is their documentation about it.
I am using an existing python azure function in which I want to deploy it to using Azure DevOps yaml pipeline.
Write-Host 'Downloading'
wget "${{ parameters.logForwarderPackageUrl }}" -O "log-forwarder.zip"
Write-Host 'Deploying'
az webapp deployment source config-zip `
--resource-group "${{ parameters.resourceGroup }}" `
--name "logforwarder-dev" `
--src "log-forwarder.zip"
The azure function has a configuration setting SCM_DO_BUILD_DURING_DEPLOYMENT
set to true
.
I also have tried az functionapp deployment...
but this sets the SCM_DO_BUILD_DURING_DEPLOYMENT
to false
for some reason.
The problem is that deployment is successful but somehow the package isn't running. This is the output of the script:
WARNING: Getting scm site credentials for zip deployment
WARNING: Starting zip deployment. This operation can take a while to complete ...
WARNING: Deployment endpoint responded with status code 202
Does anyone know what I have been missing or what I have to check to see why the python script isn't running/deploying?
For what I can tell, all essential files are deployed.
I do not have enough experience with Python to see my issue. Please help.
The problem is solved by having the correct runtime configured in the function app.
I previously set the
pythonVersion
in siteConfig to3.11
but that didn't work. Now I uselinuxFxVersion
Python|3.11
which does seem to work.This is the bicep I am now using.