azure-webjobs-sdk icon indicating copy to clipboard operation
azure-webjobs-sdk copied to clipboard

Application Insights in .net core API + WebJob

Open joaocpribeiro opened this issue 3 years ago • 11 comments

We experienced issues when we have a project configured with both AI telemetry and AI webjobs.

Repro steps

  1. .net core (3.1) API connected to Application Insights with .AddApplicationInsightsTelemetry in Startup's ConfigureServices, as documented here.

  2. 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

joaocpribeiro avatar Dec 13 '21 07:12 joaocpribeiro

Hi @joaocpribeiro , Thank you for your feedback! We will check for the possibilities internally and update you with the findings.

v-bbalaiagar avatar Dec 14 '21 13:12 v-bbalaiagar

@v-bbalaiagar Any news so far?

joaocpribeiro avatar Jan 03 '22 13:01 joaocpribeiro

Hi @joaocpribeiro , Apologies for the delay in response. I checked this internally. We would like to have a repro project to validate further.

v-bbalaiagar avatar Jan 21 '22 09:01 v-bbalaiagar

Thanks @v-bbalaiagar , I will try to create a repo in the next days.

joaocpribeiro avatar Jan 24 '22 13:01 joaocpribeiro

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

ghost avatar Jan 29 '22 16:01 ghost

@v-bbalaiagar Repo here. Sorry in advance if I am missing any requirement or guideline about creating repro projects for public discussions, it is my first one and I have been quite busy. 😬

joaocpribeiro avatar Feb 01 '22 14:02 joaocpribeiro

Any update on this?

Eli-Black-Work avatar Aug 02 '22 09:08 Eli-Black-Work

We are facing the same issue. Is there a workaround/fix?

StevenDevooght avatar Dec 08 '22 15:12 StevenDevooght

No workaround or fix that I know. @v-bbalaiagar, anything from your side?

joaocpribeiro avatar Dec 08 '22 15:12 joaocpribeiro

Im facing the same issue today!

mattiasnordqvist avatar Feb 25 '23 20:02 mattiasnordqvist

Hello, we are facing the same issue! We have a problem in production and really need this functionality to troubleshoot

SantiagoSanMartin avatar Mar 15 '23 14:03 SantiagoSanMartin