You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Every new command must emit an `lstk_command` telemetry event. Wrap the command's `RunE` with `commandWithTelemetry(name, tel, fn)` — this handles timing, exit code, and error message automatically.
100
-
101
-
Start and stop are exceptions: they emit `lstk_lifecycle` events in addition to `lstk_command`, so they manage their own telemetry manually instead of using `commandWithTelemetry`.
99
+
`lstk_command` telemetry is emitted automatically for every command via `instrumentCommands` in `cmd/root.go` — no per-command wiring needed. Do NOT pass `*telemetry.Client` to a new command constructor unless the command emits additional lifecycle events (like `lstk_lifecycle` for start/stop/restart) or needs to update the auth token (like login).
102
100
103
101
In the corresponding integration test, add an assertion that the `lstk_command` event was emitted.
0 commit comments