@@ -61,17 +61,17 @@ public ImmutableAzureAppServiceSettings(IConfigurationSource? source, IConfigura
61
61
}
62
62
63
63
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 ( ) ;
66
66
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" ) ;
70
70
SiteExtensionVersion = config . WithKeys ( ConfigurationKeys . AzureAppService . SiteExtensionVersionKey ) . AsString ( "unknown" ) ;
71
- WebsiteSKU = config . WithKeys ( ConfigurationKeys . AzureAppService . WebsiteSKU ) . AsString ( ) ;
71
+ WebsiteSKU = config . WithKeys ( PlatformKeys . AzureAppService . WebsiteSKU ) . AsString ( ) ;
72
72
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 ( ) ;
75
75
76
76
if ( FunctionsWorkerRuntime is not null && FunctionsExtensionVersion is not null )
77
77
{
@@ -142,19 +142,19 @@ private static bool ShouldSkipClientSpanWithinFunctions(Scope? scope)
142
142
{
143
143
if ( subscriptionId == null )
144
144
{
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 ) ;
146
146
return null ;
147
147
}
148
148
149
149
if ( siteName == null )
150
150
{
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 ) ;
152
152
return null ;
153
153
}
154
154
155
155
if ( resourceGroup == null )
156
156
{
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 ) ;
158
158
return null ;
159
159
}
160
160
@@ -164,7 +164,7 @@ private static bool ShouldSkipClientSpanWithinFunctions(Scope? scope)
164
164
private static string ? GetSubscriptionId ( IConfigurationSource source , IConfigurationTelemetry telemetry )
165
165
{
166
166
var websiteOwner = new ConfigurationBuilder ( source , telemetry )
167
- . WithKeys ( ConfigurationKeys . AzureAppService . WebsiteOwnerNameKey )
167
+ . WithKeys ( PlatformKeys . AzureAppService . WebsiteOwnerNameKey )
168
168
. AsString ( websiteOwner => ! string . IsNullOrWhiteSpace ( websiteOwner ) ) ;
169
169
170
170
if ( ! string . IsNullOrWhiteSpace ( websiteOwner ) )
@@ -186,7 +186,7 @@ private static bool ShouldSkipClientSpanWithinFunctions(Scope? scope)
186
186
public static bool IsRunningInAzureAppServices ( IConfigurationSource source , IConfigurationTelemetry telemetry )
187
187
{
188
188
var siteName = new ConfigurationBuilder ( source , telemetry )
189
- . WithKeys ( ConfigurationKeys . AzureAppService . SiteNameKey )
189
+ . WithKeys ( PlatformKeys . AzureAppService . SiteNameKey )
190
190
. AsString ( ) ;
191
191
192
192
return ! string . IsNullOrEmpty ( siteName ) ;
@@ -200,17 +200,17 @@ public static bool IsRunningInAzureAppServices(IConfigurationSource source, ICon
200
200
public static bool IsRunningInAzureFunctions ( IConfigurationSource source , IConfigurationTelemetry telemetry )
201
201
{
202
202
var siteName = new ConfigurationBuilder ( source , telemetry )
203
- . WithKeys ( ConfigurationKeys . AzureAppService . SiteNameKey )
203
+ . WithKeys ( PlatformKeys . AzureAppService . SiteNameKey )
204
204
. AsString ( ) ;
205
205
206
206
// "dotnet", "dotnet-isolated"
207
207
var workerRuntime = new ConfigurationBuilder ( source , telemetry )
208
- . WithKeys ( ConfigurationKeys . AzureFunctions . FunctionsWorkerRuntime )
208
+ . WithKeys ( PlatformKeys . AzureFunctions . FunctionsWorkerRuntime )
209
209
. AsString ( ) ;
210
210
211
211
// "~4", "~1"
212
212
var extensionVersion = new ConfigurationBuilder ( source , telemetry )
213
- . WithKeys ( ConfigurationKeys . AzureFunctions . FunctionsExtensionVersion )
213
+ . WithKeys ( PlatformKeys . AzureFunctions . FunctionsExtensionVersion )
214
214
. AsString ( ) ;
215
215
216
216
return ! string . IsNullOrEmpty ( siteName ) &&
0 commit comments