-
Notifications
You must be signed in to change notification settings - Fork 27
Description
I have a stateful service which listens to an eventhub and processes the messages by sending them to a SQL DB / cosmos DB. So far I was able to integrate AI to the IaaS part and even to write custom events to AI, but I do not get the automatic dependency tracking which should come for SQL/cosmos DB (I have it working in an app service I use). Note: no ServiceIntanceListeners/Webinitialization - so I cannot just register the telemetryprovider in DI.
I assume it has something to do with my configuration. The only way I was able to get anything working was to use (this at least sets the cloud role, so that events tracked by nlog have the correct metadata)
TelemetryConfiguration.Active.InstrumentationKey = "<KEY>"; // I know this is not recommended, but I could not find another solution
TelemetryConfiguration.Active.TelemetryInitializers.Add(FabricTelemetryInitializerExtension.CreateFabricTelemetryInitializer(this.Context));I tried the following without luck:
- adding Applicationinsights.config / .xml to the project (including TelemetryConfiguration.CreateFromConfiguration)
- adding config.json
- new project with "add AI wizzard"
Any help on setting up a non-ASP-Net-core service that incldues the automagical dependency tracking would be great!