dx 命令

目录

  1. 简介
  2. 命令格式
  3. 子命令
  4. 添加 section
  5. 示例
  6. 版本历史
  7. 相关命令

简介

dx 命令用于创建、组织和导出诊断案例包(DX case):把 target、client、job、probe、consumer、错误、备注和摘要收集到同一个可导出的上下文中,便于排障复盘和团队协作。

通过 createaddsummaryexport 等子命令可以把一次诊断过程的所有线索沉淀为一个独立的工件,避免散落在不同终端和会话之间。导出后的 DX case 也方便附在 issue / PR 中作为复现凭据。

命令格式

peeka-cli dx <subcommand> [options]

子命令

子命令 说明
create --target <id> --title <text> 创建 DX case
list 列出 DX case
status --dx-case <id> 查看状态
add --dx-case <id> 添加一个 section
summary --dx-case <id> 生成摘要
export --dx-case <id> 导出 DX case
close --dx-case <id> 关闭 DX case

常用参数:

参数 说明
--target <id> 所属 target;create 必填,其他子命令可选
--client <id> 可选所属客户端,用于访问控制
--format table/json 输出格式,默认 table
--output-path <path> export 的可选输出路径

添加 section

peeka-cli dx add \
  --dx-case dx_123 \
  --section-type note \
  --title "Investigation note" \
  --payload-json '{"text":"slow query reproduced"}'

--section-type 支持 targetclientjobprobeconsumernoteerrorsummary。可以用 --object-ref-type--object-ref-id 关联现有对象。

示例

peeka-cli dx create --target target_abcd1234 --title "Slow request"
peeka-cli dx list --target target_abcd1234
peeka-cli dx summary --dx-case dx_123
peeka-cli dx export --dx-case dx_123 --output-path ./slow-request.dx.json
peeka-cli dx close --dx-case dx_123

版本历史

版本 发布日期 变更说明
0.1.16 2026-06-07 新增 dx 命令组

相关命令

  • target - 管理 target
  • job - 收集命令任务信息
  • probe - 收集探针事件

回到顶部

Copyright © 2026 Peeka contributors. Distributed under the Apache License 2.0.

This site uses Just the Docs, a documentation theme for Jekyll.