AzureFunctions.Global.InitApplicationInsight C# (CSharp) Method

InitApplicationInsight() private method

private InitApplicationInsight ( ) : void
return void
        private void InitApplicationInsight()
        {
            var key = Environment.GetEnvironmentVariable("aiInstrumentationKey");
            if (!string.IsNullOrEmpty(key))
            {
                TelemetryConfiguration.Active.InstrumentationKey = key;
                TelemetryConfiguration.Active.DisableTelemetry = false;
            }
            else
            {
                TelemetryConfiguration.Active.DisableTelemetry = true;
            }
        }