You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In case instrumentation key is not provided AddServiceProvider extension causes crash during asp.net core startup.
An unhandled exception of type 'System.ArgumentNullException' occurred in System.Private.CoreLib.dll: 'Value cannot be null.'
at Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration..ctor(String instrumentationKey, ITelemetryChannel channel)
at Microsoft.ApplicationInsights.Extensibility.TelemetryConfiguration..ctor(String instrumentationKey)
at ServiceProfiler.EventPipe.Logging.EventPipeAppInsightsLogger..ctor(String instrumentationKey, ILoggerFactory loggerFactory, IHostingEnvironment hostingEnvironment)
The text was updated successfully, but these errors were encountered:
@skwasiborski Thanks for the report. That behavior is expected because instrumentation key is an essential part of the system to work. What do you think is the best behavior?
Application Insights normally does not throw when the instrumentation key is not set. Arguably in server setup AI without instrumentation key is as useless as the profiler.
Current behaviour means I cannot run my service locally without providing instrumentation key (which I do not want to do) or modifying my code which I also do not want to do.
In my opinion it the profiler should not throw exceptions in any case, it may log a warning or something.
In case instrumentation key is not provided AddServiceProvider extension causes crash during asp.net core startup.
The text was updated successfully, but these errors were encountered: