Files
sbroenne__mcp-server-excel/Directory.Build.props
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

56 lines
2.1 KiB
XML

<Project>
<PropertyGroup>
<!-- Common properties for all projects -->
<Version>1.0.0</Version>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
<FileVersion>1.0.0.0</FileVersion>
<Authors>Stefan Broenner</Authors>
<Company>Open Source Developer</Company>
<Product>Sbroenne.ExcelMcp</Product>
<Copyright>Copyright © 2025 Stefan Broenner</Copyright>
<!-- Repository information -->
<PackageProjectUrl>https://github.com/sbroenne/mcp-server-excel</PackageProjectUrl>
<RepositoryUrl>https://github.com/sbroenne/mcp-server-excel</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<!-- Build settings -->
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningsAsErrors />
<!-- Suppress warnings for Windows-only COM interop code -->
<NoWarn>$(NoWarn);CA1416;CS8602;SYSLIB1045;IL2026;IL3050</NoWarn>
<!-- Deterministic builds for reproducibility -->
<Deterministic>true</Deterministic>
<ContinuousIntegrationBuild Condition="'$(CI)' == 'true'">true</ContinuousIntegrationBuild>
<!-- Code Analysis -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisMode>Recommended</AnalysisMode>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<!-- Generate XML documentation for all projects to enable IDE0005 analyzer -->
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<!-- Security -->
<PublishTrimmed>false</PublishTrimmed>
<PublishReadyToRun>false</PublishReadyToRun>
<InvariantGlobalization>false</InvariantGlobalization>
<_SkipUpgradeNetAnalyzersNuGetWarning>true</_SkipUpgradeNetAnalyzersNuGetWarning>
</PropertyGroup>
<!-- Import user-specific properties (gitignored, for local secrets) -->
<Import Project="Directory.Build.props.user" Condition="Exists('Directory.Build.props.user')" />
</Project>