Skip to content

Fix telemetry config errors#2336

Merged
dividedmind merged 2 commits into
mainfrom
fix/telemetry-config-errors
Oct 27, 2025
Merged

Fix telemetry config errors#2336
dividedmind merged 2 commits into
mainfrom
fix/telemetry-config-errors

Conversation

@dividedmind

Copy link
Copy Markdown
Collaborator

For some users, especially on Windows, updating telemetry configuration files fails sometimes. This should not be a fatal error.
This change addresses this problem. Another commit also fixes some intermittent test warnings in telemetry.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses telemetry configuration errors that occur for some users, particularly on Windows, by making configuration file updates non-fatal. When configuration writes fail due to permissions or other issues, the code now catches exceptions and logs warnings instead of crashing.

Key changes:

  • Added try-catch blocks around configuration file writes to prevent fatal errors
  • Updated Splunk backend to track pending requests using a Set instead of a counter for more reliable request management
  • Fixed test cleanup issues by properly clearing timeouts and adding missing ESLint disable directive

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/telemetry/src/session.ts Wrapped session renewal and touch operations in try-catch blocks to handle config write failures gracefully
packages/telemetry/src/identity.ts Added try-catch around machine ID persistence to prevent crashes on write failures
packages/telemetry/src/backends/splunk.ts Changed pending request tracking from counter to Set for accurate lifecycle management and added cleanup on timeout
packages/telemetry/tests/session.spec.ts Updated tests to match new batched config.set API and added test coverage for error handling scenarios
packages/telemetry/tests/backends/application-insights.spec.ts Fixed timeout cleanup to prevent test warnings by clearing both interval and timeout

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread packages/telemetry/src/backends/splunk.ts
Comment thread packages/telemetry/tests/backends/application-insights.spec.ts
@dividedmind dividedmind merged commit 53fa742 into main Oct 27, 2025
29 checks passed
@dividedmind dividedmind deleted the fix/telemetry-config-errors branch October 27, 2025 12:21
@appland-release

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version @appland/telemetry-v1.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants