Commit 06d4ff4
authored
feat(telemetry): add performance instrumentation and CLI Performance dashboard (#625)
## Summary
- Add tracing spans and timing attributes for key performance-sensitive
operations
- Remove redundant distribution metrics that duplicate span attributes
- Create a [CLI Performance
dashboard](https://sentry.sentry.io/dashboard/2335804/) with 18 widgets
## Instrumentation Changes
| Change | File | Details |
|--------|------|---------|
| Target resolution span | `resolve-target.ts` | Wraps
`resolveOrgAndProject()` and `resolveAllTargets()` in `resolve` spans
with `resolve.method`
(`flags`/`env_vars`/`defaults`/`dsn`/`inference`/`none`) and
`resolve.cache_hit` attributes |
| Env file scanning span | `dsn/env-file.ts` | Wraps
`detectFromEnvFiles()` and `detectFromAllEnvFiles()` in `dsn.detect.env`
spans with `dsn.env_files_checked` and `dsn.env_dsn_found` attributes |
| Command phase timing | `command.ts` | Adds `phase.pre_ms`,
`phase.exec_ms`, `phase.render_ms` attributes to the root `cli.command`
span via `performance.now()` markers |
| Completion result count | `telemetry.ts` | Emits
`completion.result_count` distribution metric from the deferred
telemetry queue |
| Remove redundant metrics | `dsn/code-scanner.ts` | Removes
`dsn.files_collected`, `dsn.files_scanned`, `dsn.dsns_found`
distribution metrics — span attributes on `dsn.detect.code` already
capture identical data |
## Dashboard Layout (18 widgets, 10 rows)
| Row | Left (w=3) | Right (w=3) |
|-----|------------|-------------|
| 1 | Command Duration (p50/p75/p90) | Command Volume by Runtime |
| 2 | Duration by Command (full w=6) | |
| 3 | Completion Latency (p50/p75/p90) | Completion by Command (p75) |
| 4 | Target Resolution (p50/p75/p90) | Resolution by Method |
| 5 | Command Phase Breakdown (full w=6) | |
| 6 | DSN Detection Duration (p75) | File Scan Volume (avg) |
| 7 | Project Root Detection | HTTP Cache Hit/Miss |
| 8 | API Response Time (p50/p90) | API Calls per Command |
| 9 | CPU & Event Loop Utilization | Memory Usage |
| 10 | Seer AI Outcomes | Delta Upgrade Stats |1 parent 7ce9bdf commit 06d4ff4
File tree
5 files changed
+260
-203
lines changed- src/lib
- dsn
5 files changed
+260
-203
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
593 | 606 | | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
598 | | - | |
599 | 607 | | |
600 | | - | |
601 | | - | |
602 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
603 | 612 | | |
604 | 613 | | |
605 | 614 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | 18 | | |
21 | 19 | | |
22 | 20 | | |
| |||
689 | 687 | | |
690 | 688 | | |
691 | 689 | | |
692 | | - | |
693 | | - | |
694 | | - | |
695 | 690 | | |
696 | 691 | | |
697 | 692 | | |
| |||
709 | 704 | | |
710 | 705 | | |
711 | 706 | | |
712 | | - | |
713 | | - | |
714 | | - | |
715 | | - | |
716 | | - | |
717 | | - | |
718 | | - | |
719 | 707 | | |
720 | 708 | | |
721 | 709 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| 27 | + | |
| 28 | + | |
26 | 29 | | |
27 | 30 | | |
28 | 31 | | |
| |||
99 | 102 | | |
100 | 103 | | |
101 | 104 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
111 | 118 | | |
112 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
113 | 124 | | |
114 | 125 | | |
115 | 126 | | |
| |||
125 | 136 | | |
126 | 137 | | |
127 | 138 | | |
128 | | - | |
129 | | - | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
130 | 145 | | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
147 | 159 | | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
153 | 168 | | |
154 | | - | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
155 | 176 | | |
156 | 177 | | |
157 | 178 | | |
| |||
168 | 189 | | |
169 | 190 | | |
170 | 191 | | |
| 192 | + | |
171 | 193 | | |
172 | 194 | | |
173 | 195 | | |
| |||
188 | 210 | | |
189 | 211 | | |
190 | 212 | | |
| 213 | + | |
191 | 214 | | |
192 | 215 | | |
193 | 216 | | |
| |||
202 | 225 | | |
203 | 226 | | |
204 | 227 | | |
205 | | - | |
| 228 | + | |
206 | 229 | | |
207 | 230 | | |
208 | 231 | | |
| |||
0 commit comments