cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

Merge #158626

Open Abhinav1299 opened this issue 11 months ago • 2 comments

158626: pkg/cli: enhance tsdump functionality to work with explicit static list of metrics r=Abhinav1299 a=Abhinav1299

This commit introduces the ability to specify a list of metrics to dump via a file using the --metrics-list-file flag in the debug tsdump command. The implementation includes:

  • A new metricsListFile option in the debugTimeSeriesDumpOpts struct to hold the file path.
  • Functions to read and parse the metrics list file, supporting both literal metric names and regex patterns.
  • Logic to expand the specified metrics into their corresponding internal timeseries names, including handling of histogram metrics.

This enhancement allows users to selectively dump metrics, improving the flexibility and usability of the tsdump command.

Part of: CRDB-57350 Epic: CRDB-55082 Release note: none

Release justification: Supportability improvement that will help to detect/debug production issue.

Abhinav1299 avatar Dec 11 '25 13:12 Abhinav1299

Thanks for opening a backport.

Before merging, please confirm that the change does not break backwards compatibility and otherwise complies with the backport policy. Include a brief release justification in the PR description explaining why the backport is appropriate. All backports must be reviewed by the TL for the owning area. While the stricter LTS policy does not yet apply, please exercise judgment and consider gating non-critical changes behind a disabled-by-default feature flag when appropriate.

blathers-crl avatar Dec 11 '25 13:12 blathers-crl

This change is Reviewable

cockroach-teamcity avatar Dec 11 '25 13:12 cockroach-teamcity