← Back to Pull requests

feat(devices): add a per-device DERP latency toggle #1201

Closed
unknown closed this pull request without merging on Nov 22, 2026 01:07 UTC
View on GitHub
unknown unknown commented on Nov 22, 2026 00:53 UTC
Author

What changed

Add cardinality.per_entity.device_derp_latency, enabled by default. Turning it off suppresses only the per-device DERP latency points. Device online status and DERP region rollups remain available.

Acceptance evidence

| Issue | AC | AC text | Evidence class | Proof |
| --- | --- | --- | --- | --- |
| #1101 | AC1 | With the toggle off no tailscale.device.derp.latency point is emitted while tailscale.device.online is still emitted for every device | code | internal/collector/devices/devices_test.go drives the real collector with synthetic devices. The disabled run emits no per-device latency points and still records online status for each input device. |
| #1101 | AC2 | With the toggle off the tailscale.derp.region rollup gauges are emitted exactly as with it on | code | internal/collector/devices/devices_test.go compares nonempty region maps for devices, preferred region, and minimum latency with the default-on and off settings. |
| #1101 | AC3 | With the toggle unset the emitted device series equal those on base | code | internal/collector/devices/devices_test.go exercises the real collector. Independent review recorded 73 identical SDK samples on base, unset, and explicit true; explicit false removed only the two per-device latency points. cmd/tailscale2otel/testdata/effectiveconfig.golden.yaml pins the effective default to true. These are collector and CLI checks, not a deployed run. |
| #1101 | AC4 | config.example.yaml, config.schema.json, docs/env-vars.md and the chart values, schema and README all carry the new key and the generated-artifact gates pass | code | config.example.yaml and config.schema.json carry the key, as do the environment reference and chart files. Pinned generators reproduced the outputs without a diff, and the full gate passed. |
| #1101 | AC5 | The chart version in Chart.yaml is bumped | code | deploy/helm/tailscale2otel/Chart.yaml moves from 0.36.5 to 0.36.6. |

Closes #1101

``landing-evidence
base=d1246a4375321a1a1132b22922bfb7f2f44343c9
head=b32ef6bcca0f5994abcf2fdbe94121c3b0945133
tree=b52a1f565fa4fe3195b2978b80b9f276f2f2c9b2
gate=just setup && just check; remote gate 20261122-004702-48481a exit 0 on clean head
focused=real collector recorder tests and exact effective-config golden; generation no diff
local-review=PASS on exact head/base
``

Diff: 294 lines (+220 / -74) across 3 files Reviewer: cursor[bot] Review duration: 14m
All Vouch review confidence checks passed
Residual risk 0.17 = Change Risk (0.40) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 294 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
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.340
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #1201"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 39.9% (MEDIUM) · Higher = larger blast radius
39.9%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 17.3% · Safe to merge
17.3%