Skip to content

feat(cli): add TRACEROUTE Hops column to checks stats [SIM-278]#1385

Open
danielpaulus wants to merge 1 commit into
feat/cli-pertype-result-renderingfrom
daniel/sim-278-cli-traceroute-hops
Open

feat(cli): add TRACEROUTE Hops column to checks stats [SIM-278]#1385
danielpaulus wants to merge 1 commit into
feat/cli-pertype-result-renderingfrom
daniel/sim-278-cli-traceroute-hops

Conversation

@danielpaulus

Copy link
Copy Markdown
Contributor

What

Adds a bespoke Hops column for TRACEROUTE checks in checkly checks stats, mirroring the existing ICMP Latency / Pkt Loss bespoke-column pattern.

CLI half of SIM-278 — the follow-up @sorccu deferred from #1362.

How

  • src/formatters/batch-stats.ts: TRACEROUTE stays in TIMING_TYPES (so it keeps its final-hop-latency Resp (avg) / Resp (p95) columns — no regression) and additionally gets a Hops column, gated on hasTraceroute exactly like the ICMP branch is gated on hasIcmp. Added in both the markdown and terminal branches of buildColumns().
  • src/rest/batch-analytics.ts: new hopCount_avg field on BatchAnalyticsResult.
  • src/commands/checks/stats.ts: hopCount_avg added to the JSON output.
  • New src/formatters/__tests__/batch-stats.spec.ts covering the Hops column (present for TRACEROUTE, keeps final-hop latency, dash for non-traceroute rows in a mixed batch, column omitted when no traceroute present, dash when hopCount is null).

Dependencies / rollout

Tests / lint

batch-stats.spec.ts (5) + existing analytics.spec.ts (49) pass. eslint + tsc clean.

Related gap (NOT fixed here — for a separate ticket)

CLI per-check analytics (src/rest/analytics.ts) has no checkTypeToPath / defaultMetrics entry for TRACEROUTE (nor GRPC/SSL), so checkly checks get <tracerouteId> analytics throws "Unsupported check type". Out of scope for this batch-stats change; flagging for follow-up.

🤖 Generated with Claude Code

Adds a bespoke `Hops` column for TRACEROUTE checks in `checkly checks stats`,
mirroring the ICMP Latency/Pkt Loss bespoke-column pattern. TRACEROUTE keeps its
final-hop-latency Resp columns (stays in TIMING_TYPES) and additionally shows hop
count from the new hopCount_avg field.

Follow-up to #1362 (stacked on feat/cli-pertype-result-rendering). hopCount_avg is
populated by the SIM-278 backend change; until it deploys the column renders a dash.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant