fix: bound telemetry request timeout - #2048
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughWrite-Telemetry now limits its REST request to five seconds and treats REST failures as terminating errors. New Pester tests verify both request parameters and non-throwing behavior when the HTTP call fails. ChangesTelemetry request handling
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
merill
left a comment
There was a problem hiding this comment.
Thanks @SamErde this makes sense.
Long term I might look at using a proper OTel package for Maester.
Maybe https://opentelemetry.io/docs/zero-code/dotnet/getting-started/
This will allow users to configure where telemetry is sent to.
Summary
Why
Write-Telemetryruns synchronously duringInvoke-Maester. When the PostHog endpoint is blocked or unreachable, the request previously relied on the operating system or HTTP stack's default timeout and could materially delay an assessment. Telemetry is optional and should not hold up assessment execution.Closes #2047.
Validation
Build-MaesterModule.ps1: passedTest-MaesterModuleOutput.ps1: passedgit diff --check: passedSummary by CodeRabbit
Bug Fixes
Tests