Closed rdagumampan closed 6 years ago
What the framework version an application compiled with and running on? Can you post ApplicationInsights.config
?
From the look of an issue I think it is this: https://github.com/Microsoft/ApplicationInsights-dotnet-server/issues/328 Telemetry disabled, but live metrics do not respect the setting so you got confused.
The only worrisome thing here is why channel wasn't initialized.
Hello, I'm having similar issues, I added in my code a Telemetry.TrackEvent("Message"); code and works fine, but the message about "telemetry channel was not initialized" was always there, even before my customization.
This is my ApplicationInsights.config as Visual Studio 2017 added: ApplicationInsights.txt
We figured out that this problem most likely caused by Application Insights Profiler, not Application Insights itself. There is no workaround except waiting for an update for Azure Web App extension.
@pharring do you have an estimation for this to be fixed?
Hi, is there an update on this? We're experiencing this as well on our production api
As far as I know the issue is fixed in code. It's the matter of deployment. @pharring any updates?
Yes, it's already in the latest Application Insights site extension. Please upgrade the site extension via the Azure Portal or the Kudu endpoint for your web app.
Hi guys! I know this issue is closed, but I believe I might be hitting the same issue on AppService. I have not enabled any extensions specifically and that's what azure portal says. On the Kudu webpage though, I see a webjob: ApplicationInsightsProfiler3
I also see TRACE
error messages in AppInsights and I have all of my components configured to log to AI via Serilog. The trace message I'm seeing:
AI: Server telemetry channel was not initialized. So persistent storage is turned off. You need to call ServerTelemetryChannel.Initialize(). Currently monitoring will continue but if telemetry cannot be sent it will be dropped.
And I have configured Serilog like this:
var configuration = new TelemetryConfiguration() {
InstrumentationKey = hostingContext.Configuration.GetValue<string>("ApplicationInsights:InstrumentationKey"),
TelemetryChannel = new ServerTelemetryChannel() {
DeveloperMode = hostingContext.HostingEnvironment.IsDevelopment()
}
};
loggerConfiguration.WriteTo.ApplicationInsightsEvents(configuration);
The log messages from the apps are showing up in AI, so it is working, but I'm not sure if I should instantiate ServerTelemetryChannel
and call initialize and then pass that into TelemetryConfiguration
.
I don't know how to check the version of AI extension in Azure AppService (since it says none are installed) and Kudu says the same (none are installed).
As the message says, you need to call Initialize
on ServerTelemetryChannel
before it can be used. i.e.
var telemetryChannel = new ServerTelemetryChannel {
DeveloperMode = hostingContext.HostingEnvironment.IsDevelopment()
};
var configuration = new TelemetryConfiguration {
InstrumentationKey = hostingContext.Configuration.GetValue<string>("ApplicationInsights:InstrumentationKey"),
TelemetryChannel = telemetryChannel
};
telemetryChannel.Initialize(configuration);
loggerConfiguration.WriteTo.ApplicationInsightsEvents(configuration);
Thanks @pharring!
Hi AI Team,
I am trying to instrument my service using AI but I am not getting the server metrics in the server. This TRACE message shows up in the "Search" in AI portal but I can't figure why or how to fix this. The only thing we did special is to override the cloudRoleName using customer initializer so we can see multiple instances of same service in the single application map.
Trace Message
AI Portal
Live Metrics shows the server is listed but CPU, RAM etc.. is N/A Server performance metrics - N/A, NOT OK Dependencies tracking - OK Custom events - OK
package.config
Program.cs
ServiceNameInitializer
Additional Info:
I use Serilog sinks into AI and this perhaps explains why the server shows up in the Live Metrics maybe the Server Telemetry actually never worked in my case?
When I run the same service on my local machine, the server perf counters (RAM, CPU, etc) appears in AI portal.