You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
backend/lib/metrics.js + src/sentry-metrics.ts: thin wrappers around Sentry.metrics.* that add the shared attributes (platform, device_class, os_major) and units to every metric, and do nothing when Sentry is off (§11.6)
Record the §11.2.a inventory: RPC durations + error counts (client and server), boot/shutdown phase timings and outcomes, sync session metrics, a 60-second sampler for backend memory + event-loop delay, state transitions, storage size/free buckets, IPC error counts, telemetry-forwarding failures, and low-memory warnings from the OS
Split the RPC hooks on both sides: always record the metric; only create a Sentry span when debug is on. Record the metric while the span is active so the metric links to the trace (§11.3)
tracesSampleRate now driven by debug (1.0 when on, 0 when off); console-log capture on the backend also moves behind debug
A beforeSendMetric filter on all four SDKs (React Native, Node, Android, iOS): remove the user.* fields Sentry attaches by default, and drop any metric carrying a forbidden attribute (§11.8)
backend/lib/sentry.test.mjs + src/__tests__/sentry.test.js: debug off ⇒ metric recorded but no span; debug on ⇒ both
Manual smoke per §11.10: metrics explorer shows the data, grouping by device_class works, a metric sample links through to its trace, no user.* fields arrive
Part of #74. Depends on #75. The core of Phase 11: day-to-day performance signal moves to Sentry metrics; per-RPC tracing becomes debug-only.
Spec:
docs/sentry-integration-plan.md§11.2 (metric inventory + volume budget), §11.3 (traces), §11.6 (code changes by file), §11.8 (attribute rules + filter hook).Deliverables
backend/lib/metrics.js+src/sentry-metrics.ts: thin wrappers aroundSentry.metrics.*that add the shared attributes (platform,device_class,os_major) and units to every metric, and do nothing when Sentry is off (§11.6)debugis on. Record the metric while the span is active so the metric links to the trace (§11.3)tracesSampleRatenow driven bydebug(1.0 when on, 0 when off); console-log capture on the backend also moves behinddebugbeforeSendMetricfilter on all four SDKs (React Native, Node, Android, iOS): remove theuser.*fields Sentry attaches by default, and drop any metric carrying a forbidden attribute (§11.8)Tests
backend/lib/metrics.test.mjs: metric names/attributes/units, shared-attribute injection, no-op when Sentry off, filter behaviourbackend/lib/sentry.test.mjs+src/__tests__/sentry.test.js: debug off ⇒ metric recorded but no span; debug on ⇒ bothdevice_classworks, a metric sample links through to its trace, nouser.*fields arrive