@azure/mcp-linux-arm64 2.0.0-beta.27 → 2.0.0-beta.29

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 (23) hide show
  1. package/README.md +12 -6
  2. package/dist/Resources/api-reference/dotnet/ActivityProcessors.md +119 -0
  3. package/dist/Resources/api-reference/dotnet/AddApplicationInsightsTelemetry.md +129 -0
  4. package/dist/Resources/api-reference/dotnet/AddOpenTelemetry.md +153 -0
  5. package/dist/Resources/api-reference/dotnet/AzureMonitorExporter.md +137 -0
  6. package/dist/Resources/api-reference/dotnet/ConfigureOpenTelemetryProvider.md +195 -0
  7. package/dist/Resources/api-reference/dotnet/ConfigureResource.md +119 -0
  8. package/dist/Resources/api-reference/dotnet/LogProcessors.md +99 -0
  9. package/dist/Resources/api-reference/dotnet/OpenTelemetrySdkCreate.md +146 -0
  10. package/dist/Resources/api-reference/dotnet/Sampling.md +86 -0
  11. package/dist/Resources/api-reference/dotnet/SdkCreateTracerProviderBuilder.md +127 -0
  12. package/dist/Resources/api-reference/dotnet/UseAzureMonitor.md +96 -0
  13. package/dist/Resources/api-reference/dotnet/UseAzureMonitorExporter.md +146 -0
  14. package/dist/Resources/api-reference/dotnet/WithLogging.md +109 -0
  15. package/dist/Resources/api-reference/dotnet/WithMetrics.md +105 -0
  16. package/dist/Resources/api-reference/dotnet/WithTracing.md +91 -0
  17. package/dist/Resources/concepts/dotnet/azure-monitor-distro.md +102 -0
  18. package/dist/Resources/concepts/dotnet/opentelemetry-pipeline.md +57 -0
  19. package/dist/Resources/examples/dotnet/aspnetcore-setup.md +156 -0
  20. package/dist/Resources/migration/dotnet/appinsights-2x-to-3x-code-migration.md +134 -0
  21. package/dist/Resources/migration/dotnet/appinsights-2x-to-3x-no-code-change.md +92 -0
  22. package/dist/azmcp +0 -0
  23. package/package.json +1 -1
