visual studio - App insights configuration ON/OFF control in DB -


we hosting saas application , enabled app insight telemetry in portal track runtime logs. simple configuration visual studio , works fine.

we need enable app insight telemetry data capture based on tenant. ex. application multi tenant application , hosted once different host names.so, want enable app insight few tenants only. how control through code.

appinsight link

i have added code in appstart , worked fine. want enable/disable based on host name in url

`

[conditional("debug")]         private static void disableapplicationinsightsondebug()         {             telemetryconfiguration.active.disabletelemetry = true;         } 

`

it appears enable application insights conditionally on instances of application. best handled configuration setting, either using web.config transform or configuration settings cloud roles.
can in runtime, can determine host name once have first request. example. wouldn't recommend because application may issuing lot of telemetry before first request , have on/off rule apply telemetry well. deployment configuration setting best approach.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -