Skip to content
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

.Net: Application Insights isn't compatible with keyed services #9971

Open
asvishnyakov opened this issue Dec 13, 2024 · 1 comment
Open
Assignees
Labels
documentation .NET Issue or Pull requests regarding .NET code

Comments

@asvishnyakov
Copy link

This is not an issue with Semantic Kernel itself but rather a warning for everyone using it, as it now heavily utilizes a .NET 8 feature called keyed services.

It turns out that Application Insights has an issue with service registration, making it incompatible with keyed services. More importantly, this issue is very hard to identify and understand as being caused by Application Insights.

If you are using Semantic Kernel with keyed services and encounter unexpected and sometimes even randomly occurring error related to Application Insights dependency injection, you should register Application Insights before any keyed services to resolve the issue. More on microsoft/ApplicationInsights-dotnet#2879

@markwallace-microsoft markwallace-microsoft added .NET Issue or Pull requests regarding .NET code triage labels Dec 13, 2024
@github-actions github-actions bot changed the title Application Insights isn't compatible with keyed services .Net: Application Insights isn't compatible with keyed services Dec 13, 2024
@markwallace-microsoft markwallace-microsoft self-assigned this Dec 16, 2024
@markwallace-microsoft
Copy link
Member

Add this to the learn site documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation .NET Issue or Pull requests regarding .NET code
Projects
Status: Sprint: Planned
Development

No branches or pull requests

2 participants