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
When specifying AI key purely via code, I'm having trouble getting my Stateless Asp.Net Core 2.1 Service fabric application to send telemetry to AI.
Specifically, when I enter the AI key in appsettings.json file, everything works as expected - I can see HTTP request with all dependency tracking in place for API->Remoting Service -> SQL Server
If however, I remove the instrumentation key (from all projects) - everything BUT the HTTP/webapi telemetry shows up. It also doesn't show up in the AI Live Metrics page.
Here's what I've tried:
In first line of Program.cs - set: TelemetryConfiguration.Active.InstrumentationKey = key;
As per docs, I've added the following:
.AddSingleton<ITelemetryInitializer>(serviceProvider =>
FabricTelemetryInitializerExtension.CreateFabricTelemetryInitializer(aspNetCoreServiceContext))
.AddSingleton<ITelemetryModule>(serviceProvider =>
{
var module = new ServiceRemotingRequestTrackingTelemetryModule();
module.Initialize(TelemetryConfiguration.Active); // even tried this to make sure it's initialized
return module;
})
.AddSingleton<ITelemetryModule>(serviceProvider =>
{
var module = new ServiceRemotingDependencyTrackingTelemetryModule();
module.Initialize(TelemetryConfiguration.Active); // even tried this to make sure it's initialized
return module;
});
I've also tried explicitly adding HttpDependenciesParsingTelemetryInitializer and OperationCorrelationTelemetryInitializer and registering those as ITelemetryInitializer
What am I missing? The reason I want the key set via config is because this SF app has multiple environments and I would like to use multiple AI keys (and no key for Local dev clusters)
Interestingly - the Remoting call does have Operation info of the originating web api call (e.g. "POST Login/Post"). Hence, as far as I can tell, there is no telemetry being sent for the Web API's http/requests
Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered:
Unfortunately it seems the situation is even worse than I thought.
So I updated all the configuration files to point to a new AI instance in azure - but no telemetry got sent to it...
until I used VS studio to reconfigure all AI keys - and it seem to update these settings in the csproj files with the new AI keys:
AI's configuration scenario is different for each platform, e.g., console, AspNet, AspNet Core.
In your case, please refer this for configurations.
As far as I know, the configuration story for AspNet core is not as mature as AspNet. But it does support the IKey.
Hi
When specifying AI key purely via code, I'm having trouble getting my Stateless Asp.Net Core 2.1 Service fabric application to send telemetry to AI.
Specifically, when I enter the AI key in appsettings.json file, everything works as expected - I can see HTTP request with all dependency tracking in place for API->Remoting Service -> SQL Server
If however, I remove the instrumentation key (from all projects) - everything BUT the HTTP/webapi telemetry shows up. It also doesn't show up in the AI Live Metrics page.
Here's what I've tried:
TelemetryConfiguration.Active.InstrumentationKey = key;
HttpDependenciesParsingTelemetryInitializer
andOperationCorrelationTelemetryInitializer
and registering those asITelemetryInitializer
What am I missing? The reason I want the key set via config is because this SF app has multiple environments and I would like to use multiple AI keys (and no key for Local dev clusters)
Interestingly - the Remoting call does have Operation info of the originating web api call (e.g. "POST Login/Post"). Hence, as far as I can tell, there is no telemetry being sent for the Web API's http/requests
Any help would be greatly appreciated
The text was updated successfully, but these errors were encountered: