I updated my azure application insights and now I am getting the warning
'TelemetryConfiguration.Active is obsolete'
I currently have a method like this
static Load()
{
var pchannel = new inMemoryChannel();
.....
TelemetryConfiguration.Active.TelemetryChannel = pchannel;
}
Do you think it will be safe to substitute
TelemetryConfiguration.Active.TelemetryChannel = pchannel;
with this
TelemetryConfiguration.CreateDefault().TelemetryChannel = pchannel;
This removes the warning.
Since TelemetryConfiguration.Active
is deprecated, in asp.net core app, we suggest to use var newConfig = TelemetryConfiguration.CreateDefault();
For more details, you could refer to this issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With