Application Insights - Track Outgoing HTTP Requests

Moiz Kapasi 0 Reputation points
2025-06-03T22:58:14.15+00:00

I have a Django Backend Server running on the App Service with Application Insights enabled.

I am trying to track the outbound HTTP request for making an API call. However in my Application Insights I am unable to find the requests.

I have enabled Azure Monitor with Open Telemetry in code-base.

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,937 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Alex Burlachenko 9,780 Reputation points
    2025-06-04T07:38:34.5566667+00:00

    hi Moiz Kapasi

    thanks for dropping this question, super helpful for others too ))

    aha, so u got django running on app service with app insights, but those outgoing http calls are ghosting u, right?

    make sure u hooked up open telemetry correctly. if it's half baked, app insights won't catch those sneaky outbound requests.

    u gotta manually instrument those outgoing calls. django won't automagically track em. u need to wrap ur http client with open telemetry's instrumentation. like, if u're using requests lib, do this

    from opentelemetry.instrumentation.requests import RequestsInstrumentor RequestsInstrumentor().instrument()

    UPS! now app insights should see those external calls 8) but wait, there's more! u also need to verify ur app service got the right config. go to azure portal, find ur app service, under settings look for "application insights". make sure it's linked to the correct resource. sometimes it points to narnia instead of ur actual app insights ))

    check the sampling rate. if it's too low, some requests might play hide and seek. u can tweak it in the app insights config. microsoft suggests starting with 100% then adjusting later .

    last thing - give it a few mins after deploying changes. app insights ain't instant, it's like waiting for coffee to brew ) if after 15 mins u still see nada, come back and we'll debug more.

    btw, app insights is lowkey awesome for this stuff once u set it up right. tracks dependencies, shows u which external apis are slow af. game changer for backend devs )))

    hope this helps! if ur still stuck, hightlite me.

    Best regards,

    Alex

    and "yes" if you would follow me at Q&A - personaly thx.
    P.S. If my answer help to you, please Accept my answer
    PPS That is my Answer and not a Comment
    

    https://ctrlaltdel.blog/

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.