bfi-cli 0.1.68 → 0.1.69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +7 -5
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -8333,14 +8333,14 @@ async function runYmc(args, globalOpts) {
|
|
|
8333
8333
|
...requireEnv(rest),
|
|
8334
8334
|
...timeOpts(rest),
|
|
8335
8335
|
page: Number(opt(rest, "--page") || 1),
|
|
8336
|
-
pageSize: Number(opt(rest, "--page-size") || 20)
|
|
8336
|
+
pageSize: Number(opt(rest, "--page-size") || 20),
|
|
8337
|
+
enableProfiler: flag(rest, "--no-profiler") ? "false" : "true"
|
|
8337
8338
|
};
|
|
8338
8339
|
for (const [k, name] of [
|
|
8339
8340
|
["sqlStr", "--sql-str"],
|
|
8340
8341
|
["md5Sql", "--md5"],
|
|
8341
8342
|
["traceId", "--trace-id"],
|
|
8342
|
-
["curAppCode", "--app"]
|
|
8343
|
-
["enableProfiler", "--profiler"]
|
|
8343
|
+
["curAppCode", "--app"]
|
|
8344
8344
|
]) {
|
|
8345
8345
|
const v = opt(rest, name);
|
|
8346
8346
|
if (v) body[k] = v;
|
|
@@ -8378,6 +8378,7 @@ async function runYmc(args, globalOpts) {
|
|
|
8378
8378
|
}
|
|
8379
8379
|
const cost = opt(rest, "--min-cost");
|
|
8380
8380
|
if (cost) body.costTime = [Number(cost), 999999];
|
|
8381
|
+
if (flag(rest, "--profiler")) console.error("⚠️ --profiler 是上游采样过滤器,实测常返回空集——常规取证请去掉(CPU 热点走 dump-list)");
|
|
8381
8382
|
emit(await api.call("ymc/warningCall", body), jsonMode, (data) => {
|
|
8382
8383
|
const d = data;
|
|
8383
8384
|
const rows = Array.isArray(d) ? d : d.rows ?? d.data ?? [];
|
|
@@ -8742,8 +8743,9 @@ bfi ymc — 观测查询(v2 API:YMC/Kibana/SLS/trace)
|
|
|
8742
8743
|
sls-logs <trace_id> -e <env> 原子源:SLS 业务日志
|
|
8743
8744
|
sls-raw "<查询>" -e <env> SLS 原始查询(完整查询语法透传)
|
|
8744
8745
|
sls-grep "<关键词>" -e <env> SLS 全文检索聚合(异常历史分布取证)
|
|
8745
|
-
slowsql -t <time> [-e] [--sql-str] [--md5] [--trace-id] [--app] [--profiler]
|
|
8746
|
-
slowcall -t <time> [-e] [--trace-id] [--app] [--method] [--min-cost ms]
|
|
8746
|
+
slowsql -t <time> [-e] [--sql-str] [--md5] [--trace-id] [--app] [--no-profiler]
|
|
8747
|
+
slowcall -t <time> [-e] [--trace-id] [--app] [--method] [--min-cost ms]
|
|
8748
|
+
[--profiler] # ⚠️ 采样过滤器实测常为空集,常规取证勿带
|
|
8747
8749
|
exceptions -t <time> [-e] [--app]
|
|
8748
8750
|
alerts -t <time> [-e] [--level error|warn|info]
|
|
8749
8751
|
url-stats </uri> -t <time> -e <env> [--app <service_name>]
|