Application Insights in .net core API + WebJob
See original GitHub issueWe experienced issues when we have a project configured with both AI telemetry and AI webjobs.
Repro steps
-
.net core (3.1) API connected to Application Insights with
.AddApplicationInsightsTelemetry
in Startup’s ConfigureServices, as documented here. -
web job in the same API. The logging there does not work without an extra configuration. For it to work, we connected again to Application Insights with
.AddApplicationInsightsWebJobs
in Program.cs, as documented here.
Expected behavior
Web jobs’ logging is seen in Application Insights as well as all API telemetry (including requests and dependencies).
Actual behavior
If the configuration for the web job is applied, we stop receiving API’s logs of type “request” and “dependency”. Without those also other Applications Insights features aren’t available, like the application map.
Known workarounds
(none)
Related information
Microsoft.Azure.WebJobs 3.0.22 Microsoft.ApplicationInsights.AspNetCore - not directly referencing; version used: 2.18.0, referenced through Microsoft.Azure.WebJobs.Logging.ApplicationInsights 3.0.18
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:11 (1 by maintainers)
Top GitHub Comments
Hi @joaocpribeiro , Thank you for your feedback! We will check for the possibilities internally and update you with the findings.
Hello, we are facing the same issue! We have a problem in production and really need this functionality to troubleshoot