@@ -2,14 +2,12 @@ import { buildRouteMap } from "@stricli/core";
22import { addCommand } from "./add.js" ;
33import { deleteCommand } from "./delete.js" ;
44import { editCommand } from "./edit.js" ;
5- import { typesCommand } from "./types.js" ;
65
76export const widgetRoute = buildRouteMap ( {
87 routes : {
98 add : addCommand ,
109 edit : editCommand ,
1110 delete : deleteCommand ,
12- types : typesCommand ,
1311 } ,
1412 docs : {
1513 brief : "Manage dashboard widgets" ,
@@ -19,13 +17,33 @@ export const widgetRoute = buildRouteMap({
1917 "Display types (width × height):\n" +
2018 " common: big_number (2×1), line (3×2), area (3×2), bar (3×2), table (6×2)\n" +
2119 " specialized: stacked_area (3×2), top_n (3×2), categorical_bar (3×2), text (3×2)\n" +
22- " internal: details, wheel, rage_and_dead_clicks, server_tree, agents_traces_table (3×2)\n\n" +
23- "Default dataset: spans. Run 'sentry dashboard widget types' for the full list.\n\n" +
20+ " internal: details (3×2), wheel (3×2), rage_and_dead_clicks (3×2),\n" +
21+ " server_tree (3×2), agents_traces_table (3×2)\n\n" +
22+ "Datasets: spans (default), discover, issue, error-events, transaction-like,\n" +
23+ " metrics, logs, tracemetrics, preprod-app-size\n\n" +
24+ "Aggregates (spans): count, count_unique, sum, avg, percentile, p50, p75,\n" +
25+ " p90, p95, p99, p100, eps, epm, any, min, max\n" +
26+ "Aggregates (discover adds): failure_count, failure_rate, apdex,\n" +
27+ " count_miserable, user_misery, count_web_vitals, count_if, count_at_least,\n" +
28+ " last_seen, latest_event, var, stddev, cov, corr, performance_score,\n" +
29+ " opportunity_score, count_scores\n" +
30+ "Aliases: spm → epm, sps → eps, tpm → epm, tps → eps\n\n" +
31+ "Row-filling examples:\n" +
32+ " # 3 KPIs (2+2+2 = 6)\n" +
33+ ' sentry dashboard widget add <d> "Error Count" --display big_number --query count\n' +
34+ ' sentry dashboard widget add <d> "P95" --display big_number --query p95:span.duration\n' +
35+ ' sentry dashboard widget add <d> "Throughput" --display big_number --query epm\n\n' +
36+ " # 2 charts (3+3 = 6)\n" +
37+ ' sentry dashboard widget add <d> "Errors" --display line --query count\n' +
38+ ' sentry dashboard widget add <d> "Latency" --display line --query p95:span.duration\n\n' +
39+ " # Full-width table (6 = 6)\n" +
40+ ' sentry dashboard widget add <d> "Top Endpoints" --display table \\\n' +
41+ " --query count --query p95:span.duration --group-by transaction \\\n" +
42+ " --sort -count --limit 10\n\n" +
2443 "Commands:\n" +
2544 " add Add a widget to a dashboard\n" +
2645 " edit Edit a widget in a dashboard\n" +
27- " delete Delete a widget from a dashboard\n" +
28- " types Show available display types and layout info" ,
46+ " delete Delete a widget from a dashboard" ,
2947 hideRoute : { } ,
3048 } ,
3149} ) ;
0 commit comments