Skip to content

pkg/cli: enhance tsdump functionality to work with explicit static list of metrics#159269

Draft
Abhinav1299 wants to merge 1 commit intocockroachdb:release-25.3from
Abhinav1299:metrics-list-file-backport
Draft

pkg/cli: enhance tsdump functionality to work with explicit static list of metrics#159269
Abhinav1299 wants to merge 1 commit intocockroachdb:release-25.3from
Abhinav1299:metrics-list-file-backport

Conversation

@Abhinav1299
Copy link
Copy Markdown
Contributor

@Abhinav1299 Abhinav1299 commented Dec 11, 2025

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.

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

Co-authored-by: Abhinav1299 <abhinav.gupta@cockroachlabs.com>
@blathers-crl
Copy link
Copy Markdown

blathers-crl Bot commented Dec 11, 2025

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 blathers-crl Bot added the backport Label PR's that are backports to older release branches label Dec 11, 2025
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

@Abhinav1299 Abhinav1299 changed the title Merge #158626 pkg/cli: enhance tsdump functionality to work with explicit static list of metrics Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Label PR's that are backports to older release branches

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants