Skip to content

Add documentation/sample for stateful .Net core AI integration #97

@DOliana

Description

@DOliana

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions