Repository navigation
SCA-3922: Shadow Device Signals on Prometheus - #26150
Git-on-my-level wants to merge 6 commits into
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8fa599aa32
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| static void mirrorDeviceSignal(String eventName, Map<String, dynamic>? properties) { | ||
| if (!deviceSignalTrackingEnabled) return; | ||
| ClientTelemetry.instance.observeDeviceSignal(eventName, properties); |
There was a problem hiding this comment.
Purge queued device signals when analytics consent is revoked
When migration is enabled and a user opts out before the 30-second flush, this consent check stops new observations but does not revoke queued ones. optOutTracking() clears _queuedEvents, while the newly mirrored observations remain in ClientTelemetryOutbox. _armTimer() and onBackground() continue flushing that outbox, and _flushOwner() checks the Firebase owner/token rather than analytics consent, so these health events and heartbeats can still be uploaded after tracking is disabled. Purge pending device_signal rows on consent revocation and fence their delivery against consent changes without disabling unrelated operational telemetry.
Useful? React with 👍 / 👎.
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
# Conflicts: # backend/charts/monitoring/alert-rules.json # backend/main.py # config/feature-flags.yaml
|
@kodjima33 UI changes involving Git-on-my-level require your approval. Review the current diff, then comment |
Summary
SCA-3922 adds a durable hourly export for Device Signals and eight muted Prometheus shadow rules. Collector writes deduplicate by authenticated owner, event hour and signal. The replacement rules preserve the strict WAL and wedge predicates and evaluate closed UTC hours with a delivery grace. Heartbeats distinguish covered zeroes from missing intake.
The exporter and client switches default off. SCA-3921 owns reviewed production activation, Firestore TTL and the seven-day matched-window receipt. Detailed admin consumers of desktop health and phone/device health need replacement or an explicit disposition before the event routes can go off. The legacy sampling bridge expires December 7.
Product invariants affected
Verification
The broad local backend push shard failed in account-deletion fixtures on both this branch and main. The publish retry uses the documented backend-unit hook override after the focused suites passed. GitHub CI will run the configured checks.
UI-Evidence: none -- Internal telemetry and monitoring changes.
Line-Count-Exception: app/lib/utils/analytics/analytics_manager.dart | 3155 -> 3169 | Keep the shadow dispatch beside the analytics consent and event routing authority.
Line-Count-Exception: backend/config/client_telemetry.py | 1488 -> 1535 | Validate the additive family alongside the collector's strict schema and field allowlists.
Line-Count-Exception: desktop/macos/Desktop/Sources/AnalyticsManager.swift | 1704 -> 1706 | Attach the health mirror at the remote diagnostic emitter and honor the existing SDK opt-out.