Files
sbroenne__mcp-server-excel/Directory.Build.props.user.template
T
Stefan Broenner 073f25450b refactor: simplify telemetry - always enabled, build-time connection string (#246)
* refactor: simplify telemetry - always enabled, build-time connection string

- Remove opt-out functionality (EXCELMCP_TELEMETRY_OPTOUT)
- Embed AppInsights connection string at build time via MSBuild
- Add Directory.Build.props.user for local dev connection string
- Remove runtime environment variable lookup for connection string
- Update release workflows to pass connection string to build
- Remove obsolete test.runsettings file
- Simplify IsEnabled to always return true

* refactor: consolidate prompts and improve tool descriptions

- Reduce prompts from 14 to 2 (keep only high-value guides)
- Remove 13 orphaned .md content files
- Fix ExcelWorksheetTool incorrect 'save' action reference
- Improve ExcelRangeTool and ExcelNamedRangeTool descriptions
- Slim ServerInstructions to essential info only
- Remove redundant telemetry flush (SDK handles automatically)

* refactor(telemetry): disable dependency tracking for HTTP calls in telemetry configuration

* test hook

* fix: correct Application Insights telemetry context

- Set Component.Version explicitly to override SDK auto-detection
  (was picking up Excel COM interop 15.0.0.0 instead of app 1.0.0)
- Anonymize cloud_RoleInstance (was exposing machine name)
- Now all telemetry context values are privacy-safe:
  - application_Version: from assembly metadata
  - cloud_RoleName: fixed 'ExcelMcp.McpServer'
  - cloud_RoleInstance: anonymous hash 'instance-xxxx'
  - user_Id: anonymous hash of machine identity
  - session_Id: random per session

* fix: telemetry improvements for Users/Sessions analytics

- Remove debug mode from telemetry (simplify code)
- Fix PageView tracking to include duration (required for User Flows)
- Always override application_Version (SDK picks up Excel 15.0.0.0)
- Add explicit Flush() call in smoke tests for reliable telemetry delivery
- Fix smoke test shutdown to use graceful shutdown before cancellation

Telemetry now correctly populates:
- requests table (with duration, success, resultCode)
- pageViews table (with duration for User Flows)
- user_Id and session_Id (for Users/Sessions blades)
- application_Version (MCP Server version, not Excel)
2025-12-01 13:34:39 +00:00

18 lines
662 B
Plaintext

<!--
Local developer settings (COPY to Directory.Build.props.user)
This file is a template. To use:
1. Copy this file to Directory.Build.props.user
2. Fill in your actual values
3. Directory.Build.props.user is gitignored and won't be committed
The values here are picked up by MSBuild at build time and embedded into the compiled assembly.
-->
<Project>
<PropertyGroup>
<!-- Application Insights connection string for telemetry -->
<!-- Get from Azure Portal: Application Insights > Overview > Connection String -->
<AppInsightsConnectionString>YOUR_CONNECTION_STRING_HERE</AppInsightsConnectionString>
</PropertyGroup>
</Project>