My current organization is migrating to DataDog for Application Performance Monitoring. I am deploying a Python Flask web application using docker to Azure Container Registry. After the deployment to Azure the app should be listed/available on Datadog portal.
Please note I just started learning Docker containers. There is a high chance I could do completely wrong. Please bear with me
Steps followed
Option 1: Create a docker container on local machine and push to ACR
Added
dd-tracepython library to the docker imageAdded dd-trace run command the docker file
build the image
run the container on local
Getting OSError: [Errno 99] Cannot assign requested address
FROM python:3.7 ENV VIRTUAL_ENV=/opt/venv RUN python -m venv $VIRTUAL_ENV ENV PATH="$VIRTUAL_ENV/bin:$PATH" ENV DD_API_KEY=apikeyfromdatadoghq ENV DD_ENV=safhire-dev ENV DD_LOGS_ENABLED=true ENV DD_LOGS_INJECTION=true ENV DD_SERVICE=dev-az1-pythonbusinessservice ENV DD_TAGS=products:myprojects ENV DD_TRACE_DEBUG=true ENV DD_TRACE_ENABLED=true ENV DOCKER_ENABLE_CI=true COPY /app /app COPY requirements.txt / RUN pip install --no-cache-dir -U pip RUN pip install --no-cache-dir -r /requirements.txt CMD ddtrace-run python app/main.py runserver 127.0.0.1:3000
Option 2: Forward logs to Azure Blob Storage but a heavy process
- Deploy Python using Code base Linux
- Forward the logs to a Azure Blob storage
- Create a BlobTrigger Azure Function to forward the logs to DataDogAPI
- I believe with this approach we can not capture APM logs but, we can capture application and console logs
Option 3: using Serilog but, my organization does not want to use third party logging framework, we have our own logging framework
Any help is highly appreciated, I am looking for a solution using Option 1. I went through the Microsoft articles, Datadog documentation but, no luck.
I setup app registrations, Manage reader permissions on Subscription, created ClientID and app secrets on Azure portal. none of them helped
Could you confirm whether is there a way to collect the APM logs on datadog with out installing agent on Azure.
Thank you in advance.