From e76a9173f1ad8d95639521a93d00146f09e8b2ee Mon Sep 17 00:00:00 2001 From: Tulika Chaudharie Date: Thu, 21 May 2026 20:05:08 +0530 Subject: [PATCH] deleted datadog blogs --- .../2024-07-26-Using-Datadog-with-Sidecar.md | 157 ------------------ .../2025-03-19-datadog-sidecar-extension.md | 149 ----------------- 2 files changed, 306 deletions(-) delete mode 100644 _posts/2024-07-26-Using-Datadog-with-Sidecar.md delete mode 100644 _posts/2025-03-19-datadog-sidecar-extension.md diff --git a/_posts/2024-07-26-Using-Datadog-with-Sidecar.md b/_posts/2024-07-26-Using-Datadog-with-Sidecar.md deleted file mode 100644 index f31919ec8f..0000000000 --- a/_posts/2024-07-26-Using-Datadog-with-Sidecar.md +++ /dev/null @@ -1,157 +0,0 @@ ---- -title: "A Step-by-Step Guide to Datadog Integration with Linux App Service via Sidecars" -author_name: "Tulika Chaudharie" -toc: true -toc_sticky: true ---- - -In this blog post, we dive into the realms of observability and monitoring, taking advantage of the latest advancements in Azure's Linux App Service. If you've been following App Service updates, you might have caught wind of the [Public Preview for the Sidecar Pattern for Linux App Service](https://azure.github.io/AppService/2024/04/04/Public-Preview-Sidecars-Webjobs.html) announced recently. Leveraging this development, we're here to guide you through integrating Datadog, an Azure Native ISV service partner that provides a powerful observability platform, with your .NET custom container application hosted on Linux App Service. Whether you're eager to streamline log management, track application traces, or enhance request monitoring, we've got you covered. - -## Setting up your .NET application - -To get started, you'll need to containerize your .NET application. This [tutorial](https://learn.microsoft.com/en-us/dotnet/core/docker/build-container?tabs=windows&pivots=dotnet-8-0) walks you through the process step by step. - -Once your application is containerized, you can integrate the Datadog tracer. To do that, you will need to add the following lines to the Dockerfile for your main application. - -```dockerfile -# Datadog specific -RUN mkdir -p /datadog/tracer -RUN mkdir -p /home/LogFiles/dotnet - -ADD https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.49.0/datadog-dotnet-apm-2.49.0.tar.gz /datadog/tracer -RUN cd /datadog/tracer && tar -zxf datadog-dotnet-apm-2.49.0.tar.gz -``` - -This ensures that the Datadog tracer is properly installed and configured within your application container. - -Below is a sample Dockerfile incorporating Datadog integration: - -```dockerfile -# Stage 1: Build the application -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build -WORKDIR /app - -# Copy the project file and restore dependencies -COPY *.csproj ./ -RUN dotnet restore - -# Copy the remaining source code -COPY . . - -# Build the application -RUN dotnet publish -c Release -o out - -# Stage 2: Create a runtime image -FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS runtime -WORKDIR /app - -# Copy the build output from stage 1 -COPY --from=build /app/out ./ - -# Datadog specific -RUN mkdir -p /datadog/tracer -RUN mkdir -p /home/LogFiles/dotnet - -ADD https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.49.0/datadog-dotnet-apm-2.49.0.tar.gz /datadog/tracer -RUN cd /datadog/tracer && tar -zxf datadog-dotnet-apm-2.49.0.tar.gz - -# Set the entry point for the application -ENTRYPOINT ["dotnet", ".dll"] -``` - -You're now ready to build the image and push it to your preferred container registry, be it Azure Container Registry, Docker Hub, or a private registry. - -## Create your Linux Web App - -Create a new Linux Web App from the portal and choose the options for Container and Linux. - -![Create web app]({{site.baseurl}}/media/2024/07/CreateWebApp.jpg) - -On the Container tab, make sure that Sidecar support is Enabled. - -Specify the details of your application image. - -![Add Container]({{site.baseurl}}/media/2024/07/AddContainer.jpg) - -Note: Typically, .NET uses port 8080 but you can change it in your project. - -## Setup your Datadog - -If you don’t have a Datadog account, you can create an instance of Datadog on the Azure portal by following this QuickStart. - -[Create Datadog - Azure Native ISV Services](https://learn.microsoft.com/en-us/azure/partner-solutions/datadog/create) - -Alternatively, you can also create a service account on Datadog by following the steps in this tutorial. - -[Service Accounts (datadoghq.com)](https://docs.datadoghq.com/account_management/org_settings/service_accounts/) - -Datadog offers a 14 days Free Trial if you would like to try out the service. - -## AppSettings for the Datadog Integration - -You need to set the following [AppSettings](https://learn.microsoft.com/en-us/azure/app-service/configure-common?tabs=portal). - -- **DD_API_KEY** – If you have created the Datadog resource on the Azure portal, you can manage your API keys [like this](https://learn.microsoft.com/en-us/azure/partner-solutions/datadog/manage#api-keys). - - Alternatively, you can create your API Key by following the steps here [API and Application Keys](https://docs.datadoghq.com/account_management/api-app-keys/). - - We would encourage you to add sensitive information like API keys to Azure Key vault [Use Key Vault references - Azure App Service | Microsoft Learn](https://learn.microsoft.com). - -- **DD_SITE** – Datadog offers you different sites for your data. You can use `us3.datadoghq.com` as this site is hosted in Azure. Therefore, the Observability data for your application stays in Azure. You can find more information about Datadog sites [here](https://docs.datadoghq.com/getting_started/site/). - -- **DD_SERVICE**: The name of the service that would be displayed in your Datadog Service Catalog. -- **DD_ENV**: This is used to set the global environment, which allows you to differentiate data coming from various environments like staging or production. -- **DD_SERVERLESS_LOG_PATH**: This is the path where you write your application logs. Typically, this will be `/home/Logfile/*.log`, If you have changed the location for your application logs, you can specify that in this setting. -- **DD_DOTNET_TRACER_HOME**: `/datadog/tracer` -- **DD_TRACE_LOG_DIRECTORY**: `/home/Logfiles/dotnet` -- **CORECLR_ENABLE_PROFILING**: `1` -- **CORECLR_PROFILER**: `{846F5F1C-F9AE-4B07-969E-05C26BC060D8}` -- **CORECLR_PROFILER_PATH**: `/datadog/tracer/Datadog.Trace.ClrProfiler.Native.so` - -To know more about these Datadog settings, you can refer to the [documentation](https://docs.datadoghq.com/serverless/azure_app_services/azure_app_services_container/?code-lang=dotnet). - -## Add the Datadog Sidecar - -Go to the Deployment Center for your application and add a sidecar container - -![Sidecar-datadog]({{site.baseurl}}/media/2024/07/Sidecar-datadog.jpg) - -```docker -Image Source: Docker Hub and other registries -Image type: Public -Registry server URL: svlsddagent.azurecr.io -Image and tag: serverless-sidecar:latest -Port: 8126 -``` - -### Disclaimer: Datadog Image Usage - -It's important to note that the Datadog image used here is sourced directly from Datadog and is provided 'as-is.' Microsoft does not own or maintain this image. Therefore, its usage is subject to the terms of use outlined by Datadog, which can be found [here](https://www.datadoghq.com/legal/terms/). - -## Visualizing Your Observability Data in Datadog - -You are all set! You can now see your Observability data flow to Datadog backend. Take a look at the Azure serverless page for a complete view of your App Services. - -![datadog-serverless]({{site.baseurl}}/media/2024/07/datadog-serverless.jpg) - -The Service Catalog gives you an overview of each service, such as the number of requests, latency, and more. - -![Service Catalog]({{site.baseurl}}/media/2024/07/datadog-servicecatalog.png) - -You can see your application logs by going to `Logs -> Explorer` - -![Logs Explorer]({{site.baseurl}}/media/2024/07/datadog-logexplorer.png) - -Your application traces will be under `APM->Traces->Explorer` - -![Traces Explorer]({{site.baseurl}}/media/2024/07/datadog-traceexplorer.png) - -To learn more about Datadog dashboards, you can refer to the [documentation](https://docs.datadoghq.com/dashboards/). - -## Next steps - -In this guide, we've explored the seamless integration of Datadog with your .NET custom container application hosted on Linux App Service. By leveraging the Sidecar Pattern and Datadog's powerful observability platform, you can now unlock actionable insights and enhance the monitoring capabilities of your applications. - -It's important to note that Datadog, as an [Azure Native ISV Services](https://learn.microsoft.com/en-us/azure/partner-solutions/datadog/) partner, offers robust support for Azure services and environments. Our collaboration with Datadog is aimed at providing you with even closer and simplified integration experiences in the future. - -Stay tuned for upcoming guides where we'll delve into integrating Datadog with code-based web applications and other language stacks like NodeJS and Python. diff --git a/_posts/2025-03-19-datadog-sidecar-extension.md b/_posts/2025-03-19-datadog-sidecar-extension.md deleted file mode 100644 index b97d349edd..0000000000 --- a/_posts/2025-03-19-datadog-sidecar-extension.md +++ /dev/null @@ -1,149 +0,0 @@ ---- -title: "Using Datadog as a Sidecar Extension for Azure App Service on Linux" -author_name: "Tulika Chaudharie" -toc: true -toc_sticky: true ---- - -Monitoring your applications is crucial for performance and reliability. With **Datadog as a sidecar extension**, you can seamlessly collect logs, metrics, and traces from your application—without modifying your app code. - -In this blog, we’ll explore how to set it up in just a few steps. Let’s get started! - - -## Configuring the Application to Use Datadog - -### For Code-Based Applications - -If you’re deploying a code-based application, you’ll need to setup a **startup script** to download and initialize the Datadog tracer when the application starts. We have a sample .NET app [here](https://github.com/Azure-Samples/sidecar-samples/tree/main/devShopDNC). You can use this sample or follow the steps for your own application. - -#### 1. Create a Startup File - -For .NET applications, create a **`startup.sh`** script in the same folder as your application. This script ensures the **Datadog tracer** is downloaded and extracted before launching your app: - -```bash -#!/bin/bash - -# Create directories for Datadog tracer and .NET logs -mkdir -p /datadog/tracer -mkdir -p /home/LogFiles/dotnet - -# Download the Datadog tracer tarball -wget -O /datadog/tracer/datadog-dotnet-apm-2.49.0.tar.gz https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.49.0/datadog-dotnet-apm-2.49.0.tar.gz - -# Navigate to the tracer directory, extract the tarball, and return to the original directory -pushd /datadog/tracer -tar -zxf datadog-dotnet-apm-2.49.0.tar.gz -popd - -dotnet /home/site/wwwroot/.dll -``` - -Ensure this **`startup.sh`** file is included in your application’s root directory. If you are using the sample application, we have a startup file available [here](https://github.com/Azure-Samples/sidecar-samples/blob/main/devShopDNC/devShopDNC/startup.sh) - -#### 2. Deploy to Azure App Service - -Follow these steps to deploy your application with Datadog: - -1. **Create a .NET 8 Linux App Service** in the Azure Portal. - - ![Create web app]({{site.baseurl}}/media/2025/03/create-code-based-app.jpg) - -2. **Set up CI/CD with GitHub** to automate deployments. You can follow the [GitHub Actions guide for Azure App Service](https://learn.microsoft.com/en-us/azure/app-service/deploy-github-actions?tabs=openid%2Caspnetcore). - > *Note: Sidecars for code-based applications currently support only GitHub Actions. Other deployment methods will be available soon.* - -3. **Push your application code** to your GitHub repository. - -4. In the **Azure Portal**, go to **Your Web App → Configuration** and set the **Startup Command** to: - - ```bash - /home/wwwroot/startup.sh - ``` - -### For container-based applications - -1. Use the Dockerfile in your repository to build a container image of your application. In the Dockerfile, download and extract the Datadog tracer. We have a sample Dockerfile [here](https://github.com/Azure-Samples/sidecar-samples/blob/main/devShopDNC/devShopDNC/Dockerfile) - -2. Build the image and push it to your preferred container registry, such as Azure Container Registry, Docker Hub, or a private registry. - -3. Go to the Azure Portal and create a container-based App Service. - - ![Create web app]({{site.baseurl}}/media/2024/07/CreateWebApp.jpg) - - On the Container tab, make sure that Sidecar support is Enabled. - - Specify the details of your application image. - - ![Create web app]({{site.baseurl}}/media/2025/03/add-container.jpg) - - *Note: We strongly recommend enabling [Managed Identity](https://learn.microsoft.com/azure/app-service/overview-managed-identity?tabs=portal%2Chttp) for your Azure resources.* - -## Setup your Datadog Account - -If you don’t have a Datadog account, you can create an instance of Datadog on the Azure portal by following this QuickStart. - -[Create Datadog - Azure Native ISV Services](https://learn.microsoft.com/en-us/azure/partner-solutions/datadog/create) - -Alternatively, you can also create a service account on Datadog by following the steps in this tutorial. - -[Service Accounts (datadoghq.com)](https://docs.datadoghq.com/account_management/org_settings/service_accounts/) - -Datadog offers a 14 days Free Trial if you would like to try out the service. - -## Add the Datadog sidecar extension - -Once your application is deployed, follow these steps to enable the Datadog sidecar extension: - -1. Navigate to the **Azure Portal** and open your **App Service** resource. -2. Go to **Deployment Center** in the left-hand menu and navigate to the **Containers** tab. - - *Note: You might see a banner which says ***Interested in adding containers to run alongside your app? Click here to give it a try***. Clicking on the banner will enable the new Containers experience for you.* - -3. Add the Datadog sidecar extension like this - - ![Datadog Sidecar]({{site.baseurl}}/media/2025/03/add-datadog.jpg) - - These are the Datadog settings that you would have to add - - - **Name** - Name for your Site extension. This could be anything you choose. - - - **Datadog API Key** – If you have created the Datadog resource on the Azure portal, you can manage your API keys [like this](https://learn.microsoft.com/en-us/azure/partner-solutions/datadog/manage#api-keys). - - Alternatively, you can create your API Key by following the steps here [API and Application Keys](https://docs.datadoghq.com/account_management/api-app-keys/). - - We would encourage you to add sensitive information like API keys to Azure Key vault [Use Key Vault references - Azure App Service | Microsoft Learn](https://learn.microsoft.com). - - - **Datadog Site URL** – Datadog offers you different sites for your data. You can use `us3.datadoghq.com` as this site is hosted in Azure. Therefore, the Observability data for your application stays in Azure. You can find more information about Datadog sites [here](https://docs.datadoghq.com/getting_started/site/). - - - **Datadog Service Name**: The name of the service that would be displayed in your Datadog Service Catalog. - - **Datadog Environment**: This is used to set the global environment, which allows you to differentiate data coming from various environments like staging or production. - - **Datadog Application Logs path**: This is the path where you write your application logs. Typically, this will be `/home/LogFiles/*.log`, If you have changed the location for your application logs, you can specify that in this setting. - - **Datadog Trace Log Directory**: `/home/LogFiles/dotnet` - - -### Disclaimer: Datadog Image Usage - -It's important to note that the Datadog image used here is sourced directly from Datadog and is provided 'as-is.' Microsoft does not own or maintain this image. Therefore, its usage is subject to the terms of use outlined by Datadog, which can be found [here](https://www.datadoghq.com/legal/terms/). - -## Visualizing Your Observability Data in Datadog - -You are all set! You can now see your Observability data flow to Datadog backend. Take a look at the Azure serverless page for a complete view of your App Services. - -![datadog-serverless]({{site.baseurl}}/media/2024/07/datadog-serverless.jpg) - -The Service Catalog gives you an overview of each service, such as the number of requests, latency, and more. - -![Service Catalog]({{site.baseurl}}/media/2024/07/datadog-servicecatalog.png) - -You can see your application logs by going to `Logs -> Explorer` - -![Logs Explorer]({{site.baseurl}}/media/2024/07/datadog-logexplorer.png) - -Your application traces will be under `APM->Traces->Explorer` - -![Traces Explorer]({{site.baseurl}}/media/2024/07/datadog-traceexplorer.png) - -To learn more about Datadog dashboards, you can refer to the [documentation](https://docs.datadoghq.com/dashboards/). - -## Try It Out with a Sample Python App - -If you want to try the Datadog sidecar extension with a Python application, we have a sample available [here](https://github.com/Azure-Samples/sidecar-samples/tree/main/datadog-python-sample).