Issue
Currently we use the WEBSITE_HOSTNAME to determine the App Service slot the code is deployed to.
This environment variable is passed in upon process creation by the App Service sandbox and is not updated. This requires a reboot of the App Service to get the correct value.
Result
The result of this is telemetry will have an incorrect cloud_RoleName until this happens which can skew customer metrics.
Proposal
The proposed fix is to read the WAS-DEFAULT-HOSTNAME http header instead which is sent by the App Service front end (ARR) servers and will always have the correct app service host name.
Issue
Currently we use the WEBSITE_HOSTNAME to determine the App Service slot the code is deployed to.
This environment variable is passed in upon process creation by the App Service sandbox and is not updated. This requires a reboot of the App Service to get the correct value.
Result
The result of this is telemetry will have an incorrect
cloud_RoleNameuntil this happens which can skew customer metrics.Proposal
The proposed fix is to read the
WAS-DEFAULT-HOSTNAMEhttp header instead which is sent by the App Service front end (ARR) servers and will always have the correct app service host name.