@@ -31,9 +31,9 @@ class AttachStatsbeat extends BaseStatsbeat {
3131
3232 private static final String UNKNOWN_RP_ID = "unknown" ;
3333
34- private static final String WEBSITE_SITE_NAME = "appSrv_SiteName " ;
35- private static final String WEBSITE_HOSTNAME = "appSrv_wsHost " ;
36- private static final String WEBSITE_HOME_STAMPNAME = "appSrv_wsStamp " ;
34+ private static final String WEBSITE_SITE_NAME = "WEBSITE_SITE_NAME " ;
35+ private static final String WEBSITE_HOSTNAME = "WEBSITE_HOSTNAME " ;
36+ private static final String WEBSITE_HOME_STAMPNAME = "WEBSITE_HOME_STAMPNAME " ;
3737
3838 private volatile String resourceProviderId ;
3939 private volatile MetadataInstanceResponse metadataInstanceResponse ;
@@ -75,10 +75,11 @@ void updateMetadataInstance(MetadataInstanceResponse response) {
7575 static String initResourceProviderId (ResourceProvider resourceProvider , MetadataInstanceResponse response ) {
7676 switch (resourceProvider ) {
7777 case RP_APPSVC :
78- // FIXME (heya) Need to test these env vars on App Services Linux & Windows
79- return System .getenv (WEBSITE_SITE_NAME ) + "/" + System .getenv (WEBSITE_HOME_STAMPNAME ) + "/" + System .getenv (WEBSITE_HOSTNAME );
78+ // Linux App Services doesn't have WEBSITE_HOME_STAMPNAME yet.
79+ // TODO (heya) make a feature request for Linux App Services Team to support this.
80+ return System .getenv (WEBSITE_SITE_NAME ) + "/" + System .getenv (WEBSITE_HOME_STAMPNAME );
8081 case RP_FUNCTIONS :
81- return System .getenv (" WEBSITE_HOSTNAME" );
82+ return System .getenv (WEBSITE_HOSTNAME );
8283 case RP_VM :
8384 if (response != null ) {
8485 return response .getVmId () + "/" + response .getSubscriptionId ();
0 commit comments