@@ -0,0 +1,102 @@
1
+ ---
2
+ title: Azure Monitor OpenTelemetry Distro
3
+ category: concept
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # Azure Monitor OpenTelemetry Distro
8
+
9
+ **Category:** Concept
10
+ **Applies to:** 3.x
11
+
12
+ ## Overview
13
+
14
+ The Azure Monitor OpenTelemetry Distro (`Azure.Monitor.OpenTelemetry.AspNetCore`) is a batteries-included package that configures OpenTelemetry with sensible defaults for Azure Monitor/Application Insights.
15
+
16
+ ## What It Provides
17
+
18
+ One line of code enables:
19
+
20
+ ```csharp
21
+ builder.Services.AddOpenTelemetry().UseAzureMonitor();
22
+ ```
23
+
24
+ ### Automatic Instrumentation
25
+ - **ASP.NET Core** - HTTP requests (traces)
26
+ - **HttpClient** - Outgoing HTTP calls (dependencies)
27
+ - **SQL Client** - Database calls
28
+ - **Azure SDK** - Azure service calls
29
+
30
+ ### Automatic Export
31
+ - Traces → Application Insights (requests, dependencies)
32
+ - Metrics → Application Insights (performance counters, custom metrics)
33
+ - Logs → Application Insights (traces, exceptions)
34
+
35
+ ### Automatic Enrichment
36
+ - Cloud role name detection
37
+ - Kubernetes metadata
38
+ - Azure App Service metadata
39
+
40
+ ## Configuration
41
+
42
+ ### Connection String (Required)
43
+
44
+ Option 1: Environment variable (recommended)
45
+ ```bash
46
+ APPLICATIONINSIGHTS_CONNECTION_STRING=InstrumentationKey=xxx;IngestionEndpoint=https://...
47
+ ```
48
+
49
+ Option 2: appsettings.json
50
+ ```json
51
+ {
52
+ "AzureMonitor": {
53
+ "ConnectionString": "InstrumentationKey=xxx;IngestionEndpoint=https://..."
54
+ }
55
+ }
56
+ ```
57
+
58
+ Option 3: Code
59
+ ```csharp
60
+ builder.Services.AddOpenTelemetry().UseAzureMonitor(options =>
61
+ {
62
+ options.ConnectionString = "InstrumentationKey=xxx;...";
63
+ });
64
+ ```
65
+
66
+ ### Optional Configuration
67
+
68
+ ```csharp
69
+ builder.Services.AddOpenTelemetry().UseAzureMonitor(options =>
70
+ {
71
+ // Sampling
72
+ options.SamplingRatio = 0.1f; // 10% sampling
73
+
74
+ // Disable specific auto-instrumentation
75
+ options.EnableLiveMetrics = false;
76
+
77
+ // Custom resource attributes
78
+ options.Resource = ResourceBuilder.CreateDefault()
79
+ .AddService("MyService", "1.0.0");
80
+ });
81
+ ```
82
+
83
+ ## Package Reference
84
+
85
+ ```xml
86
+ <PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.3.0" />
87
+ ```
88
+
89
+ ## When to Use
90
+
91
+ | Scenario | Recommendation |
92
+ |----------|----------------|
93
+ | New ASP.NET Core app | ✅ Use Distro |
94
+ | Existing AI SDK 2.x app | ✅ Migrate to Distro |
95
+ | Need custom exporters | Consider manual OpenTelemetry setup |
96
+ | Non-ASP.NET Core | Use `Azure.Monitor.OpenTelemetry.Exporter` directly |
97
+
98
+ ## See Also
99
+
100
+ - OpenTelemetry Pipeline(see in opentelemetry-pipeline.md)
101
+ - UseAzureMonitor API(see in api-reference/dotnet/UseAzureMonitor.md)
102
+ - Basic Setup Example(see in examples/dotnet/aspnetcore-setup.md)
@@ -0,0 +1,57 @@
1
+ ---
2
+ title: OpenTelemetry Pipeline
3
+ category: concept
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # OpenTelemetry Pipeline
8
+
9
+ **Category:** Concept
10
+ **Applies to:** 3.x
11
+
12
+ ## Overview
13
+
14
+ The OpenTelemetry pipeline is the data flow path for telemetry signals (traces, metrics, logs) from your application to observability backends. Understanding this pipeline is essential for Azure Monitor integration.
15
+
16
+ ## Pipeline Components
17
+
18
+ ```
19
+ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
20
+ │ Instrumentation │ ──▶ │ Processors │ ──▶ │ Exporters │
21
+ │ (Sources) │ │ (Transform) │ │ (Backends) │
22
+ └─────────────────┘ └─────────────────┘ └─────────────────┘
23
+ ```
24
+
25
+ ### 1. Instrumentation (Sources)
26
+ - **ActivitySource** - Creates spans/traces
27
+ - **Meter** - Creates metrics
28
+ - **ILogger** - Creates logs (via OpenTelemetry.Extensions.Logging)
29
+
30
+ ### 2. Processors (Transform)
31
+ - **BaseProcessor<Activity>** - Enrich or filter spans
32
+ - **BaseProcessor<LogRecord>** - Enrich or filter logs
33
+ - Run in pipeline order before export
34
+
35
+ ### 3. Exporters (Backends)
36
+ - **Azure Monitor Exporter** - Sends to Application Insights
37
+ - **OTLP Exporter** - Sends to any OTLP-compatible backend
38
+ - **Console Exporter** - Debug output
39
+
40
+ ## Wiring Up the Pipeline
41
+
42
+ See the AddOpenTelemetry API reference(see in AddOpenTelemetry.md) for full setup examples showing how sources, processors, and exporters are composed via the builder API.
43
+
44
+ ## Key Differences from Application Insights 2.x
45
+
46
+ | 2.x Concept | 3.x Equivalent |
47
+ |-------------|----------------|
48
+ | TelemetryClient | ActivitySource / Meter / ILogger |
49
+ | ITelemetryInitializer | BaseProcessor<Activity>.OnStart |
50
+ | ITelemetryProcessor | BaseProcessor<Activity>.OnEnd |
51
+ | TelemetryChannel | Exporter |
52
+ | TelemetryConfiguration | OpenTelemetryBuilder |
53
+
54
+ ## See Also
55
+
56
+ - Azure Monitor Distro(see in azure-monitor-distro.md)
57
+ - AddOpenTelemetry API(see in AddOpenTelemetry.md)
@@ -0,0 +1,156 @@
1
+ ---
2
+ title: Basic ASP.NET Core Setup
3
+ category: example
4
+ applies-to: 3.x
5
+ source: ApplicationInsightsDemo/Program.cs
6
+ ---
7
+
8
+ # Basic ASP.NET Core Setup
9
+
10
+ **Category:** Example
11
+ **Applies to:** 3.x
12
+
13
+ ## Overview
14
+
15
+ Complete working example of adding Azure Monitor to a new ASP.NET Core application.
16
+
17
+ ## Step 1: Add Package
18
+
19
+ ```bash
20
+ dotnet add package Azure.Monitor.OpenTelemetry.AspNetCore
21
+ ```
22
+
23
+ Or in `.csproj`:
24
+
25
+ ```xml
26
+ <PackageReference Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.3.0" />
27
+ ```
28
+
29
+ ## Step 2: Configure in Program.cs
30
+
31
+ ### Minimal Setup
32
+
33
+ ```csharp
34
+ using Azure.Monitor.OpenTelemetry.AspNetCore;
35
+
36
+ var builder = WebApplication.CreateBuilder(args);
37
+
38
+ // Add Azure Monitor - one line!
39
+ builder.Services.AddOpenTelemetry().UseAzureMonitor();
40
+
41
+ builder.Services.AddControllers();
42
+
43
+ var app = builder.Build();
44
+
45
+ app.MapControllers();
46
+ app.Run();
47
+ ```
48
+
49
+ ### With Configuration Options
50
+
51
+ ```csharp
52
+ using Azure.Monitor.OpenTelemetry.AspNetCore;
53
+
54
+ var builder = WebApplication.CreateBuilder(args);
55
+
56
+ builder.Services.AddOpenTelemetry().UseAzureMonitor(options =>
57
+ {
58
+ // Connection string from configuration
59
+ options.ConnectionString = builder.Configuration["AzureMonitor:ConnectionString"];
60
+
61
+ // Sample 50% of requests in production
62
+ if (!builder.Environment.IsDevelopment())
63
+ {
64
+ options.SamplingRatio = 0.5f;
65
+ }
66
+ });
67
+
68
+ builder.Services.AddControllers();
69
+
70
+ var app = builder.Build();
71
+
72
+ app.MapControllers();
73
+ app.Run();
74
+ ```
75
+
76
+ ## Step 3: Configure Connection String
77
+
78
+ ### Option A: Environment Variable (Recommended for Production)
79
+
80
+ ```bash
81
+ export APPLICATIONINSIGHTS_CONNECTION_STRING="InstrumentationKey=xxx;IngestionEndpoint=https://..."
82
+ ```
83
+
84
+ ### Option B: appsettings.json
85
+
86
+ ```json
87
+ {
88
+ "AzureMonitor": {
89
+ "ConnectionString": "InstrumentationKey=xxx;IngestionEndpoint=https://..."
90
+ }
91
+ }
92
+ ```
93
+
94
+ ### Option C: User Secrets (Development)
95
+
96
+ ```bash
97
+ dotnet user-secrets set "AzureMonitor:ConnectionString" "InstrumentationKey=xxx;..."
98
+ ```
99
+
100
+ ## Complete Program.cs
101
+
102
+ ```csharp
103
+ using Azure.Monitor.OpenTelemetry.AspNetCore;
104
+
105
+ var builder = WebApplication.CreateBuilder(args);
106
+
107
+ // Add services
108
+ builder.Services.AddControllers();
109
+ builder.Services.AddEndpointsApiExplorer();
110
+ builder.Services.AddSwaggerGen();
111
+
112
+ // Add Azure Monitor OpenTelemetry
113
+ builder.Services.AddOpenTelemetry().UseAzureMonitor();
114
+
115
+ var app = builder.Build();
116
+
117
+ // Configure pipeline
118
+ if (app.Environment.IsDevelopment())
119
+ {
120
+ app.UseSwagger();
121
+ app.UseSwaggerUI();
122
+ }
123
+
124
+ app.UseHttpsRedirection();
125
+ app.UseAuthorization();
126
+ app.MapControllers();
127
+
128
+ app.Run();
129
+ ```
130
+
131
+ ## What You Get Automatically
132
+
133
+ After this setup, Azure Monitor will collect:
134
+
135
+ | Signal | Data |
136
+ |--------|------|
137
+ | **Requests** | All incoming HTTP requests with timing, status codes |
138
+ | **Dependencies** | Outgoing HTTP calls, SQL queries, Azure SDK calls |
139
+ | **Exceptions** | Unhandled exceptions with stack traces |
140
+ | **Logs** | ILogger output (Information level and above) |
141
+ | **Metrics** | Request rate, response time, CPU, memory |
142
+
143
+ ## Verify It Works
144
+
145
+ 1. Run your application
146
+ 2. Make some requests
147
+ 3. Check Application Insights in Azure Portal (may take 2-5 minutes)
148
+ 4. Look for:
149
+ - Live Metrics (immediate)
150
+ - Transaction Search (requests, dependencies)
151
+ - Failures (exceptions)
152
+
153
+ ## See Also
154
+
155
+ - Azure Monitor Distro(see in azure-monitor-distro.md)
156
+ - UseAzureMonitor API(see in UseAzureMonitor.md)
@@ -0,0 +1,134 @@
1
+ ---
2
+ title: Application Insights 2.x to 3.x Migration
3
+ category: migration
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # App Insights 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 — `AddApplicationInsightsTelemetry()` — but several options and extension methods were removed.
12
+
13
+ Key changes:
14
+ - `InstrumentationKey` → use `ConnectionString`
15
+ - `EnableAdaptiveSampling` → use `TracesPerSecond` (default `5`) or `SamplingRatio`
16
+ - Logging is automatic — `ApplicationInsightsLoggerProvider` was removed
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.Services.AddApplicationInsightsTelemetry(options =>
26
+ {
27
+ options.InstrumentationKey = "your-ikey"; // Removed in 3.x
28
+ options.EnableAdaptiveSampling = false; // Removed in 3.x
29
+ options.DeveloperMode = true; // Removed in 3.x
30
+ });
31
+ ```
32
+
33
+ **3.x**
34
+ ```csharp
35
+ using Microsoft.Extensions.DependencyInjection;
36
+ using Microsoft.ApplicationInsights.AspNetCore.Extensions;
37
+
38
+ builder.Services.AddApplicationInsightsTelemetry(options =>
39
+ {
40
+ options.ConnectionString = "InstrumentationKey=...;IngestionEndpoint=...";
41
+ options.SamplingRatio = 1.0f; // No sampling (collect everything)
42
+ // DeveloperMode — no replacement needed, remove the line
43
+ });
44
+ ```
45
+
46
+ Or set `APPLICATIONINSIGHTS_CONNECTION_STRING` as an environment variable and call `AddApplicationInsightsTelemetry()` with no arguments.
47
+
48
+ ## Property changes
49
+
50
+ | Property | Status | Action required |
51
+ |---|---|---|
52
+ | `ConnectionString` | Unchanged | None. |
53
+ | `ApplicationVersion` | Unchanged | None. |
54
+ | `EnableQuickPulseMetricStream` | Unchanged | None. Default `true`. |
55
+ | `EnablePerformanceCounterCollectionModule` | Unchanged | None. Default `true`. |
56
+ | `EnableDependencyTrackingTelemetryModule` | Unchanged | None. Default `true`. |
57
+ | `EnableRequestTrackingTelemetryModule` | Unchanged | None. Default `true`. |
58
+ | `AddAutoCollectedMetricExtractor` | Unchanged | None. Default `true`. |
59
+ | `EnableAuthenticationTrackingJavaScript` | Unchanged | None. Default `false`. |
60
+ | `InstrumentationKey` | **Removed** | Use `ConnectionString`. |
61
+ | `EnableAdaptiveSampling` | **Removed** | Use `TracesPerSecond` or `SamplingRatio`. |
62
+ | `DeveloperMode` | **Removed** | Delete the line. |
63
+ | `EndpointAddress` | **Removed** | Endpoint is now part of `ConnectionString`. |
64
+ | `EnableHeartbeat` | **Removed** | Delete the line; heartbeat is automatic. |
65
+ | `EnableDebugLogger` | **Removed** | Delete the line. |
66
+ | `RequestCollectionOptions` | **Removed** | Delete the line. |
67
+ | `DependencyCollectionOptions` | **Removed** | Delete the line. |
68
+ | `TelemetryInitializers` | **Removed** | Delete the line. |
69
+ | `Credential` | **New** | `TokenCredential`, default `null`. Set for AAD auth. |
70
+ | `TracesPerSecond` | **New** | `double?`, effective default `5`. Rate-limited sampling. |
71
+ | `SamplingRatio` | **New** | `float?`, default `null`. Fixed-rate sampling (0.0–1.0). |
72
+ | `EnableTraceBasedLogsSampler` | **New** | `bool?`, effective default `true`. Logs follow parent trace sampling. |
73
+
74
+ ## Removed extension methods
75
+
76
+ | Method | Replacement |
77
+ |---|---|
78
+ | `AddApplicationInsightsTelemetry(string instrumentationKey)` | Use parameterless overload + `ConnectionString` in options or env var. |
79
+ | `UseApplicationInsights()` (all `IWebHostBuilder` overloads) | Use `AddApplicationInsightsTelemetry()` on `IServiceCollection`. |
80
+ | `AddApplicationInsightsTelemetryProcessor<T>()` | Use OpenTelemetry processors. |
81
+ | `ConfigureTelemetryModule<T>()` | Removed; module functionality is built-in. |
82
+
83
+ ## Removed interfaces and classes
84
+
85
+ | Type | Notes |
86
+ |---|---|
87
+ | `ITelemetryInitializer` | Removed. Convert to `BaseProcessor<Activity>` with `OnStart`. Register via `.AddProcessor<T>()` in the OpenTelemetry pipeline. |
88
+ | `ITelemetryProcessor` | Removed. Convert to `BaseProcessor<Activity>` with `OnEnd`. To drop telemetry, clear `data.ActivityTraceFlags &= ~ActivityTraceFlags.Recorded`. Register via `.AddProcessor<T>()`. |
89
+ | `ApplicationInsightsLoggerProvider` | Logging is now automatic. No replacement needed. |
90
+ | `ExceptionTrackingMiddleware` | Exception tracking is built-in. |
91
+
92
+ ## TelemetryClient changes
93
+
94
+ | Change | Details |
95
+ |---|---|
96
+ | `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()`. |
97
+ | `TrackException` | 3-param overload with `IDictionary<string,double>` **removed**. Use 2-param overload and track metrics separately via `TrackMetric()`. |
98
+ | `TrackAvailability` | 8-param overload with trailing `IDictionary<string,double>` **removed**. Use 7-param overload and track metrics separately via `TrackMetric()`. |
99
+ | `TrackPageView` | **Removed entirely** (both overloads). Use `TrackEvent` or `TrackRequest` instead. |
100
+ | `GetMetric` | `MetricConfiguration` and `MetricAggregationScope` params **removed** from all overloads. Use simplified `GetMetric(metricId, ...)`. |
101
+ | parameterless `TelemetryClient()` | **Removed**. Use `TelemetryClient(TelemetryConfiguration)` via DI. |
102
+ | `client.InstrumentationKey` | **Removed**. Use `TelemetryConfiguration.ConnectionString`. |
103
+ | `TrackTrace`, `TrackMetric`, `TrackRequest`, `TrackDependency` (full overload), `Flush` | **Unchanged** — no action needed. |
104
+
105
+ ## Migration steps
106
+
107
+ 1. Update the package:
108
+ ```xml
109
+ <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="3.*" />
110
+ ```
111
+
112
+ 2. Find and replace in your code:
113
+ - `InstrumentationKey = "..."` → `ConnectionString = "InstrumentationKey=...;IngestionEndpoint=..."`
114
+ - `EnableAdaptiveSampling = false` → `SamplingRatio = 1.0f` (or set `TracesPerSecond`)
115
+ - Delete any lines setting `DeveloperMode`, `EndpointAddress`, `EnableHeartbeat`, `EnableDebugLogger`, `RequestCollectionOptions`, `DependencyCollectionOptions`, or `TelemetryInitializers`
116
+ - Delete calls to `UseApplicationInsights()`, `AddApplicationInsightsTelemetryProcessor<T>()`, `ConfigureTelemetryModule<T>()`
117
+
118
+ 3. Migrate custom telemetry types:
119
+ - Convert each `ITelemetryInitializer` implementation to a `BaseProcessor<Activity>` with `OnStart`. Register via `.AddProcessor<T>()` in the OpenTelemetry pipeline.
120
+ - Convert each `ITelemetryProcessor` implementation to a `BaseProcessor<Activity>` with `OnEnd`. To drop telemetry, clear the Recorded flag: `data.ActivityTraceFlags &= ~ActivityTraceFlags.Recorded`. Register via `.AddProcessor<T>()`.
121
+ - `TelemetryClient` mostly works in 3.x but has breaking changes: 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`.
122
+
123
+ 4. Build and verify — the `Enable*` flags (`EnableQuickPulseMetricStream`, `EnableDependencyTrackingTelemetryModule`, etc.) still work with the same defaults. No changes needed for those.
124
+
125
+ ## Behavior notes
126
+
127
+ - `TracesPerSecond` is the default sampling mode (effective default `5`). No configuration needed for most apps.
128
+ - Connection string resolution order: `ApplicationInsightsServiceOptions.ConnectionString` → `APPLICATIONINSIGHTS_CONNECTION_STRING` env var → `ApplicationInsights:ConnectionString` in config.
129
+
130
+ ## See also
131
+
132
+ - No-code-change migration(see in appinsights-2x-to-3x-no-code-change.md)
133
+ - AddApplicationInsightsTelemetry API reference(see in AddApplicationInsightsTelemetry.md)
134
+ - TelemetryClient breaking changes(see in TelemetryClient.md)
@@ -0,0 +1,92 @@
1
+ ---
2
+ title: Application Insights 2.x to 3.x — No-Code-Change Migration
3
+ category: migration
4
+ applies-to: 3.x
5
+ ---
6
+
7
+ # App Insights 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 `AddApplicationInsightsTelemetry()` with no arguments, an `IConfiguration`, or with options that only set **unchanged properties**.
14
+ 2. You do not use any **removed extension methods** (`UseApplicationInsights()`, `AddApplicationInsightsTelemetryProcessor<T>()`, `ConfigureTelemetryModule<T>()`).
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
+ | `EnableRequestTrackingTelemetryModule` | `true` |
26
+ | `AddAutoCollectedMetricExtractor` | `true` |
27
+ | `EnableAuthenticationTrackingJavaScript` | `false` |
28
+
29
+ If your code only uses these properties (or none at all), **and** does not use `ITelemetryInitializer` or `ITelemetryProcessor`, no code changes are needed. (`TelemetryClient` still works in 3.x — existing usage does not block a no-code-change upgrade.)
30
+
31
+ ## Migration steps
32
+
33
+ ### 1. Update the package
34
+
35
+ ```xml
36
+ <PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="3.*" />
37
+ ```
38
+
39
+ ### 2. Build and run
40
+
41
+ That's it. No code changes required.
42
+
43
+ ## Examples that work without changes
44
+
45
+ **Parameterless call:**
46
+ ```csharp
47
+ using Microsoft.Extensions.DependencyInjection;
48
+
49
+ var builder = WebApplication.CreateBuilder(args);
50
+ builder.Services.AddApplicationInsightsTelemetry();
51
+ var app = builder.Build();
52
+ ```
53
+
54
+ **IConfiguration overload:**
55
+ ```csharp
56
+ using Microsoft.Extensions.DependencyInjection;
57
+
58
+ var builder = WebApplication.CreateBuilder(args);
59
+ builder.Services.AddApplicationInsightsTelemetry(builder.Configuration);
60
+ var app = builder.Build();
61
+ ```
62
+
63
+ **Options with only unchanged properties:**
64
+ ```csharp
65
+ using Microsoft.Extensions.DependencyInjection;
66
+ using Microsoft.ApplicationInsights.AspNetCore.Extensions;
67
+
68
+ var builder = WebApplication.CreateBuilder(args);
69
+ builder.Services.AddApplicationInsightsTelemetry(options =>
70
+ {
71
+ options.ConnectionString = "InstrumentationKey=...;IngestionEndpoint=...";
72
+ options.EnableQuickPulseMetricStream = true;
73
+ options.EnableDependencyTrackingTelemetryModule = true;
74
+ });
75
+ var app = builder.Build();
76
+ ```
77
+
78
+ All three examples above work identically in 2.x and 3.x.
79
+
80
+ ## What changes under the hood
81
+
82
+ Even though your code stays the same, 3.x brings these improvements automatically:
83
+
84
+ - Telemetry is now collected via OpenTelemetry — better standards alignment and ecosystem compatibility.
85
+ - `TracesPerSecond` (effective default `5`) provides rate-limited sampling out of the box. No configuration needed.
86
+ - Logging is integrated automatically — `ILogger` output is exported to Application Insights without additional setup.
87
+ - Azure resource detection (App Service, VM) happens automatically.
88
+
89
+ ## See also
90
+
91
+ - Application Insights 2.x to 3.x Code Migration(see in appinsights-2x-to-3x-code-migration.md)
92
+ - AddApplicationInsightsTelemetry API reference(see in AddApplicationInsightsTelemetry.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.27",
3
+ "version": "2.0.0-beta.29",
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",