Does AppServiceHTTPLogs contain client IP?

Victor 1 Reputation point

Im trying out the new diagnostic AppServiceHTTPLogs feature, to get http logs for a linux docker container.

It seems like the CIp field (which I assume should contain the client IP) contains a local IP from azure, in my case, instead of the actual client ip. Is this by design or is it possible to get the real client ip somehow?

Without real client ip the http logs becomes much less useful, since its super tricky to connect log rows with each other.

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

4 answers

Sort by: Most helpful
  1. John Paul Garcia 1 Reputation point

    yes, the server side logs do. They are in W3C Logging format.

    See notes in:

    Good Luck!

    0 comments No comments

  2. Ryan Hill 18,556 Reputation points Microsoft Employee

    Hi Victor,

    I've heard from the product group. The CIp is currently being populated with the load balancer IP. This is why the address is a local IP instead of the HTTP request IP. Nonetheless, they will make the necessary changes to use the request IP address in an upcoming update.

    UDPATED: The team has committed the fix and is awaiting deployment. It will take some time before it will be deployed to your region.


  3. Indicaarcher 1 Reputation point

    Check server logs until load balancer is available. I look at the CIp rarely but have found W3C server logs as well.

  4. groomsb3 1 Reputation point

    To retrieve the client IP address of your Azure Function, you need to inspect the HTTP request and check for the X–Forwarded-For request header. The X-Forwarded-For request header is a de-facto standard header for identifying the originating IP address of a client connecting to a web server through a proxy server.
    Client IP means proprietary systems, software, information, logos, services names, domain names, marks and copyrights the Client uses.
    find server client IP
    ?> Determining IP Address using $_SERVER Variable Method : There is another way to get the IP Address by using the $_SERVER['REMOTE_ADDR'] or $_SERVER['REMOTE_HOST'] variables. The variable in the $_SERVER array is created by the web server such as apache and those can be used in PHP.

    0 comments No comments