hashicorp / hashicorp/consul

debug: improvements to the debug command

Open
#10,320 2 comments 0 reactions 0 assignees View on GitHub
theme/reliability theme/telemetry type/enhancement
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

This issue is to track a number of improvements to the data produced by [consul debug](https://www.consul.io/commands/debug). These improvements should make it easier to get useful data from `consul debug`.

* [x] only capture a single cpu profile and single `trace` for the entire duration, instead of a separate one for each interval. A single cpu profile and trace should contain all the same data, and is easier to consume than 4 or 5 separate profiles.
* [ ] capture a single delta `heap`, and `goroutine` profile, instead of a separate one for each interval
* [x] (#10399) change the metrics endpoint to return a stream of metrics each time the window ends, instead of having to poll for metrics, which results in most metrics being missed.
* [x] only capture logs once, instead of once per interval
* [x] add tests for the log capture to show that it properly captures all logs
* [x] rename `cluster.json` to `members.json` to better match the name used by the cli (`consul members`)

Contributor guide

Open the contributing guide

Research direction

Start by locating the implementation of the consul debug command and its existing interval-based heap and goroutine profile capture. Compare those paths with the completed CPU, trace, metrics, and log changes, then verify that one delta heap profile and one delta goroutine profile cover the full duration instead of producing separate files per interval.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, observability
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.