feat(demo): show the app's own telemetry in HackerNewsDemo #1340
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.43) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.43 · 388 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.357
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #1340"
general
weight: 0.35
aranhave
Show the demo app's own telemetry
Author: @williazz · Status: ready for review · 2026-12-03
Background
!Today the demo's telemetry is visible only in a collector; this PR copies it into an in-app Telemetry tab and floating bar, leaving export unchanged.
1. Session, user and vitals processors stamp each span and log record (Telemetry.swift#L120-L145).
2. Batch processors hand them to OTLP/HTTP exporters, which post to
localhost:4318by default.Problem statement
On a simulator, a Revyl device or a reviewer's phone, nothing listens at that endpoint, so a demo of the SDK shows no telemetry. A reviewer must run a collector and backend to see which records an instrumentation emits or how they nest.
A solution must:
1. Show every span, log and event the SDK hands its exporters, live, in the app.
2. Stay responsive through a 1,000-record load test.
3. Change no SDK or instrumentation code and leave export as it is.
Out of scope
Delivery: the tab shows what reached the exporters, not the collector; a collector remains that check. Metrics: spans and logs only.
Proposal
TimelineSpanProcessorandTimelineLogRecordProcessor(NEW, TelemetryTimeline.swift#L455-L500) copy each record intoTelemetryTimeline(NEW), which keeps the newest 500 and running totals since the last clear, and publishes to the main thread at most every 200 ms (L194-L198). The new Telemetry tab offers:The Revyl walkthrough at
f4b01bd4exercises each, including a 1,000-record load test while paused. OnlyExamples/changes.Alternate solutions
Do nothing
Every demo and review still needs a collector.
An exporter instead of processors
An exporter sees spans only after they end and batch, so in-flight spans and start order would be lost.
Glossary
Burst: one row for consecutive top-level records of one kind, each within a second of the last. OTLP: the OpenTelemetry Protocol. Processor: an SDK hook that sees each span at start and end, or each log at emit, before export.