Skip to content
This repository was archived by the owner on Sep 4, 2025. It is now read-only.

Commit 1b7006a

Browse files
authored
Consolidate AzSubscriptionGuid and set current Activity. (#935)
* Adds WithSubscriptionTag * Update McpRuntime to set Subscription in Activity. * Remove TelemetryActivityExtensions * Fix build breaks * Update CHANGELOG. * Explicitly set Current Activity. * Fix build breaks from merging main
1 parent 7cfa263 commit 1b7006a

File tree

81 files changed

+40
-175
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+40
-175
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions

areas/acr/src/AzureMcp.Acr/Commands/Registry/RegistryListCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
5353
return context.Response;
5454
}
5555

56-
context.Activity?.WithSubscriptionTag(options);
57-
5856
var acrService = context.GetService<IAcrService>();
5957
var registries = await acrService.ListRegistries(
6058
options.Subscription!,

areas/aks/src/AzureMcp.Aks/Commands/Cluster/ClusterGetCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
5656
return context.Response;
5757
}
5858

59-
context.Activity?.WithSubscriptionTag(options);
60-
6159
var aksService = context.GetService<IAksService>();
6260
var cluster = await aksService.GetCluster(
6361
options.Subscription!,

areas/aks/src/AzureMcp.Aks/Commands/Cluster/ClusterListCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
3737
return context.Response;
3838
}
3939

40-
context.Activity?.WithSubscriptionTag(options);
41-
4240
var aksService = context.GetService<IAksService>();
4341
var clusters = await aksService.ListClusters(
4442
options.Subscription!,

areas/appconfig/src/AzureMcp.AppConfig/Commands/Account/AccountListCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
3939
return context.Response;
4040
}
4141

42-
context.Activity?.WithSubscriptionTag(options);
43-
4442
var appConfigService = context.GetService<IAppConfigService>();
4543
var accounts = await appConfigService.GetAppConfigAccounts(
4644
options.Subscription!,

areas/appconfig/src/AzureMcp.AppConfig/Commands/KeyValue/KeyValueDeleteCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
3838
return context.Response;
3939
}
4040

41-
context.Activity?.WithSubscriptionTag(options);
42-
4341
var appConfigService = context.GetService<IAppConfigService>();
4442
await appConfigService.DeleteKeyValue(
4543
options.Account!,

areas/appconfig/src/AzureMcp.AppConfig/Commands/KeyValue/KeyValueListCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
5959
return context.Response;
6060
}
6161

62-
context.Activity?.WithSubscriptionTag(options);
63-
6462
var appConfigService = context.GetService<IAppConfigService>();
6563
var settings = await appConfigService.ListKeyValues(
6664
options.Account!,

areas/appconfig/src/AzureMcp.AppConfig/Commands/KeyValue/KeyValueLockCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
3838
return context.Response;
3939
}
4040

41-
context.Activity?.WithSubscriptionTag(options);
42-
4341
var appConfigService = context.GetService<IAppConfigService>();
4442
await appConfigService.LockKeyValue(
4543
options.Account!,

areas/appconfig/src/AzureMcp.AppConfig/Commands/KeyValue/KeyValueSetCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
5858
return context.Response;
5959
}
6060

61-
context.Activity?.WithSubscriptionTag(options);
62-
6361
var appConfigService = context.GetService<IAppConfigService>();
6462
await appConfigService.SetKeyValue(
6563
options.Account!,

areas/appconfig/src/AzureMcp.AppConfig/Commands/KeyValue/KeyValueShowCommand.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ public override async Task<CommandResponse> ExecuteAsync(CommandContext context,
4040
return context.Response;
4141
}
4242

43-
context.Activity?.WithSubscriptionTag(options);
44-
4543
var appConfigService = context.GetService<IAppConfigService>();
4644
var setting = await appConfigService.GetKeyValue(
4745
options.Account!,

0 commit comments

Comments
 (0)