feat(telemetry): add UI toggle and YAML-driven hot-reload for telemetry#150
Open
Gucc111 wants to merge 3 commits into
Open
feat(telemetry): add UI toggle and YAML-driven hot-reload for telemetry#150Gucc111 wants to merge 3 commits into
Gucc111 wants to merge 3 commits into
Conversation
…ings UI
Wire a top-level `telemetry: { enabled: false }` field in
pilotdeck.yaml so the analytics opt-in can be controlled from the
Web UI Settings > Advanced section instead of raw env vars.
Co-authored-by: Cursor <cursoragent@cursor.com>
…ale YAML updateRaw now writes rawRef.current synchronously so that callers who invoke setRaw + save in the same event loop (e.g. the telemetry toggle) no longer race against React's batched re-render. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the env-var-based ANALYTICS_ENABLED mapping with a direct YAML config path: gateway now parses telemetry.enabled from the config snapshot and subscribes to config changes via configStore. - Add setEnabled() to TelemetryClient/TelemetrySender for runtime enable/disable (starts/stops the flush timer accordingly) - Parse telemetry section in loadPilotConfig and add to PilotConfig - Pass initial enabled value from config snapshot in pilotdeck.ts - Subscribe to telemetry.* changes for hot-reload - Remove ANALYTICS_ENABLED env var mapping from buildRuntimeEnv Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
telemetry.enabledas a first-class field inpilotdeck.yaml, parsed by the gateway config store.configStore.subscribedetectstelemetry.*changes and callstelemetry.setEnabled()at runtime, starting/stopping the flush timer accordingly.ANALYTICS_ENABLEDenvironment variable intermediate layer — telemetry is now driven directly by YAML config.rawRefrace condition inusePilotDeckConfigwheresave()could read stale YAML when called immediately aftersetRaw().Changes (11 files, +109/−8)
types.ts,collector.ts,sender.tssetEnabled()API with timer start/stopconfig/types.ts,loadPilotConfig.tstelemetrysection, addPilotTelemetryConfigpilotdeck.tspilotdeckConfig.jsSettings.tsx,usePilotDeckConfig.tsen/settings.json,zh-CN/settings.jsonTest plan
queued/sentcounts after some activitypilotdeck.yamlexternally to settelemetry.enabled: true, verify gateway picks up the change without restartCONFIG_UNKNOWN_FIELDwarning for thetelemetrykeyMade with Cursor