@azure/mcp-linux-arm64 2.0.0-beta.9 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/NOTICE.txt +5683 -4849
  2. package/README.md +148 -27
  3. package/dist/Azure.Mcp.Tools.AzureMigrate.xml +1060 -0
  4. package/dist/Instrumentation/Resources/api-reference/dotnet/ActivityProcessors.md +119 -0
  5. package/dist/Instrumentation/Resources/api-reference/dotnet/AddApplicationInsightsTelemetry.md +129 -0
  6. package/dist/Instrumentation/Resources/api-reference/dotnet/AddApplicationInsightsTelemetryWorkerService.md +115 -0
  7. package/dist/Instrumentation/Resources/api-reference/dotnet/AddOpenTelemetry.md +153 -0
  8. package/dist/Instrumentation/Resources/api-reference/dotnet/ApplicationInsightsWeb.md +103 -0
  9. package/dist/Instrumentation/Resources/api-reference/dotnet/AzureMonitorExporter.md +137 -0
  10. package/dist/Instrumentation/Resources/api-reference/dotnet/ConfigureOpenTelemetryProvider.md +218 -0
  11. package/dist/Instrumentation/Resources/api-reference/dotnet/ConfigureResource.md +119 -0
  12. package/dist/Instrumentation/Resources/api-reference/dotnet/ConsoleExporter.md +47 -0
  13. package/dist/Instrumentation/Resources/api-reference/dotnet/EntityFrameworkInstrumentation.md +56 -0
  14. package/dist/Instrumentation/Resources/api-reference/dotnet/HttpInstrumentation.md +109 -0
  15. package/dist/Instrumentation/Resources/api-reference/dotnet/LogProcessors.md +101 -0
  16. package/dist/Instrumentation/Resources/api-reference/dotnet/OpenTelemetrySdkCreate.md +146 -0
  17. package/dist/Instrumentation/Resources/api-reference/dotnet/OtlpExporter.md +88 -0
  18. package/dist/Instrumentation/Resources/api-reference/dotnet/RedisInstrumentation.md +63 -0
  19. package/dist/Instrumentation/Resources/api-reference/dotnet/Sampling.md +86 -0
  20. package/dist/Instrumentation/Resources/api-reference/dotnet/SdkCreateTracerProviderBuilder.md +127 -0
  21. package/dist/Instrumentation/Resources/api-reference/dotnet/SqlClientInstrumentation.md +53 -0
  22. package/dist/Instrumentation/Resources/api-reference/dotnet/TelemetryClient.md +122 -0
  23. package/dist/Instrumentation/Resources/api-reference/dotnet/TelemetryConfigurationBuilder.md +173 -0
  24. package/dist/Instrumentation/Resources/api-reference/dotnet/UseAzureMonitor.md +96 -0
  25. package/dist/Instrumentation/Resources/api-reference/dotnet/UseAzureMonitorExporter.md +146 -0
  26. package/dist/Instrumentation/Resources/api-reference/dotnet/WithLogging.md +109 -0
  27. package/dist/Instrumentation/Resources/api-reference/dotnet/WithMetrics.md +105 -0
  28. package/dist/Instrumentation/Resources/api-reference/dotnet/WithTracing.md +91 -0
  29. package/dist/Instrumentation/Resources/concepts/dotnet/appinsights-aspnetcore.md +113 -0
  30. package/dist/Instrumentation/Resources/concepts/dotnet/aspnet-classic-appinsights.md +95 -0
  31. package/dist/Instrumentation/Resources/concepts/dotnet/azure-monitor-distro.md +102 -0
  32. package/dist/Instrumentation/Resources/concepts/dotnet/opentelemetry-pipeline.md +57 -0
  33. package/dist/Instrumentation/Resources/concepts/nodejs/azure-monitor-overview.md +106 -0
  34. package/dist/Instrumentation/Resources/concepts/nodejs/opentelemetry-pipeline.md +201 -0
  35. package/dist/Instrumentation/Resources/concepts/python/azure-monitor-overview.md +122 -0
  36. package/dist/Instrumentation/Resources/concepts/python/opentelemetry-pipeline.md +154 -0
  37. package/dist/Instrumentation/Resources/examples/dotnet/aspnet-classic-setup.md +80 -0
  38. package/dist/Instrumentation/Resources/examples/dotnet/aspnetcore-distro-setup.md +156 -0
  39. package/dist/Instrumentation/Resources/examples/dotnet/aspnetcore-setup.md +160 -0
  40. package/dist/Instrumentation/Resources/examples/dotnet/workerservice-setup.md +154 -0
  41. package/dist/Instrumentation/Resources/examples/nodejs/bunyan-setup.md +301 -0
  42. package/dist/Instrumentation/Resources/examples/nodejs/console-setup.md +284 -0
  43. package/dist/Instrumentation/Resources/examples/nodejs/express-setup.md +169 -0
  44. package/dist/Instrumentation/Resources/examples/nodejs/fastify-setup.md +237 -0
  45. package/dist/Instrumentation/Resources/examples/nodejs/langchain-js-setup.md +310 -0
  46. package/dist/Instrumentation/Resources/examples/nodejs/mongodb-setup.md +185 -0
  47. package/dist/Instrumentation/Resources/examples/nodejs/mysql-setup.md +231 -0
  48. package/dist/Instrumentation/Resources/examples/nodejs/nestjs-setup.md +184 -0
  49. package/dist/Instrumentation/Resources/examples/nodejs/nextjs-setup.md +320 -0
  50. package/dist/Instrumentation/Resources/examples/nodejs/postgres-setup.md +147 -0
  51. package/dist/Instrumentation/Resources/examples/nodejs/redis-setup.md +198 -0
  52. package/dist/Instrumentation/Resources/examples/nodejs/winston-setup.md +260 -0
  53. package/dist/Instrumentation/Resources/examples/python/console-setup.md +392 -0
  54. package/dist/Instrumentation/Resources/examples/python/django-setup.md +269 -0
  55. package/dist/Instrumentation/Resources/examples/python/fastapi-setup.md +256 -0
  56. package/dist/Instrumentation/Resources/examples/python/flask-setup.md +218 -0
  57. package/dist/Instrumentation/Resources/examples/python/genai-setup.md +214 -0
  58. package/dist/Instrumentation/Resources/examples/python/generic-setup.md +164 -0
  59. package/dist/Instrumentation/Resources/migration/dotnet/aad-authentication-migration.md +150 -0
  60. package/dist/Instrumentation/Resources/migration/dotnet/appinsights-2x-to-3x-code-migration.md +164 -0
  61. package/dist/Instrumentation/Resources/migration/dotnet/appinsights-2x-to-3x-no-code-change.md +92 -0
  62. package/dist/Instrumentation/Resources/migration/dotnet/aspnet-classic-2x-to-3x-code-migration.md +190 -0
  63. package/dist/Instrumentation/Resources/migration/dotnet/console-2x-to-3x-code-migration.md +106 -0
  64. package/dist/Instrumentation/Resources/migration/dotnet/ilogger-migration.md +54 -0
  65. package/dist/Instrumentation/Resources/migration/dotnet/workerservice-2x-to-3x-code-migration.md +126 -0
  66. package/dist/Instrumentation/Resources/migration/dotnet/workerservice-2x-to-3x-no-code-change.md +102 -0
  67. package/dist/azmcp +0 -0
  68. package/package.json +1 -1
