Fix telemetry config errors#2336
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
hleb-rubanau
approved these changes
Oct 27, 2025
Contributor
|
🎉 This PR is included in version @appland/telemetry-v1.1.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.