We are hosting a SaaS application and enabled the app Insight Telemetry in the Portal to track the runtime logs. It is simple configuration from Visual studio and works fine.
We need to enable App insight telemetry data capture based on the Tenant. Ex. My application is a multi tenant application and will be hosted once with different host names.So, I want to enable App insight for few tenants only. How to control this through code.
I have added this code in my appStart and it worked fine. But I want to enable/disable based on the host name in the URL
`
[Conditional("DEBUG")]
private static void DisableApplicationInsightsOnDebug()
{
TelemetryConfiguration.Active.DisableTelemetry = true;
}
`