Wrong http hostname in app service diagnostic settings export

fhtino 136 Reputation points
2023-01-22T11:06:01.0833333+00:00

I have an App Service (linux) with multiple custom domains. Everything is working fine. I can access my site with different names: https://mysite.azurewebsites.net https://www.mydomainA.com https://www.mydomainB.org etc.

On the App Service, I have also activated the Diagnostic Settings export to Storage Account and to Log Analytics. In the StorageAccount I can find the json-lines .pt1h files and in the LogAnalytics data are stored in AppServiceHTTPLogs.

Problem: in both cases, json files and AppServiceHTTPLogs, the field CsHost is always filled with "mysite.azurewebsites.net" instead of the real hostnames used by browsers to reach my site: "www.mydomainA.com" and "www.mydomainB.org"

Is this the expected beahavior (I hope not)? Is there a way to fill the log (json and loganalytics) with the right hostname?

User's image

Azure Monitor
Azure Monitor
An Azure service that is used to collect, analyze, and act on telemetry data from Azure and on-premises environments.
2,786 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
6,830 questions
{count} votes

Accepted answer
  1. VenkateshDodda-MSFT 18,021 Reputation points Microsoft Employee
    2023-01-31T06:16:35.66+00:00

    @fhtino Thanks for your patience on this! I have checked with our App Service engineering team, they have confirmed that it's a bug, and the fix will be released in the next update (over few months | we don't have an exact ETA to share). 

    As and when I have more information, I'll share the update here.  

    At this moment, we don't have any workaround to add those custom hostname's in AppserviceHTTPLogs for Linux apps.

    Once again, thanks for reporting this issue. We appreciate your patience! 

    Feel free to reach back to me if you have any further questions on this.


0 additional answers

Sort by: Most helpful