Closed mikanyg closed 4 years ago
I believe the answer to this is "does not matter--place the config file where AI SDK can find it" :-)
The simplest thing for an SF app is to load configuration explicitly from a well-known location, like SF AI output does it for example https://github.com/Azure/diagnostics-eventflow/blob/master/src/Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights/ApplicationInsightsOutput.cs#L148
If you are using EventFlow, that known location is the root of some Fabric configuration package https://github.com/Azure/diagnostics-eventflow/blob/master/src/Microsoft.Diagnostics.EventFlow.ServiceFabric/ServiceFabricDiagnosticPipelineFactory.cs#L42 So with EventFlow you can put the AI SDK config in any configuration package and as long as you pass the right package name to pipeline factory, the config file will be found and loaded.
The telemetry module & initializer in this package really "don't care" about AI SDK configuration file location. There might event be no config file if you are initializing everything imperatively.
In my simple test, I could not get the default telemetry intializers and processors from MS.AI.WindowsServer nuget package to work when I was using the eventflow approach where the ai.config was located in PackageRoot/Config folder.
We are already using eventflow with AI as output, and I have been experimenting with adding the other AI nuget packages (WindowsServer, SnapshotCollector and ServiceFabric) to benefit from the build-in initializers and processors, but I felt like hitting a brick wall, but some of them worked after moving the ai.config to project root.
Please share the configuration that you are trying to enable (e.g. the "simple test" one) and I will see if there is a way to make it work--thx!
I am working on a simple setup, to repro this behaviour, but can't say when It'll be ready.
Closing this issue since it's been inactive and presumably the issue was resolved.
I am unable to figure out whether the applicationinsights.config should be placed in project root or in the PackageRoot\Config folder, as it should be when using Microsoft.Diagnostics.EventFlow.Outputs.ApplicationInsights
I need to load the content of applicationinsights.config on startup and set it as the default configuration for all TelemetryClient instances used in SF services.