---
title: "Use Application Insights Logging for Tenant Service"
slug: "use-application-insights-logging-for-tenant-service"
abstract: "How to log all Tenant Service activities and exceptions into the Azure AppInsights service."
---
# Use Application Insights Logging for Tenant Service

By default the Tenant Service (TS) logs all information into a text log file in the `\App_Data\Logs\` folder.

You can install *AppInsights logger for Tenant Service* to log all TS activities and exceptions into the Azure AppInsights service.

To install and configure the plugin:

1. To start installing the plugin, back up your current `C:\inetpub\wwwroot\<service folder>\App_Data\config\sitecore\CoreServices\sc.serilog.xml` file.

    > [!note]
    > Backing up this file enables you to roll your installation back to standard flat file logging.

2. Download the *AppInsights logger for Tenant Service* package from the [Sitecore download page](https://dev.sitecore.net/Downloads/Data_Exchange_Framework.aspx).
3. From the downloaded package, extract the `\website\bin` folder into your `C:\inetpub\wwwroot\<service folder>\bin` folder.
4. To start configuring the plugin, log in to your portal.azure.com subscription.
5. Create an AppInsights resource or locate an existing one, if you already have one.
6. In the **Overview** section, make a note of the instrumentation key or connection string.
7. Open the `C:\inetpub\wwwroot\<service folder>\App_Config\AppSettings.config` file. Add the instrumentation key or connection string, as applicable:
    - `<add key="AppInsightsKey" value="<instrumentation key>" />`
    - `<add key="AppInsightsKey" value="<connection string>" />`

    > [!note]
    > Microsoft ended support for Instrumentation Key Ingestion in March, 2025.