Code Monkey home page Code Monkey logo

Comments (2)

CharlesSchimmel avatar CharlesSchimmel commented on June 6, 2024

I'm seeing this as well. Works when ran locally but not when deployed an Azure app service. .NET 8, ASP.NET API wherein I have a middleware that attempts to add values to the RequestTelemetry.

from applicationinsights-dotnet.

CharlesSchimmel avatar CharlesSchimmel commented on June 6, 2024

My Azure App Service is using Application Insights autoinstrumentation extension (v2.8.45.1) with interop enabled (XDT_MicrosoftApplicationInsights_PreemptSdk=1), and I wonder if that is related. Perhaps when running locally, there's no autoinstrumented instance of AI running to pre-empt the SDK, so custom telemetry still works.

It's unclear to me what SDK interop actually does; the documentation says "Loads the extension side by side with the SDK and uses it to send telemetry. (Disables the Application Insights SDK.)" which to me is ambiguous if things like writing RequestTelemetry in middleware would still work.

Something else I've found is that if I enumerate and log out httpContext.Features.AsEnumerable() in the middleware, RequestTelemetry appears as a registered feature, but any attempt to retrieve it returns null.

Update: Setting XDT_MicrosoftApplicationInsights_PreemptSdk=0 seems to have resolved it.

from applicationinsights-dotnet.

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.