Azure Container Apps

Overview

Azure Container Apps is a fully managed serverless platform for deploying and scaling container-based applications. Datadog provides monitoring and log collection for Container Apps through the Azure integration. Datadog also provides a solution, now in beta, for instrumenting your Container Apps applications with a purpose-built Agent to enable tracing, custom metrics, and direct log collection.

This feature is in beta. You can provide feedback through your standard support channels. During the beta period, Container Apps monitoring and APM tracing are available without a direct cost. Existing APM customers may incur increased span ingestion and volume costs.

Tracing and custom metrics

Build your container

If you are using a Dockerfile to build your application, complete the following:

  1. Instrument your application with a supported Datadog tracing library.

  2. Use the COPY instruction to copy the Datadog serverless-init binary into your Docker image.

  3. Use the ENTRYPOINT instruction to run the serverless-init binary as your Docker container is initiated.

  4. Use the CMD instruction to run your existing application and other required commands as arguments.

The following are examples of how to complete these three steps. You may need to adjust these examples depending on your existing Dockerfile setup.

COPY --from=datadog/serverless-init:latest /datadog-init /app/datadog-init
ENTRYPOINT ["/app/datadog-init"]
CMD ["/path/to/your-go-binary"] (adapt this line to your needs)

See Tracing Go Applications for more details. Sample code for a simple Go application.

COPY --from=datadog/serverless-init:latest /datadog-init /app/datadog-init
ENTRYPOINT ["/app/datadog-init"]
CMD ["ddtrace-run", "python", "app.py"] (adapt this line to your needs)

See Tracing Python Applications for detailed instructions. Sample code for a simple Python application.

COPY --from=datadog/serverless-init:latest /datadog-init /app/datadog-init
ENTRYPOINT ["/app/datadog-init"]
CMD ["/nodejs/bin/node", "/path/to/your/app.js"] (adapt this line to your needs)

See Tracing Node.js Applications for detailed instructions. Sample code for a simple Node.js application.

COPY --from=datadog/serverless-init:latest /datadog-init /app/datadog-init
ENTRYPOINT ["/app/datadog-init"]
CMD ["./mvnw", "spring-boot:run"] (adapt this line to your needs)

See Tracing Java Applications for detailed instructions. Sample code for a simple Java application.

COPY --from=datadog/serverless-init:beta4 /datadog-init /app/datadog-init
ENTRYPOINT ["/app/datadog-init"]
CMD ["dotnet", "helloworld.dll"] (adapt this line to your needs)

See Tracing .NET Applications for detailed instructions.

COPY --from=datadog/serverless-init:beta4 /datadog-init /app/datadog-init
ENTRYPOINT ["/app/datadog-init"]
CMD ["rails", "server", "-b", "0.0.0.0"] (adapt this line to your needs)

See Tracing Ruby Applications for detailed instructions. Sample code for a simple Ruby application.

Custom metrics

You can submit custom metrics using a DogStatsd client.

Note: Only DISTRIBUTION metrics should be used.

Advanced options and configurations

Environment variables

VariableDescription
DD_SITEDatadog site.
DD_LOGS_ENABLEDWhen true, send logs (stdout and stderr) to Datadog. Defaults to false.
DD_SERVICESee Unified Service Tagging.
DD_VERSIONSee Unified Service Tagging.
DD_ENVSee Unified Service Tagging.
DD_SOURCESee Unified Service Tagging.
DD_TAGSSee Unified Service Tagging.

Log collection

You can use the Azure integration to collect logs. Alternatively, you can set the DD_LOGS_ENABLED environment variable to true to capture application logs through the Agent.

Further reading

Additional helpful documentation, links, and articles: