Code Monkey home page Code Monkey logo

Comments (7)

marcinbudny avatar marcinbudny commented on July 20, 2024 1

Good idea, will do that. The docs were created before AI tools started adding this initializer.

from applicationinsights-owinextensions.

marcinbudny avatar marcinbudny commented on July 20, 2024

I'll investigate the problem later this week. In the meantime, could you please provide me with a simple repro project - so that I know exactly what the problem is?

from applicationinsights-owinextensions.

marcinbudny avatar marcinbudny commented on July 20, 2024

Were you able to create a repro project for this?

from applicationinsights-owinextensions.

ursenzler avatar ursenzler commented on July 20, 2024

Unfortunately not. I need the help of a colleague because my OWIN knowledge is limited. And I didn't find time with him yet.

from applicationinsights-owinextensions.

ursenzler avatar ursenzler commented on July 20, 2024

I created a simple repro project at https://github.com/ursenzler/AspNetOwinApplicationInsightsTest

A single controller with a single method throwing an exception.
Exception is sent to Appinsights in a Filter (see Startup.cs).

from applicationinsights-owinextensions.

marcinbudny avatar marcinbudny commented on July 20, 2024

Remove following line from your ApplicationInsights.config:

<Add Type="Microsoft.ApplicationInsights.Web.OperationCorrelationTelemetryInitializer, Microsoft.AI.Web" />

This initializer has functionality, that is overlapping with Application Insights OWIN extensions. In contrast to OWIN extensions, it does utilize the ParentId property. As a result of combining those two, ParentId has different value than OperationId and RequestId. This is why the exception is not linked to the request.

Also a hint: you can still view exceptions, that are thrown within a request by selecting the All available telemetry for this operation option on the request in the portal.

from applicationinsights-owinextensions.

ursenzler avatar ursenzler commented on July 20, 2024

Thank you very much. That solved the problem.

Maybe you should add OperationCorrelationTelemetryInitializer to the list of things to remove in the readme.md. It was there after installing AppInsights within VS2017.

from applicationinsights-owinextensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.