Adopt RAII telemetry provider registrations
@jsidewhite is already working on this.
Since Aug 19, 2026.
- Dominant language
- Rust
- Stars
- 1.3k
- Forks
- 79
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 117
Description
### Description of the task
Replace the low-level reference-counted telemetry provider `init`/`shutdown` pairing with an RAII registration guard, so every successful acquisition is released even if a future multi-invocation executable suppresses a duplicate terminal event or exits through a new early-return path.
The current production executable paths initialize once per process, and library streaming paths already pair registrations with `TelemetryProcess` teardown, so this is hardening rather than a current release blocker.
### Additional context
Raised in https://github.com/microsoft/mxc/pull/819#discussion_r3772247192.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.