@probelabs/visor 0.1.173 → 0.1.174

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.
Files changed (97) hide show
  1. package/dist/docs/dashboards/README.md +73 -26
  2. package/dist/docs/dashboards/grafana-visor-overview.json +435 -15
  3. package/dist/docs/telemetry-reference.md +387 -0
  4. package/dist/docs/telemetry-setup.md +2 -0
  5. package/dist/generated/config-schema.d.ts +277 -7
  6. package/dist/generated/config-schema.d.ts.map +1 -1
  7. package/dist/generated/config-schema.json +3803 -0
  8. package/dist/index.js +364 -30
  9. package/dist/output/traces/{run-2026-03-09T15-21-25-122Z.ndjson → run-2026-03-09T15-44-30-340Z.ndjson} +84 -84
  10. package/dist/output/traces/{run-2026-03-09T15-22-05-255Z.ndjson → run-2026-03-09T15-45-10-778Z.ndjson} +1852 -1852
  11. package/dist/sdk/{a2a-frontend-VHOQ45CR.mjs → a2a-frontend-5L6H7ZVF.mjs} +3 -3
  12. package/dist/sdk/{a2a-frontend-7CYN3X7M.mjs → a2a-frontend-FUJRKHJB.mjs} +3 -3
  13. package/dist/sdk/{check-provider-registry-65GO3SCO.mjs → check-provider-registry-UM762L7S.mjs} +7 -7
  14. package/dist/sdk/{check-provider-registry-75O5XJMA.mjs → check-provider-registry-UPQNHHFF.mjs} +7 -7
  15. package/dist/sdk/{check-provider-registry-DBTS7OXY.mjs → check-provider-registry-YVQI4IOR.mjs} +7 -7
  16. package/dist/sdk/{chunk-Y5MEQW2W.mjs → chunk-2PL2YH3B.mjs} +19 -19
  17. package/dist/sdk/{chunk-4TV2CVVI.mjs → chunk-34QX63WK.mjs} +16 -14
  18. package/dist/sdk/chunk-34QX63WK.mjs.map +1 -0
  19. package/dist/sdk/{chunk-2HXOGRAS.mjs → chunk-65SHRIQF.mjs} +3 -3
  20. package/dist/sdk/{chunk-2HXOGRAS.mjs.map → chunk-65SHRIQF.mjs.map} +1 -1
  21. package/dist/sdk/{chunk-VVHALCWV.mjs → chunk-EFNNJIMY.mjs} +3 -3
  22. package/dist/sdk/{chunk-7CWJNSL2.mjs → chunk-EP7PQ4IX.mjs} +19 -19
  23. package/dist/sdk/{chunk-AV6KML52.mjs → chunk-I6GKXMQ5.mjs} +19 -19
  24. package/dist/sdk/{chunk-VK7FUBBU.mjs → chunk-UTBSBJFV.mjs} +3 -3
  25. package/dist/sdk/{chunk-HZEXCJGA.mjs → chunk-W4KCJM6J.mjs} +282 -8
  26. package/dist/sdk/chunk-W4KCJM6J.mjs.map +1 -0
  27. package/dist/sdk/{chunk-GVPMO6QD.mjs → chunk-WJIV7MKY.mjs} +3 -3
  28. package/dist/sdk/{chunk-WYFQQ445.mjs → chunk-YEARBXYT.mjs} +3 -3
  29. package/dist/sdk/{chunk-LTHHE6Z5.mjs → chunk-ZI3SEHWA.mjs} +4 -4
  30. package/dist/sdk/{chunk-LTHHE6Z5.mjs.map → chunk-ZI3SEHWA.mjs.map} +1 -1
  31. package/dist/sdk/{config-UXRHADSE.mjs → config-BVL3KFMB.mjs} +2 -2
  32. package/dist/sdk/{failure-condition-evaluator-Q4KNMX6F.mjs → failure-condition-evaluator-4O6BTC4Q.mjs} +4 -4
  33. package/dist/sdk/{failure-condition-evaluator-SNR5XLGN.mjs → failure-condition-evaluator-DL6H57NX.mjs} +4 -4
  34. package/dist/sdk/{github-frontend-56UQTA47.mjs → github-frontend-F2YCPK6H.mjs} +4 -4
  35. package/dist/sdk/{github-frontend-OOP26667.mjs → github-frontend-UXL73NKB.mjs} +4 -4
  36. package/dist/sdk/{host-QRGXXRDA.mjs → host-6TBS44ER.mjs} +3 -3
  37. package/dist/sdk/{host-VYPJ2UGQ.mjs → host-KJTXX76P.mjs} +3 -3
  38. package/dist/sdk/{metrics-FU2G5SZ2.mjs → metrics-JTOG2HNO.mjs} +2 -2
  39. package/dist/sdk/{routing-DBQHPP2O.mjs → routing-AWYB2YX3.mjs} +5 -5
  40. package/dist/sdk/{routing-ZAUCS3HJ.mjs → routing-GF2CF3JT.mjs} +5 -5
  41. package/dist/sdk/{schedule-tool-MHICRNCI.mjs → schedule-tool-IEY2CFLU.mjs} +7 -7
  42. package/dist/sdk/{schedule-tool-VRLX54J5.mjs → schedule-tool-SGCYDSHL.mjs} +7 -7
  43. package/dist/sdk/{schedule-tool-2FIVKPVJ.mjs → schedule-tool-UMDRCNO5.mjs} +7 -7
  44. package/dist/sdk/{schedule-tool-handler-3ES4WON7.mjs → schedule-tool-handler-5EPTHBLS.mjs} +7 -7
  45. package/dist/sdk/{schedule-tool-handler-FQGAWC5N.mjs → schedule-tool-handler-5QVUZ5EZ.mjs} +7 -7
  46. package/dist/sdk/{schedule-tool-handler-KYUHU4JR.mjs → schedule-tool-handler-HMEGLYJF.mjs} +7 -7
  47. package/dist/sdk/sdk.d.mts +137 -133
  48. package/dist/sdk/sdk.d.ts +137 -133
  49. package/dist/sdk/sdk.js +298 -22
  50. package/dist/sdk/sdk.js.map +1 -1
  51. package/dist/sdk/sdk.mjs +6 -6
  52. package/dist/sdk/{trace-helpers-UKMYHQIK.mjs → trace-helpers-6TEWG7RK.mjs} +3 -3
  53. package/dist/sdk/{trace-helpers-ZFDJ55SH.mjs → trace-helpers-FKM2MEDW.mjs} +3 -3
  54. package/dist/sdk/{workflow-check-provider-F5DTEX6E.mjs → workflow-check-provider-7VNIO6L5.mjs} +7 -7
  55. package/dist/sdk/{workflow-check-provider-VEOVTCVU.mjs → workflow-check-provider-EWMZEEES.mjs} +7 -7
  56. package/dist/sdk/{workflow-check-provider-5KQTXKWS.mjs → workflow-check-provider-VJ7VIMCQ.mjs} +7 -7
  57. package/dist/telemetry/metrics.d.ts.map +1 -1
  58. package/dist/traces/{run-2026-03-09T15-21-25-122Z.ndjson → run-2026-03-09T15-44-30-340Z.ndjson} +84 -84
  59. package/dist/traces/{run-2026-03-09T15-22-05-255Z.ndjson → run-2026-03-09T15-45-10-778Z.ndjson} +1852 -1852
  60. package/dist/types/config.d.ts +5 -4
  61. package/dist/types/config.d.ts.map +1 -1
  62. package/package.json +2 -2
  63. package/dist/sdk/chunk-4TV2CVVI.mjs.map +0 -1
  64. package/dist/sdk/chunk-HZEXCJGA.mjs.map +0 -1
  65. /package/dist/sdk/{a2a-frontend-7CYN3X7M.mjs.map → a2a-frontend-5L6H7ZVF.mjs.map} +0 -0
  66. /package/dist/sdk/{a2a-frontend-VHOQ45CR.mjs.map → a2a-frontend-FUJRKHJB.mjs.map} +0 -0
  67. /package/dist/sdk/{check-provider-registry-65GO3SCO.mjs.map → check-provider-registry-UM762L7S.mjs.map} +0 -0
  68. /package/dist/sdk/{check-provider-registry-75O5XJMA.mjs.map → check-provider-registry-UPQNHHFF.mjs.map} +0 -0
  69. /package/dist/sdk/{check-provider-registry-DBTS7OXY.mjs.map → check-provider-registry-YVQI4IOR.mjs.map} +0 -0
  70. /package/dist/sdk/{chunk-Y5MEQW2W.mjs.map → chunk-2PL2YH3B.mjs.map} +0 -0
  71. /package/dist/sdk/{chunk-VK7FUBBU.mjs.map → chunk-EFNNJIMY.mjs.map} +0 -0
  72. /package/dist/sdk/{chunk-7CWJNSL2.mjs.map → chunk-EP7PQ4IX.mjs.map} +0 -0
  73. /package/dist/sdk/{chunk-AV6KML52.mjs.map → chunk-I6GKXMQ5.mjs.map} +0 -0
  74. /package/dist/sdk/{chunk-VVHALCWV.mjs.map → chunk-UTBSBJFV.mjs.map} +0 -0
  75. /package/dist/sdk/{chunk-GVPMO6QD.mjs.map → chunk-WJIV7MKY.mjs.map} +0 -0
  76. /package/dist/sdk/{chunk-WYFQQ445.mjs.map → chunk-YEARBXYT.mjs.map} +0 -0
  77. /package/dist/sdk/{config-UXRHADSE.mjs.map → config-BVL3KFMB.mjs.map} +0 -0
  78. /package/dist/sdk/{failure-condition-evaluator-Q4KNMX6F.mjs.map → failure-condition-evaluator-4O6BTC4Q.mjs.map} +0 -0
  79. /package/dist/sdk/{failure-condition-evaluator-SNR5XLGN.mjs.map → failure-condition-evaluator-DL6H57NX.mjs.map} +0 -0
  80. /package/dist/sdk/{github-frontend-56UQTA47.mjs.map → github-frontend-F2YCPK6H.mjs.map} +0 -0
  81. /package/dist/sdk/{github-frontend-OOP26667.mjs.map → github-frontend-UXL73NKB.mjs.map} +0 -0
  82. /package/dist/sdk/{host-QRGXXRDA.mjs.map → host-6TBS44ER.mjs.map} +0 -0
  83. /package/dist/sdk/{host-VYPJ2UGQ.mjs.map → host-KJTXX76P.mjs.map} +0 -0
  84. /package/dist/sdk/{metrics-FU2G5SZ2.mjs.map → metrics-JTOG2HNO.mjs.map} +0 -0
  85. /package/dist/sdk/{routing-DBQHPP2O.mjs.map → routing-AWYB2YX3.mjs.map} +0 -0
  86. /package/dist/sdk/{routing-ZAUCS3HJ.mjs.map → routing-GF2CF3JT.mjs.map} +0 -0
  87. /package/dist/sdk/{schedule-tool-2FIVKPVJ.mjs.map → schedule-tool-IEY2CFLU.mjs.map} +0 -0
  88. /package/dist/sdk/{schedule-tool-MHICRNCI.mjs.map → schedule-tool-SGCYDSHL.mjs.map} +0 -0
  89. /package/dist/sdk/{schedule-tool-VRLX54J5.mjs.map → schedule-tool-UMDRCNO5.mjs.map} +0 -0
  90. /package/dist/sdk/{schedule-tool-handler-3ES4WON7.mjs.map → schedule-tool-handler-5EPTHBLS.mjs.map} +0 -0
  91. /package/dist/sdk/{schedule-tool-handler-FQGAWC5N.mjs.map → schedule-tool-handler-5QVUZ5EZ.mjs.map} +0 -0
  92. /package/dist/sdk/{schedule-tool-handler-KYUHU4JR.mjs.map → schedule-tool-handler-HMEGLYJF.mjs.map} +0 -0
  93. /package/dist/sdk/{trace-helpers-UKMYHQIK.mjs.map → trace-helpers-6TEWG7RK.mjs.map} +0 -0
  94. /package/dist/sdk/{trace-helpers-ZFDJ55SH.mjs.map → trace-helpers-FKM2MEDW.mjs.map} +0 -0
  95. /package/dist/sdk/{workflow-check-provider-5KQTXKWS.mjs.map → workflow-check-provider-7VNIO6L5.mjs.map} +0 -0
  96. /package/dist/sdk/{workflow-check-provider-F5DTEX6E.mjs.map → workflow-check-provider-EWMZEEES.mjs.map} +0 -0
  97. /package/dist/sdk/{workflow-check-provider-VEOVTCVU.mjs.map → workflow-check-provider-VJ7VIMCQ.mjs.map} +0 -0
