-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation/sample for stateful .Net core AI integration #97
Comments
Loading the instrumentation key from Applicationinsights.config like its described in the link provided by @yantang-msft does not work for me. Can someone provide me with some hint how to manage to include the config file to the correct location so AI can load it? @DOliana is this the same problem you got, that loading the Applicationinsights.config does not work? Or is this way not recommended for some reason and we should always explicitly set the InstrumentationKey and other config from code? |
@BoeseB As documented, "Instructions referring to ApplicationInsights.config are only applicable to apps that are targeting the .NET Framework, and do not apply to .NET Core applications." |
@yantang-msft Thanks for pointing this out again. Sorry i interpreted the note to apply on Asp.net Core cause most examples are with asp. My App is a simple non asp stateful service with only a RunAsync Method running at .Net Core. Here is how I setup AI for now (any suggestions on how to improve are more than welcome): Initialize in Program.cs Main method
|
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)
I tried the following without luck:
Any help on setting up a non-ASP-Net-core service that incldues the automagical dependency tracking would be great!
The text was updated successfully, but these errors were encountered: