One Application Insights instance per tenant

Jonathan Cook 0 Reputation points
2023-09-06T14:08:07.29+00:00

I am looking at the approach to using Application Insights with a mutli-tenant solution described here:

https://learn.microsoft.com/en-us/azure/architecture/guide/multitenant/service/application-insights#one-application-insights-instance-per-tenant

The goal is having a single App Service write to multiple Application Insights instances based on the tenant that is making the request to the App Service. Is there an example or further documentation into how I would achieve what is described in the link?

EDIT: I see that you can set the InstrumentationKey for a telemetry item using ITelemetry.Context.InstrumentationKey. I am getting conflicting information as to whether or not setting it in this way effects only the individual item, or if the change might effect other items using the same context.

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,327 questions
{count} votes