Skip to content

Use WAS-DEFAULT-HOSTNAME HttpHeader to get slot name #1368

@debugthings

Description

@debugthings

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions