You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/DEVELOPMENT.md
+57-92Lines changed: 57 additions & 92 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -373,13 +373,23 @@ dotnet build -c Release
373
373
374
374
## 📊 **Application Insights / Telemetry Setup**
375
375
376
-
ExcelMcp uses Azure Application Insights for anonymous usage telemetry and crash reporting. Telemetry is **opt-out** (enabled by default in release builds).
376
+
ExcelMcp uses Azure Application Insights (Classic SDK with WorkerService integration) for anonymous usage telemetry and crash reporting. Telemetry is **opt-out** (enabled by default in release builds).
377
+
378
+
### **How It Works**
379
+
380
+
The Application Insights connection string is **embedded at build time** via MSBuild - there is no runtime environment variable lookup.
381
+
382
+
**Build-time flow:**
383
+
1. MSBuild reads `AppInsightsConnectionString` property (from `Directory.Build.props.user` or env var)
384
+
2. Generates `TelemetryConfig.g.cs` with the connection string as a `const string`
385
+
3. Compiled assembly contains the embedded connection string
# 4. Run - telemetry is automatically sent to Azure
424
+
dotnet run --project src/ExcelMcp.McpServer/ExcelMcp.McpServer.csproj
425
+
```
426
+
427
+
**Note:**`Directory.Build.props.user` is gitignored - your connection string won't be committed.
428
+
429
+
### **Local Development without Telemetry**
430
+
431
+
If you don't create `Directory.Build.props.user`, builds will have an empty connection string and telemetry will be disabled. This is the default for local development.
432
+
399
433
### **Azure Resources Setup (Maintainers Only)**
400
434
401
435
To deploy the Application Insights infrastructure:
@@ -419,106 +453,37 @@ After deploying Azure resources:
419
453
2. Add new secret: `APPINSIGHTS_CONNECTION_STRING`
420
454
3. Paste the connection string from deployment output
421
455
422
-
The release workflow automatically injects this at build time.
423
-
424
-
### **Local Development**
425
-
426
-
During local development, telemetry is **disabled by default** because the placeholder connection string is not replaced. This is intentional - no telemetry data is sent from dev builds.
427
-
428
-
#### **Debug Mode: Console Output**
429
-
430
-
To test telemetry locally without Azure, enable debug mode which logs to stderr:
431
-
432
-
```powershell
433
-
# Enable debug telemetry (logs to console instead of Azure)
0 commit comments