@@ -0,0 +1,387 @@
1
+ # Telemetry Reference — Spans, Metrics & Events
2
+
3
+ This document is the complete reference for all OpenTelemetry signals emitted by Visor. Use it to build Grafana dashboards, set up alerts, or debug execution flows.
4
+
5
+ For setup instructions, see [Telemetry Setup Guide](./telemetry-setup.md).
6
+
7
+ ---
8
+
9
+ ## Metrics
10
+
11
+ All metrics use the `visor` meter and are exported when the OTLP sink is configured with `@opentelemetry/exporter-metrics-otlp-http`.
12
+
13
+ > **Prometheus naming**: OTel metric names use dots (e.g., `visor.run.total`) but Prometheus converts them to underscores (e.g., `visor_run_total`). The table below shows both forms.
14
+
15
+ ### Run Metrics
16
+
17
+ | Metric | Prometheus Name | Type | Unit | Description |
18
+ |--------|----------------|------|------|-------------|
19
+ | `visor.run.total` | `visor_run_total` | Counter | 1 | Total number of visor runs (workflow executions) |
20
+ | `visor.run.duration_ms` | `visor_run_duration_ms` | Histogram | ms | Duration of a complete visor run |
21
+ | `visor.run.active_checks` | `visor_run_active_checks` | UpDownCounter | 1 | Number of checks actively running (concurrent gauge) |
22
+ | `visor.run.ai_calls` | `visor_run_ai_calls` | Histogram | 1 | Number of AI calls per visor run |
23
+
24
+ **Labels for `visor.run.total`:**
25
+
26
+ | Label | Description | Example |
27
+ |-------|-------------|---------|
28
+ | `visor.run.source` | Entry point that started the run | `cli`, `slack`, `tui`, `tui-rerun` |
29
+ | `visor.run.user_id` | User identifier (Slack user ID, etc.) | `U01ABC123` |
30
+ | `visor.run.user_name` | User display name | `alice` |
31
+ | `visor.run.workflow` | Comma-separated check IDs | `security,performance` |
32
+ | `visor.instance_id` | Unique instance identifier | `abc123` |
33
+
34
+ **Labels for `visor.run.duration_ms`:**
35
+
36
+ | Label | Description | Example |
37
+ |-------|-------------|---------|
38
+ | `visor.run.source` | Entry point | `cli`, `slack`, `tui` |
39
+ | `visor.run.user_id` | User identifier | `U01ABC123` |
40
+ | `visor.run.workflow` | Check IDs | `security,performance` |
41
+ | `visor.run.success` | Whether the run succeeded | `true`, `false` |
42
+
43
+ ### Check Metrics
44
+
45
+ | Metric | Prometheus Name | Type | Unit | Description |
46
+ |--------|----------------|------|------|-------------|
47
+ | `visor.check.duration_ms` | `visor_check_duration_ms` | Histogram | ms | Duration of a single check execution |
48
+ | `visor.check.issues` | `visor_check_issues_total` | Counter | 1 | Number of issues produced by checks |
49
+
50
+ **Labels:**
51
+
52
+ | Label | Applies To | Description |
53
+ |-------|-----------|-------------|
54
+ | `visor.check.id` | Both | Check identifier (e.g., `security`, `overview`) |
55
+ | `visor.check.group` | `duration_ms` | Check group (default: `default`) |
56
+ | `severity` | `issues` | Issue severity level |
57
+
58
+ ### Provider Metrics
59
+
60
+ | Metric | Prometheus Name | Type | Unit | Description |
61
+ |--------|----------------|------|------|-------------|
62
+ | `visor.provider.duration_ms` | `visor_provider_duration_ms` | Histogram | ms | Duration of provider execution |
63
+ | `visor.foreach.item.duration_ms` | `visor_foreach_item_duration_ms` | Histogram | ms | Duration of a single forEach item |
64
+
65
+ **Labels:**
66
+
67
+ | Label | Applies To | Description |
68
+ |-------|-----------|-------------|
69
+ | `visor.check.id` | Both | Check identifier |
70
+ | `visor.provider.type` | `provider.duration_ms` | Provider type (`ai`, `command`, `http`, etc.) |
71
+ | `visor.foreach.index` | `foreach.item.duration_ms` | Iteration index |
72
+ | `visor.foreach.total` | `foreach.item.duration_ms` | Total items in forEach |
73
+
74
+ ### AI Metrics
75
+
76
+ | Metric | Prometheus Name | Type | Unit | Description |
77
+ |--------|----------------|------|------|-------------|
78
+ | `visor.ai_call.total` | `visor_ai_call_total` | Counter | 1 | Total number of AI provider calls |
79
+
80
+ **Labels:**
81
+
82
+ | Label | Description | Example |
83
+ |-------|-------------|---------|
84
+ | `visor.check.id` | Check that triggered the AI call | `security` |
85
+ | `visor.ai.model` | AI model name | `gemini-2.5-flash`, `claude-sonnet-4-5-20250514` |
86
+ | `visor.run.source` | Entry point | `cli`, `slack` |
87
+
88
+ ### Other Metrics
89
+
90
+ | Metric | Prometheus Name | Type | Unit | Description |
91
+ |--------|----------------|------|------|-------------|
92
+ | `visor.fail_if.triggered` | `visor_fail_if_triggered_total` | Counter | 1 | Times a fail_if condition triggered |
93
+ | `visor.diagram.blocks` | `visor_diagram_blocks_total` | Counter | 1 | Mermaid diagram blocks emitted |
94
+
95
+ ---
96
+
97
+ ## Spans
98
+
99
+ ### Root Span
100
+
101
+ | Span Name | Description |
102
+ |-----------|-------------|
103
+ | `visor.run` | Root span wrapping an entire workflow execution. One per CLI invocation, Slack message, or TUI interaction. |
104
+
105
+ **Attributes on `visor.run`:**
106
+
107
+ | Attribute | Description |
108
+ |-----------|-------------|
109
+ | `visor.version` | Visor version (from package.json or `VISOR_VERSION` env) |
110
+ | `visor.commit` | Git commit short SHA |
111
+ | `visor.commit.sha` | Git commit full SHA |
112
+ | `visor.instance_id` | Unique instance identifier |
113
+ | `visor.run.source` | Entry point: `cli`, `slack`, `tui`, `tui-rerun`, `slack_message_trigger` |
114
+ | `visor.run.ai_calls` | Total AI calls made during this run |
115
+ | `visor.run.duration_ms` | Run duration in milliseconds |
116
+
117
+ Additional attributes for Slack message triggers:
118
+
119
+ | Attribute | Description |
120
+ |-----------|-------------|
121
+ | `visor.trigger.id` | Trigger configuration ID |
122
+ | `visor.trigger.workflow` | Triggered workflow name |
123
+ | `slack.channel_id` | Slack channel ID |
124
+ | `slack.thread_ts` | Slack thread timestamp |
125
+ | `slack.user_id` | Slack user ID |
126
+
127
+ ### State Machine Spans
128
+
129
+ | Span Name | Description |
130
+ |-----------|-------------|
131
+ | `engine.state.init` | Engine initialization |
132
+ | `engine.state.planready` | Plan is ready for execution |
133
+ | `engine.state.waveplanning` | Planning which checks to execute in the next wave |
134
+ | `engine.state.leveldispatch` | Dispatching checks for execution |
135
+ | `engine.state.checkrunning` | Checks are actively running |
136
+ | `engine.state.completed` | Engine has completed |
137
+ | `engine.state.error` | Engine encountered an error |
138
+
139
+ **Attributes on state spans:**
140
+
141
+ | Attribute | Description |
142
+ |-----------|-------------|
143
+ | `wave` | Current execution wave number |
144
+ | `wave_kind` | Wave type |
145
+ | `session_id` | Session identifier |
146
+ | `level_size` | Number of checks planned in this wave |
147
+ | `level_checks_preview` | Preview of check IDs in this wave |
148
+
149
+ ### Check Spans
150
+
151
+ | Span Name | Description |
152
+ |-----------|-------------|
153
+ | `visor.check.<checkId>` | Execution of a single check (e.g., `visor.check.security`) |
154
+
155
+ **Attributes on check spans:**
156
+
157
+ | Attribute | Description |
158
+ |-----------|-------------|
159
+ | `visor.check.id` | Check identifier |
160
+ | `visor.check.type` | Provider type (`ai`, `command`, `http`, `mcp`, `claude-code`, `noop`, `logger`) |
161
+ | `visor.foreach.index` | Iteration index (if inside a forEach) |
162
+ | `session_id` | Session identifier |
163
+ | `wave` | Wave number |
164
+
165
+ ### AI Provider Spans
166
+
167
+ | Span Name | Description |
168
+ |-----------|-------------|
169
+ | `visor.ai_check` | Fresh AI agent call (new session) |
170
+ | `visor.ai_check_reuse` | AI agent call reusing an existing session |
171
+
172
+ **Attributes:**
173
+
174
+ | Attribute | Description |
175
+ |-----------|-------------|
176
+ | `check.name` | Check name |
177
+ | `check.session_id` | AI session ID (fresh calls only) |
178
+ | `check.mode` | `session_reuse` (reuse calls only) |
179
+ | `prompt.length` | Length of the prompt in characters |
180
+ | `schema.type` | Output schema type |
181
+
182
+ ### Sandbox Spans
183
+
184
+ | Span Name | Description |
185
+ |-----------|-------------|
186
+ | `visor.sandbox.start` | Starting a sandbox container |
187
+ | `visor.sandbox.exec` | Executing a command in a sandbox |
188
+ | `visor.sandbox.stopAll` | Stopping all sandboxes |
189
+ | `visor.sandbox.build` | Building a sandbox Docker image |
190
+ | `visor.sandbox.runCheck` | Running a check inside a sandbox |
191
+ | `visor.sandbox.child.<type>` | Sandbox child process execution |
192
+
193
+ ### Agent Protocol Spans
194
+
195
+ | Span Name | Description |
196
+ |-----------|-------------|
197
+ | `agent.task` | A2A agent task execution |
198
+ | `agent.queue.execute` | Task queue worker execution |
199
+
200
+ ---
201
+
202
+ ## Span Events
203
+
204
+ Events are attached to the currently active span and provide fine-grained execution details.
205
+
206
+ ### Routing Events
207
+
208
+ | Event Name | Description |
209
+ |------------|-------------|
210
+ | `visor.routing` | A routing decision was made after a check completed |
211
+
212
+ **Attributes:** `check_id`, `trigger`, `action` (`retry`/`goto`/`run`), `target`, `source`, `scope`, `goto_event`
213
+
214
+ ### Failure Condition Events
215
+
216
+ | Event Name | Description |
217
+ |------------|-------------|
218
+ | `fail_if.evaluated` | A fail_if condition was evaluated |
219
+ | `fail_if.triggered` | A fail_if condition was triggered (failed) |
220
+
221
+ **Attributes:** `visor.check.id`, `scope` (`global`/`check`), `expression`, `result`, `severity`, `name`
222
+
223
+ ### Tool Setup Events (AI Provider)
224
+
225
+ | Event Name | Description |
226
+ |------------|-------------|
227
+ | `tool_setup.mcp_servers_js` | MCP servers loaded from dynamic JS expression |
228
+ | `tool_setup.mcp_servers_js_error` | Error evaluating MCP server expression |
229
+ | `tool_setup.mcp_servers_js_skipped` | MCP server setup skipped |
230
+ | `tool_setup.resolution` | Tool name resolution completed |
231
+ | `tool_setup.sse_server_error` | SSE tool server connection failed |
232
+ | `tool_setup.final` | Final tool setup summary |
233
+
234
+ ### Sandbox Events
235
+
236
+ | Event Name | Description |
237
+ |------------|-------------|
238
+ | `visor.sandbox.container.started` | Docker container started |
239
+ | `visor.sandbox.container.stopped` | Docker container stopped |
240
+ | `visor.sandbox.bwrap.exec` | Bubblewrap sandbox execution |
241
+ | `visor.sandbox.seatbelt.exec` | Seatbelt sandbox execution |
242
+ | `visor.sandbox.stopped` | Sandbox stopped |
243
+
244
+ ### Diagram Events
245
+
246
+ | Event Name | Description |
247
+ |------------|-------------|
248
+ | `diagram.block` | A Mermaid diagram block was emitted |
249
+
250
+ **Attributes:** `check`, `origin` (`content`/`issue`), `code`
251
+
252
+ ---
253
+
254
+ ## State Capture Attributes
255
+
256
+ When `VISOR_TELEMETRY_FULL_CAPTURE=true`, additional detailed attributes are captured on check spans:
257
+
258
+ ### Check Input Context
259
+
260
+ | Attribute | Description | Max Size |
261
+ |-----------|-------------|----------|
262
+ | `visor.check.input.keys` | Comma-separated context variable names | — |
263
+ | `visor.check.input.count` | Number of context keys | — |
264
+ | `visor.check.input.context` | Full template context (JSON, sanitized) | 10 KB |
265
+ | `visor.check.input.pr` | PR information subset | 1 KB |
266
+ | `visor.check.input.outputs` | Previous check outputs | 5 KB |
267
+ | `visor.check.input.env_keys` | Environment variable keys available | — |
268
+
269
+ ### Check Output
270
+
271
+ | Attribute | Description | Max Size |
272
+ |-----------|-------------|----------|
273
+ | `visor.check.output.type` | Output type (`object`, `array`, `string`) | — |
274
+ | `visor.check.output.length` | Array length (if output is array) | — |
275
+ | `visor.check.output.preview` | Preview of first 10 items | 2 KB |
276
+ | `visor.check.output` | Full serialized output | 10 KB |
277
+
278
+ ### Provider Call Details
279
+
280
+ | Attribute | Description | Max Size |
281
+ |-----------|-------------|----------|
282
+ | `visor.provider.type` | Provider type | — |
283
+ | `visor.provider.request.model` | AI model name | — |
284
+ | `visor.provider.request.prompt.length` | Prompt character count | — |
285
+ | `visor.provider.request.prompt.preview` | Prompt preview | 500 B |
286
+ | `visor.provider.request.prompt` | Full prompt (full capture only) | 10 KB |
287
+ | `visor.provider.response.length` | Response character count | — |
288
+ | `visor.provider.response.preview` | Response preview | 500 B |
289
+ | `visor.provider.response.content` | Full response (full capture only) | 10 KB |
290
+ | `visor.provider.response.tokens` | Token count (if available) | — |
291
+
292
+ ### Liquid Template Evaluation
293
+
294
+ | Attribute | Description | Max Size |
295
+ |-----------|-------------|----------|
296
+ | `visor.liquid.template` | Template source | 1 KB |
297
+ | `visor.liquid.result` | Rendered result | 2 KB |
298
+ | `visor.liquid.context` | Template context | 3 KB |
299
+
300
+ ### Transform JS
301
+
302
+ | Attribute | Description | Max Size |
303
+ |-----------|-------------|----------|
304
+ | `visor.transform.code` | JavaScript code | 2 KB |
305
+ | `visor.transform.input` | Input data | 2 KB |
306
+ | `visor.transform.output` | Output data | 2 KB |
307
+
308
+ ### Conditional Evaluation
309
+
310
+ | Attribute | Description | Max Size |
311
+ |-----------|-------------|----------|
312
+ | `visor.condition.expression` | Condition expression | 500 B |
313
+ | `visor.condition.result` | Boolean evaluation result | — |
314
+ | `visor.condition.context` | Evaluation context | 2 KB |
315
+
316
+ ### Routing Decision
317
+
318
+ | Attribute | Description |
319
+ |-----------|-------------|
320
+ | `visor.routing.action` | Action: `retry`, `goto`, `run` |
321
+ | `visor.routing.target` | Target check(s) or event |
322
+ | `visor.routing.condition` | Routing condition expression |
323
+
324
+ ---
325
+
326
+ ## Resource Attributes
327
+
328
+ The OTel resource is configured with:
329
+
330
+ | Attribute | Value |
331
+ |-----------|-------|
332
+ | `service.name` | `visor` |
333
+ | `service.version` | Visor version or `dev` |
334
+ | `deployment.environment` | `github-actions`, `ci`, or `local` |
335
+
336
+ ---
337
+
338
+ ## Example Queries
339
+
340
+ ### Prometheus / Grafana
341
+
342
+ ```promql
343
+ # Total runs per user (last 24h)
344
+ sum by (visor_run_user_id) (increase(visor_run_total[24h]))
345
+
346
+ # Average run duration by workflow
347
+ avg by (visor_run_workflow) (visor_run_duration_ms_sum / visor_run_duration_ms_count)
348
+
349
+ # AI calls per run (average)
350
+ avg(visor_run_ai_calls_sum / visor_run_ai_calls_count)
351
+
352
+ # AI calls by model (rate)
353
+ sum by (visor_ai_model) (rate(visor_ai_call_total[5m]))
354
+
355
+ # P95 check duration
356
+ histogram_quantile(0.95, sum(rate(visor_check_duration_ms_bucket[5m])) by (le, visor_check_id))
357
+
358
+ # Failed runs rate
359
+ sum(rate(visor_run_duration_ms_count{visor_run_success="false"}[5m]))
360
+
361
+ # Active concurrent checks
362
+ visor_run_active_checks
363
+ ```
364
+
365
+ ### Tempo (TraceQL)
366
+
367
+ ```
368
+ # Find all runs from Slack
369
+ { resource.service.name = "visor" && name = "visor.run" && span.visor.run.source = "slack" }
370
+
371
+ # Find slow checks (>30s)
372
+ { resource.service.name = "visor" && name =~ "visor.check.*" } | duration > 30s
373
+
374
+ # Find runs with many AI calls
375
+ { resource.service.name = "visor" && name = "visor.run" && span.visor.run.ai_calls > 10 }
376
+
377
+ # Find failed routing decisions
378
+ { resource.service.name = "visor" } >> { name = "visor.routing" && span.action = "retry" }
379
+ ```
380
+
381
+ ---
382
+
383
+ ## Related Documentation
384
+
385
+ - [Telemetry Setup Guide](./telemetry-setup.md) — How to enable and configure telemetry
386
+ - [Debugging Guide](./debugging.md) — Debugging techniques including tracing
387
+ - [Grafana Dashboards](./dashboards/) — Pre-built dashboards for Visor telemetry
@@ -262,6 +262,8 @@ For file-based tracing in CI (useful for artifact upload):
262
262
 
263
263
  ## Related Documentation
264
264
 
265
+ - [Telemetry Reference](./telemetry-reference.md) — Complete reference of all spans, metrics, and events
266
+ - [Grafana Dashboards](./dashboards/) — Pre-built dashboards for Visor telemetry
265
267
  - [Debugging Guide](./debugging.md) — Comprehensive debugging techniques
266
268
  - [Debug Visualizer](./debug-visualizer.md) — Live execution visualization with `--debug-server`
267
269
  - [Telemetry RFC](./telemetry-tracing-rfc.md) — Design rationale and architecture