@@ -0,0 +1,106 @@
1
+ ---
2
+ title: Console App Application Insights 2.x to 3.x Migration
3
+ category: migration
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # Console App — AI SDK 2.x → 3.x Migration
8
+
9
+ ## What changed
10
+
11
+ Console apps use `TelemetryConfiguration` directly (non-DI). In 3.x, the core SDK is rebuilt on OpenTelemetry internally. Several APIs on `TelemetryConfiguration` and `TelemetryClient` are removed or changed.
12
+
13
+ Key changes:
14
+ - `TelemetryConfiguration.Active` — **Removed**. Use `TelemetryConfiguration.CreateDefault()`. Returns a static singleton in 3.x.
15
+ - `config.InstrumentationKey` — **Removed**. Use `config.ConnectionString` (required — throws if not set).
16
+ - `config.TelemetryInitializers` collection — **Removed**. Use `config.ConfigureOpenTelemetryBuilder(b => b.WithTracing(t => t.AddProcessor<T>()))`.
17
+ - `config.TelemetryProcessors` / `TelemetryProcessorChainBuilder` — **Removed**. Use OpenTelemetry processors.
18
+ - `config.TelemetryChannel` / `TelemetrySinks` — **Removed**. Export pipeline managed by OpenTelemetry internally.
19
+ - `DependencyTrackingTelemetryModule` manual init — **No longer needed**. Dependency tracking is automatic in 3.x.
20
+ - `new TelemetryClient()` (parameterless) — **Removed**. Use `new TelemetryClient(config)`.
21
+ - `SetAzureTokenCredential(object)` — Signature changed to `SetAzureTokenCredential(TokenCredential)` (strongly typed).
22
+
23
+ ## Before / after
24
+
25
+ **2.x**
26
+ ```csharp
27
+ using Microsoft.ApplicationInsights;
28
+ using Microsoft.ApplicationInsights.DependencyCollector;
29
+ using Microsoft.ApplicationInsights.Extensibility;
30
+
31
+ var config = TelemetryConfiguration.Active; // or CreateDefault()
32
+ config.InstrumentationKey = "your-ikey";
33
+ config.TelemetryInitializers.Add(new MyInitializer());
34
+
35
+ var dtModule = new DependencyTrackingTelemetryModule();
36
+ dtModule.Initialize(config);
37
+
38
+ var client = new TelemetryClient(config);
39
+ client.TrackEvent("Started");
40
+ // ...
41
+ client.Flush();
42
+ ```
43
+
44
+ **3.x**
45
+ ```csharp
46
+ using Microsoft.ApplicationInsights;
47
+ using Microsoft.ApplicationInsights.Extensibility;
48
+ using OpenTelemetry;
49
+
50
+ var config = TelemetryConfiguration.CreateDefault();
51
+ config.ConnectionString = "InstrumentationKey=...;IngestionEndpoint=...";
52
+
53
+ // Extensibility via OpenTelemetry builder
54
+ config.ConfigureOpenTelemetryBuilder(builder =>
55
+ {
56
+ builder.WithTracing(tracing => tracing.AddProcessor<MyActivityProcessor>());
57
+ });
58
+
59
+ var client = new TelemetryClient(config);
60
+ client.TrackEvent("Started");
61
+ // ...
62
+ client.Flush();
63
+ ```
64
+
65
+ ## Removed APIs
66
+
67
+ | API | Status | Replacement |
68
+ |---|---|---|
69
+ | `TelemetryConfiguration.Active` | **Removed** | `TelemetryConfiguration.CreateDefault()` (static singleton) |
70
+ | `TelemetryConfiguration(string ikey)` | **Removed** | `CreateDefault()` + set `ConnectionString` |
71
+ | `config.InstrumentationKey` | **Removed** | `config.ConnectionString` |
72
+ | `config.TelemetryInitializers` | **Removed** | `config.ConfigureOpenTelemetryBuilder(...)` with `AddProcessor<T>()` |
73
+ | `config.TelemetryProcessors` | **Removed** | `config.ConfigureOpenTelemetryBuilder(...)` with `AddProcessor<T>()` |
74
+ | `config.TelemetryChannel` | **Removed** | Managed internally by OpenTelemetry |
75
+ | `config.TelemetrySinks` | **Removed** | Use OpenTelemetry exporters via `ConfigureOpenTelemetryBuilder` |
76
+ | `new TelemetryClient()` | **Removed** | `new TelemetryClient(config)` |
77
+ | `client.InstrumentationKey` | **Removed** | Use `config.ConnectionString` |
78
+ | `DependencyTrackingTelemetryModule` | **Not needed** | Dependency tracking is automatic |
79
+ | `OperationCorrelationTelemetryInitializer` | **Not needed** | Correlation is automatic via OpenTelemetry |
80
+ | `HttpDependenciesParsingTelemetryInitializer` | **Not needed** | Parsing is automatic |
81
+
82
+ ## New APIs
83
+
84
+ | API | Description |
85
+ |---|---|
86
+ | `config.ConnectionString` | Required. Set before creating `TelemetryClient`. |
87
+ | `config.ConfigureOpenTelemetryBuilder(Action<IOpenTelemetryBuilder>)` | Hook for adding processors, exporters, instrumentation. **Requires `using OpenTelemetry;`** — the `WithTracing()`, `WithLogging()`, `WithMetrics()`, and `ConfigureResource()` extension methods are in the root `OpenTelemetry` namespace. |
88
+ | `config.SetAzureTokenCredential(TokenCredential)` | AAD auth (strongly typed — was `object` in 2.x) |
89
+ | `config.SamplingRatio` | Fixed-rate sampling (0.0–1.0) |
90
+ | `config.TracesPerSecond` | Rate-limited sampling |
91
+
92
+ ## Migration steps
93
+
94
+ 1. Replace `TelemetryConfiguration.Active` with `TelemetryConfiguration.CreateDefault()`
95
+ 2. Replace `config.InstrumentationKey = "..."` with `config.ConnectionString = "InstrumentationKey=...;IngestionEndpoint=..."`
96
+ 3. Remove manual `DependencyTrackingTelemetryModule` initialization — dependency tracking is automatic
97
+ 4. Remove `OperationCorrelationTelemetryInitializer` and `HttpDependenciesParsingTelemetryInitializer` — correlation and parsing are automatic
98
+ 5. Migrate custom `ITelemetryInitializer` implementations to `BaseProcessor<Activity>` — register via `config.ConfigureOpenTelemetryBuilder(b => b.WithTracing(t => t.AddProcessor<T>()))`
99
+ 6. Update `SetAzureTokenCredential((object)cred)` to `SetAzureTokenCredential(cred)` (remove cast — parameter is now `TokenCredential`)
100
+ 7. Update the NuGet package: `Microsoft.ApplicationInsights` to `3.*`, remove `Microsoft.ApplicationInsights.DependencyCollector`
101
+
102
+ ## See also
103
+
104
+ - [TelemetryConfigurationBuilder API reference](learn://api-reference/dotnet/TelemetryConfigurationBuilder.md)
105
+ - [TelemetryClient API reference](learn://api-reference/dotnet/TelemetryClient.md)
106
+ - [AAD Authentication Migration](learn://migration/dotnet/aad-authentication-migration.md)
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: ILogger and Log Filtering Migration (2.x to 3.x)
3
+ category: migration
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # ILogger and Log Filtering Migration (2.x → 3.x)
8
+
9
+ ## What changed
10
+
11
+ In 2.x, `AddApplicationInsightsTelemetry()` already captured ILogger output automatically. However, some codebases also called `AddApplicationInsights()` on `ILoggingBuilder` explicitly — for example, to configure `ApplicationInsightsLoggerOptions` or to add category-level log filters targeting `ApplicationInsightsLoggerProvider`.
12
+
13
+ In 3.x, ILogger capture remains automatic. The difference is that the underlying provider is now `OpenTelemetryLoggerProvider` (from the OpenTelemetry SDK). Any explicit `AddApplicationInsights()` calls and filters targeting `ApplicationInsightsLoggerProvider` must be updated.
14
+
15
+ | Aspect | 2.x | 3.x |
16
+ |---|---|---|
17
+ | Logger provider | `ApplicationInsightsLoggerProvider` (explicit) | `OpenTelemetryLoggerProvider` (automatic) |
18
+ | Registration | `loggingBuilder.AddApplicationInsights()` | Not needed — automatic |
19
+ | Category filters | `AddFilter<ApplicationInsightsLoggerProvider>(...)` | `AddFilter<OpenTelemetryLoggerProvider>(...)` or plain `AddFilter(...)` |
20
+ | Advanced filtering | `ITelemetryProcessor` | `BaseProcessor<LogRecord>` via `ConfigureOpenTelemetryLoggerProvider` |
21
+
22
+ ## Before / after
23
+
24
+ **2.x**
25
+ ```csharp
26
+ using Microsoft.Extensions.Logging.ApplicationInsights;
27
+
28
+ builder.Services.AddLogging(loggingBuilder =>
29
+ {
30
+ loggingBuilder.AddApplicationInsights(options =>
31
+ {
32
+ options.TrackExceptionsAsExceptionTelemetry = true;
33
+ options.IncludeScopes = true;
34
+ });
35
+ loggingBuilder.AddFilter<ApplicationInsightsLoggerProvider>("Microsoft.AspNetCore", LogLevel.Warning);
36
+ loggingBuilder.AddFilter<ApplicationInsightsLoggerProvider>("MyApp", LogLevel.Information);
37
+ });
38
+ ```
39
+
40
+ **3.x**
41
+ ```csharp
42
+ using OpenTelemetry.Logs; // Required for OpenTelemetryLoggerProvider
43
+
44
+ // Logging is automatic — just configure filters targeting the OTel provider
45
+ builder.Logging.AddFilter<OpenTelemetryLoggerProvider>("Microsoft.AspNetCore", LogLevel.Warning);
46
+ builder.Logging.AddFilter<OpenTelemetryLoggerProvider>("MyApp", LogLevel.Information);
47
+ ```
48
+
49
+ ## Migration steps
50
+
51
+ 1. **Remove `AddApplicationInsights()`** — delete the call and its options lambda (`TrackExceptionsAsExceptionTelemetry`, `IncludeScopes` no longer exist).
52
+ 2. **Replace log filters** — change `AddFilter<ApplicationInsightsLoggerProvider>` to `AddFilter<OpenTelemetryLoggerProvider>`, or use a plain `AddFilter(category, level)`. Add `using OpenTelemetry.Logs;` if targeting the provider specifically.
53
+ 3. **Update usings** — remove `using Microsoft.Extensions.Logging.ApplicationInsights;`.
54
+ 4. **Remove the package** — `Microsoft.Extensions.Logging.ApplicationInsights` is no longer needed.
@@ -0,0 +1,126 @@
1
+ ---
2
+ title: WorkerService 2.x to 3.x Code Migration
3
+ category: migration
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # Worker Service 2.x → 3.x Code Migration
8
+
9
+ ## What changed
10
+
11
+ 3.x uses OpenTelemetry under the hood. The main entry point is the same — `AddApplicationInsightsTelemetryWorkerService()` — but several options and an extension method were removed.
12
+
13
+ Key changes:
14
+ - `InstrumentationKey` → use `ConnectionString`
15
+ - `EnableAdaptiveSampling` → use `TracesPerSecond` (default `5`) or `SamplingRatio`
16
+ - Logging is automatic — no additional logger provider needed
17
+ - New: `Credential` for AAD authentication, `EnableTraceBasedLogsSampler` for log sampling control
18
+
19
+ ## Before / after
20
+
21
+ **2.x**
22
+ ```csharp
23
+ using Microsoft.Extensions.DependencyInjection;
24
+
25
+ builder.ConfigureServices(services =>
26
+ {
27
+ services.AddApplicationInsightsTelemetryWorkerService(options =>
28
+ {
29
+ options.InstrumentationKey = "your-ikey"; // Removed in 3.x
30
+ options.EnableAdaptiveSampling = false; // Removed in 3.x
31
+ options.DeveloperMode = true; // Removed in 3.x
32
+ });
33
+ });
34
+ ```
35
+
36
+ **3.x**
37
+ ```csharp
38
+ using Microsoft.Extensions.DependencyInjection;
39
+ using Microsoft.ApplicationInsights.WorkerService;
40
+
41
+ builder.ConfigureServices(services =>
42
+ {
43
+ services.AddApplicationInsightsTelemetryWorkerService(options =>
44
+ {
45
+ options.ConnectionString = "InstrumentationKey=...;IngestionEndpoint=...";
46
+ options.SamplingRatio = 1.0f; // No sampling (collect everything)
47
+ // DeveloperMode — no replacement needed, remove the line
48
+ });
49
+ });
50
+ ```
51
+
52
+ Or set `APPLICATIONINSIGHTS_CONNECTION_STRING` as an environment variable and call `AddApplicationInsightsTelemetryWorkerService()` with no arguments.
53
+
54
+ ## Property changes
55
+
56
+ | Property | Status | Action required |
57
+ |---|---|---|
58
+ | `ConnectionString` | Unchanged | None. |
59
+ | `ApplicationVersion` | Unchanged | None. |
60
+ | `EnableQuickPulseMetricStream` | Unchanged | None. Default `true`. |
61
+ | `EnablePerformanceCounterCollectionModule` | Unchanged | None. Default `true`. |
62
+ | `EnableDependencyTrackingTelemetryModule` | Unchanged | None. Default `true`. |
63
+ | `AddAutoCollectedMetricExtractor` | Unchanged | None. Default `true`. |
64
+ | `InstrumentationKey` | **Removed** | Use `ConnectionString`. |
65
+ | `EnableAdaptiveSampling` | **Removed** | Use `TracesPerSecond` or `SamplingRatio`. |
66
+ | `DeveloperMode` | **Removed** | Delete the line. |
67
+ | `EndpointAddress` | **Removed** | Endpoint is now part of `ConnectionString`. |
68
+ | `EnableHeartbeat` | **Removed** | Delete the line. |
69
+ | `EnableDebugLogger` | **Removed** | Delete the line. |
70
+ | `DependencyCollectionOptions` | **Removed** | Delete the line. |
71
+ | `EnableEventCounterCollectionModule` | **Removed** | Delete the line. |
72
+ | `EnableAppServicesHeartbeatTelemetryModule` | **Removed** | Delete the line; heartbeat is automatic. |
73
+ | `EnableAzureInstanceMetadataTelemetryModule` | **Removed** | Delete the line; resource detection is automatic. |
74
+ | `EnableDiagnosticsTelemetryModule` | **Removed** | Delete the line. |
75
+ | `Credential` | **New** | `TokenCredential`, default `null`. Set for AAD auth. |
76
+ | `TracesPerSecond` | **New** | `double?`, effective default `5`. Rate-limited sampling. |
77
+ | `SamplingRatio` | **New** | `float?`, default `null`. Fixed-rate sampling (0.0–1.0). |
78
+ | `EnableTraceBasedLogsSampler` | **New** | `bool?`, effective default `true`. Logs follow parent trace sampling. |
79
+
80
+ ## Removed extension methods
81
+
82
+ | Method | Replacement |
83
+ |---|---|
84
+ | `AddApplicationInsightsTelemetryWorkerService(string instrumentationKey)` | Use parameterless overload + `ConnectionString` in options or env var. |
85
+
86
+ ## TelemetryClient changes
87
+
88
+ | Change | Details |
89
+ |---|---|
90
+ | `TrackEvent` | 3-param overload `(string, IDictionary<string,string>, IDictionary<string,double>)` **removed** — metrics dict dropped. Use 2-param overload and track metrics separately via `TrackMetric()`. |
91
+ | `TrackException` | 3-param overload with `IDictionary<string,double>` **removed**. Use 2-param overload and track metrics separately via `TrackMetric()`. |
92
+ | `TrackAvailability` | 8-param overload with trailing `IDictionary<string,double>` **removed**. Use 7-param overload and track metrics separately via `TrackMetric()`. |
93
+ | `TrackPageView` | **Removed entirely** (both overloads). Use `TrackEvent` or `TrackRequest` instead. |
94
+ | `GetMetric` | `MetricConfiguration` and `MetricAggregationScope` params **removed** from all overloads. Use simplified `GetMetric(metricId, ...)`. |
95
+ | parameterless `TelemetryClient()` | **Removed**. Use `TelemetryClient(TelemetryConfiguration)` via DI. |
96
+ | `client.InstrumentationKey` | **Removed**. Use `TelemetryConfiguration.ConnectionString`. |
97
+ | `TrackTrace`, `TrackMetric`, `TrackRequest`, `TrackDependency` (full overload), `Flush` | **Unchanged** — no action needed. |
98
+
99
+ ## Migration steps
100
+
101
+ 1. Update the package:
102
+ ```xml
103
+ <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="3.*" />
104
+ ```
105
+
106
+ 2. Find and replace in your code:
107
+ - `InstrumentationKey = "..."` → `ConnectionString = "InstrumentationKey=...;IngestionEndpoint=..."`
108
+ - `EnableAdaptiveSampling = false` → `SamplingRatio = 1.0f` (or set `TracesPerSecond`)
109
+ - Delete any lines setting `DeveloperMode`, `EndpointAddress`, `EnableHeartbeat`, `EnableDebugLogger`, `DependencyCollectionOptions`, `EnableEventCounterCollectionModule`, `EnableAppServicesHeartbeatTelemetryModule`, `EnableAzureInstanceMetadataTelemetryModule`, or `EnableDiagnosticsTelemetryModule`
110
+ - Replace `AddApplicationInsightsTelemetryWorkerService("your-ikey")` with `AddApplicationInsightsTelemetryWorkerService()` and set `ConnectionString` via options or env var
111
+
112
+ 3. Migrate TelemetryClient breaking calls:
113
+ - Remove `IDictionary<string, double> metrics` parameter from `TrackEvent`/`TrackException`/`TrackAvailability` calls (track metrics separately via `TrackMetric()`). Replace `TrackPageView` with `TrackEvent` or `TrackRequest`. Remove `GetMetric` overloads that take `MetricConfiguration`/`MetricAggregationScope`.
114
+
115
+ 4. Build and verify — the `Enable*` flags (`EnableQuickPulseMetricStream`, `EnableDependencyTrackingTelemetryModule`, etc.) still work with the same defaults. No changes needed for those.
116
+
117
+ ## Behavior notes
118
+
119
+ - `TracesPerSecond` is the default sampling mode (effective default `5`). No configuration needed for most apps.
120
+ - Connection string resolution order: `ApplicationInsightsServiceOptions.ConnectionString` → `APPLICATIONINSIGHTS_CONNECTION_STRING` env var → `ApplicationInsights:ConnectionString` in config.
121
+
122
+ ## See also
123
+
124
+ - No-code-change migration(see in workerservice-2x-to-3x-no-code-change.md)
125
+ - AddApplicationInsightsTelemetryWorkerService API reference(see in AddApplicationInsightsTelemetryWorkerService.md)
126
+ - TelemetryClient breaking changes(see in TelemetryClient.md)
@@ -0,0 +1,102 @@
1
+ ---
2
+ title: WorkerService 2.x to 3.x — No-Code-Change Migration
3
+ category: migration
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # Worker Service 2.x → 3.x — No Code Change
8
+
9
+ ## When this applies
10
+
11
+ Your migration requires **only a package upgrade** (no code changes) if both of these are true:
12
+
13
+ 1. You call `AddApplicationInsightsTelemetryWorkerService()` with no arguments, an `IConfiguration`, or with options that only set **unchanged properties**.
14
+ 2. You do not call `AddApplicationInsightsTelemetryWorkerService(string instrumentationKey)`.
15
+
16
+ ### Unchanged properties (safe to keep as-is)
17
+
18
+ | Property | Default |
19
+ |---|---|
20
+ | `ConnectionString` | `null` |
21
+ | `ApplicationVersion` | Entry assembly version |
22
+ | `EnableQuickPulseMetricStream` | `true` |
23
+ | `EnablePerformanceCounterCollectionModule` | `true` |
24
+ | `EnableDependencyTrackingTelemetryModule` | `true` |
25
+ | `AddAutoCollectedMetricExtractor` | `true` |
26
+
27
+ If your code only uses these properties (or none at all), no code changes are needed.
28
+
29
+ ## Migration steps
30
+
31
+ ### 1. Update the package
32
+
33
+ ```xml
34
+ <PackageReference Include="Microsoft.ApplicationInsights.WorkerService" Version="3.*" />
35
+ ```
36
+
37
+ ### 2. Build and run
38
+
39
+ That's it. No code changes required.
40
+
41
+ ## Examples that work without changes
42
+
43
+ **Parameterless call:**
44
+ ```csharp
45
+ using Microsoft.Extensions.DependencyInjection;
46
+
47
+ var builder = Host.CreateDefaultBuilder(args);
48
+ builder.ConfigureServices(services =>
49
+ {
50
+ services.AddApplicationInsightsTelemetryWorkerService();
51
+ });
52
+ var host = builder.Build();
53
+ await host.RunAsync();
54
+ ```
55
+
56
+ **IConfiguration overload:**
57
+ ```csharp
58
+ using Microsoft.Extensions.DependencyInjection;
59
+
60
+ var builder = Host.CreateDefaultBuilder(args);
61
+ builder.ConfigureServices(services =>
62
+ {
63
+ services.AddApplicationInsightsTelemetryWorkerService(builder.Configuration);
64
+ });
65
+ var host = builder.Build();
66
+ await host.RunAsync();
67
+ ```
68
+
69
+ **Options with only unchanged properties:**
70
+ ```csharp
71
+ using Microsoft.Extensions.DependencyInjection;
72
+ using Microsoft.ApplicationInsights.WorkerService;
73
+
74
+ var builder = Host.CreateDefaultBuilder(args);
75
+ builder.ConfigureServices(services =>
76
+ {
77
+ services.AddApplicationInsightsTelemetryWorkerService(options =>
78
+ {
79
+ options.ConnectionString = "InstrumentationKey=...;IngestionEndpoint=...";
80
+ options.EnableQuickPulseMetricStream = true;
81
+ options.EnableDependencyTrackingTelemetryModule = true;
82
+ });
83
+ });
84
+ var host = builder.Build();
85
+ await host.RunAsync();
86
+ ```
87
+
88
+ All three examples above work identically in 2.x and 3.x.
89
+
90
+ ## What changes under the hood
91
+
92
+ Even though your code stays the same, 3.x brings these improvements automatically:
93
+
94
+ - Telemetry is now collected via OpenTelemetry — better standards alignment and ecosystem compatibility.
95
+ - `TracesPerSecond` (effective default `5`) provides rate-limited sampling out of the box. No configuration needed.
96
+ - Logging is integrated automatically — `ILogger` output is exported to Application Insights without additional setup.
97
+ - Azure resource detection (App Service, VM) happens automatically.
98
+
99
+ ## See also
100
+
101
+ - WorkerService 2.x to 3.x Code Migration(see in workerservice-2x-to-3x-code-migration.md)
102
+ - AddApplicationInsightsTelemetryWorkerService API reference(see in AddApplicationInsightsTelemetryWorkerService.md)
package/dist/azmcp CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@azure/mcp-linux-arm64",
3
- "version": "2.0.0-beta.9",
3
+ "version": "2.0.0",
4
4
  "description": "Azure MCP Server - Model Context Protocol implementation for Azure, for linux on arm64",
5
5
  "author": "Microsoft",
6
6
  "homepage": "https://github.com/Microsoft/mcp/blob/main/servers/Azure.Mcp.Server#readme",