microsoft / microsoft/mxc

Adopt RAII telemetry provider registrations

Open
#952 1 comment 0 reactions 2 assignees View on GitHub

@jsidewhite is already working on this.

Since Aug 19, 2026.

Container-Process Issue-Task OS-Windows
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.