MetaMask / MetaMask/metamask-extension

[P3] Add PR-review guardrail for new Sentry span instrumentation

Open
#43,414 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

INVALID-ISSUE-TEMPLATE team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

Parent Epic: #43410 - Sentry Quota Breach Incident — Extension Telemetry
Labels: team-extension-platform
Priority: P3


🎯 Goal

Add a PR-review guardrail (checklist and/or CI lint) that catches quota-risky Sentry span instrumentation before it ships.


📝 Context

The 13.32.0 incident was caused by new custom spans (AssetsDataSourceTiming, AssetsUpdatePipeline) that fan out per trace, shipped with no per-trace sample gate and no kill-switch. Once released, the only remediation paths were a full release inbound filter (total data loss for the release) or forward-only code fixes. Catching the pattern at review time is the cheapest point of intervention.


✅ Acceptance Criteria

  • Review checklist for PRs adding trace()/custom spans: fan-out analysis (spans per trace, traces per session), deterministic sub-sample gate, and a runtime kill-switch (env or remote flag).
  • Evaluate a CI lint or codeowners rule on the TraceName registry / Sentry instrumentation paths so new instrumentation requires platform-team review.
  • Guidance linked from the contributor docs and the telemetry-quota runbook.

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.

Research direction

Start by locating the TraceName registry, Sentry instrumentation paths, contributor docs, and telemetry-quota runbook mentioned in the acceptance criteria. Define the review checklist and assess a CI lint or codeowners rule for new trace() or custom-span instrumentation; done means the guidance is linked and new instrumentation receives the required quota, sampling, kill-switch, and platform-review checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ci-cd, documentation, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.