Search code examples
newrelic

How to view the origin of HTTP requests?


One of my company's internal HTTP endpoints are receiving a large number requests but we don't know where they are coming from. How can I trace the origin of these requests?

Update: I forgot to mention that I want to view the origin of the requests using NewRelic. I also don't have the luxury of installing debugging tools like Fiddler in my production environment.


Solution

  • New Relic does not track identifiers like source IP address out-of-the-box. You must implement custom instrumentation within your app to track those identifiers.

    For example, you can add a custom attribute to the Transaction or PageView event type that will track the source IP address, or you can record a custom event in Insights.

    If you add a custom attribute, then you should be able to use New Relic Insights with a query like:

    SELECT `source.ip.address` FROM Transaction
    

    If you add a custom event, then you should be able to use New Relic Insights with a query like:

    SELECT * FROM YourCustomEventName
    

    New Relic's custom instrumentation will enable you to accomplish your goal.