@@ -61,17 +61,17 @@ public ImmutableAzureAppServiceSettings(IConfigurationSource? source, IConfigura
6161 }
6262
6363 SubscriptionId = GetSubscriptionId ( source , telemetry ) ;
64- ResourceGroup = config . WithKeys ( ConfigurationKeys . AzureAppService . ResourceGroupKey ) . AsString ( ) ;
65- SiteName = config . WithKeys ( ConfigurationKeys . AzureAppService . SiteNameKey ) . AsString ( ) ;
64+ ResourceGroup = config . WithKeys ( PlatformKeys . AzureAppService . ResourceGroupKey ) . AsString ( ) ;
65+ SiteName = config . WithKeys ( PlatformKeys . AzureAppService . SiteNameKey ) . AsString ( ) ;
6666 ResourceId = CompileResourceId ( subscriptionId : SubscriptionId , siteName : SiteName , resourceGroup : ResourceGroup ) ;
67- InstanceId = config . WithKeys ( ConfigurationKeys . AzureAppService . InstanceIdKey ) . AsString ( "unknown" ) ;
68- InstanceName = config . WithKeys ( ConfigurationKeys . AzureAppService . InstanceNameKey ) . AsString ( "unknown" ) ;
69- OperatingSystem = config . WithKeys ( ConfigurationKeys . AzureAppService . OperatingSystemKey ) . AsString ( "unknown" ) ;
67+ InstanceId = config . WithKeys ( PlatformKeys . AzureAppService . InstanceIdKey ) . AsString ( "unknown" ) ;
68+ InstanceName = config . WithKeys ( PlatformKeys . AzureAppService . InstanceNameKey ) . AsString ( "unknown" ) ;
69+ OperatingSystem = config . WithKeys ( PlatformKeys . AzureAppService . OperatingSystemKey ) . AsString ( "unknown" ) ;
7070 SiteExtensionVersion = config . WithKeys ( ConfigurationKeys . AzureAppService . SiteExtensionVersionKey ) . AsString ( "unknown" ) ;
71- WebsiteSKU = config . WithKeys ( ConfigurationKeys . AzureAppService . WebsiteSKU ) . AsString ( ) ;
71+ WebsiteSKU = config . WithKeys ( PlatformKeys . AzureAppService . WebsiteSKU ) . AsString ( ) ;
7272
73- FunctionsWorkerRuntime = config . WithKeys ( ConfigurationKeys . AzureFunctions . FunctionsWorkerRuntime ) . AsString ( ) ;
74- FunctionsExtensionVersion = config . WithKeys ( ConfigurationKeys . AzureFunctions . FunctionsExtensionVersion ) . AsString ( ) ;
73+ FunctionsWorkerRuntime = config . WithKeys ( PlatformKeys . AzureFunctions . FunctionsWorkerRuntime ) . AsString ( ) ;
74+ FunctionsExtensionVersion = config . WithKeys ( PlatformKeys . AzureFunctions . FunctionsExtensionVersion ) . AsString ( ) ;
7575
7676 if ( FunctionsWorkerRuntime is not null && FunctionsExtensionVersion is not null )
7777 {
@@ -142,19 +142,19 @@ private static bool ShouldSkipClientSpanWithinFunctions(Scope? scope)
142142 {
143143 if ( subscriptionId == null )
144144 {
145- Log . Warning ( "Could not successfully retrieve the subscription ID from variable: {Variable}" , ConfigurationKeys . AzureAppService . WebsiteOwnerNameKey ) ;
145+ Log . Warning ( "Could not successfully retrieve the subscription ID from variable: {Variable}" , PlatformKeys . AzureAppService . WebsiteOwnerNameKey ) ;
146146 return null ;
147147 }
148148
149149 if ( siteName == null )
150150 {
151- Log . Warning ( "Could not successfully retrieve the deployment ID from variable: {Variable}" , ConfigurationKeys . AzureAppService . SiteNameKey ) ;
151+ Log . Warning ( "Could not successfully retrieve the deployment ID from variable: {Variable}" , PlatformKeys . AzureAppService . SiteNameKey ) ;
152152 return null ;
153153 }
154154
155155 if ( resourceGroup == null )
156156 {
157- Log . Warning ( "Could not successfully retrieve the resource group name from variable: {Variable}" , ConfigurationKeys . AzureAppService . ResourceGroupKey ) ;
157+ Log . Warning ( "Could not successfully retrieve the resource group name from variable: {Variable}" , PlatformKeys . AzureAppService . ResourceGroupKey ) ;
158158 return null ;
159159 }
160160
@@ -164,7 +164,7 @@ private static bool ShouldSkipClientSpanWithinFunctions(Scope? scope)
164164 private static string ? GetSubscriptionId ( IConfigurationSource source , IConfigurationTelemetry telemetry )
165165 {
166166 var websiteOwner = new ConfigurationBuilder ( source , telemetry )
167- . WithKeys ( ConfigurationKeys . AzureAppService . WebsiteOwnerNameKey )
167+ . WithKeys ( PlatformKeys . AzureAppService . WebsiteOwnerNameKey )
168168 . AsString ( websiteOwner => ! string . IsNullOrWhiteSpace ( websiteOwner ) ) ;
169169
170170 if ( ! string . IsNullOrWhiteSpace ( websiteOwner ) )
@@ -186,7 +186,7 @@ private static bool ShouldSkipClientSpanWithinFunctions(Scope? scope)
186186 public static bool IsRunningInAzureAppServices ( IConfigurationSource source , IConfigurationTelemetry telemetry )
187187 {
188188 var siteName = new ConfigurationBuilder ( source , telemetry )
189- . WithKeys ( ConfigurationKeys . AzureAppService . SiteNameKey )
189+ . WithKeys ( PlatformKeys . AzureAppService . SiteNameKey )
190190 . AsString ( ) ;
191191
192192 return ! string . IsNullOrEmpty ( siteName ) ;
@@ -200,17 +200,17 @@ public static bool IsRunningInAzureAppServices(IConfigurationSource source, ICon
200200 public static bool IsRunningInAzureFunctions ( IConfigurationSource source , IConfigurationTelemetry telemetry )
201201 {
202202 var siteName = new ConfigurationBuilder ( source , telemetry )
203- . WithKeys ( ConfigurationKeys . AzureAppService . SiteNameKey )
203+ . WithKeys ( PlatformKeys . AzureAppService . SiteNameKey )
204204 . AsString ( ) ;
205205
206206 // "dotnet", "dotnet-isolated"
207207 var workerRuntime = new ConfigurationBuilder ( source , telemetry )
208- . WithKeys ( ConfigurationKeys . AzureFunctions . FunctionsWorkerRuntime )
208+ . WithKeys ( PlatformKeys . AzureFunctions . FunctionsWorkerRuntime )
209209 . AsString ( ) ;
210210
211211 // "~4", "~1"
212212 var extensionVersion = new ConfigurationBuilder ( source , telemetry )
213- . WithKeys ( ConfigurationKeys . AzureFunctions . FunctionsExtensionVersion )
213+ . WithKeys ( PlatformKeys . AzureFunctions . FunctionsExtensionVersion )
214214 . AsString ( ) ;
215215
216216 return ! string . IsNullOrEmpty ( siteName ) &&
0 commit comments