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:
-
To start installing the plugin, back up your current
C:\inetpub\wwwroot\<service folder>\App_Data\config\sitecore\CoreServices\sc.serilog.xmlfile.NoteBacking up this file enables you to roll your installation back to standard flat file logging.
-
Download the AppInsights logger for Tenant Service package from the Sitecore download page.
-
From the downloaded package, extract the
\website\binfolder into yourC:\inetpub\wwwroot\<service folder>\binfolder. -
To start configuring the plugin, log in to your portal.azure.com subscription.
-
Create an AppInsights resource or locate an existing one, if you already have one.
-
In the Overview section, make a note of the instrumentation key or connection string.
-
Open the
C:\inetpub\wwwroot\<service folder>\App_Config\AppSettings.configfile. Add the instrumentation key or connection string, as applicable:-
<add key="AppInsightsKey" value="<instrumentation key>" /> -
<add key="AppInsightsKey" value="<connection string>" />
NoteMicrosoft ended support for Instrumentation Key Ingestion in March, 2025.
-