Comfy-Org / Comfy-Org/ComfyUI_frontend

Add Sentry alert: partner run gate blocking signed-in users

Open Beginner friendly
#16,504 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

## Context
The local partner-nodes run gate (#15248) is pure client logic with no server backstop for false positives. Every gate-triggered block emits telemetry via `reportError` with `errorType: 'partner_run_gate_blocked'` (level `warning`), tagged with:

- `trigger`: `run-button` | `auto-queue`
- `isLoggedIn`: boolean read at block time
- `partnerNodeCount`: number
- context `partnerNodeTypes`: string[]

## Why Sentry, not Datadog
The gate only runs on local/desktop (`isCloud` short-circuits it). `initTelemetry()` — Datadog RUM — is initialized **inside `if (isCloud)`** in main.ts, so Datadog never sees local/desktop events. Sentry initializes unconditionally with the build-time DSN, so `reportError`'s Sentry sink is the one that carries this signal for the gate's entire population.

## Ask
Create a Sentry alert on events tagged `error_type:partner_run_gate_blocked` with `isLoggedIn:true`. A signed-in block is presumptively a detection bug (stale auth read, scanner false positive, new api_node shape) — that segment should be ~zero, so any sustained occurrence should notify the frontend on-call.

## Mitigation already in place / caveat
- Kill switch: `partner_run_gate_enabled` (default on) resolves through the backend's `/features` endpoint on local/desktop — flipping it fleet-wide therefore needs the backend to serve the key (session/dev overrides remain as per-user rails).

Requested in #15248 review: https://github.com/Comfy-Org/ComfyUI_frontend/pull/15248#issuecomment-5492415110

Contributor guide

Open the contributing guide

Research direction

Start by reading main.ts to confirm the unconditional Sentry initialization and trace reportError's event tags for partner_run_gate_blocked. Configure an alert for error_type:partner_run_gate_blocked with isLoggedIn:true, then verify that the alert targets sustained signed-in blocks and not Datadog-only telemetry.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
observability
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
70/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.