Summary
Add a scout anomalies command for listing anomaly events from Scout APM, with a show subcommand for detail. Wraps the new APM API endpoints being added in scoutapp/apm#5504.
Companion issues:
Scope
scout anomalies (list): table output with ID, State (open/closed), Metric, Endpoint, Started, Z-score, Multiplier; respects global --app, --from, --to, --limit, --json, --toon; adds --state (open|closed|all), --metric, --endpoint flags
scout anomalies show <id>: detail view with all fields including joined smart_monitor / deploy when present
internal/api/client.go — ListAnomalyEvents and GetAnomalyEvent methods
internal/api/types.go — AnomalyEvent, AnomalyEventsResult, AnomalyEventResult structs
- Unit tests in
cmd/anomalies_test.go for any logic that warrants it (filtering helpers, formatting)
CHANGELOG.md entry under ## Pending / ### Added
- README usage section
Out of scope
- SmartMonitor management
- Anomaly creation or modification
Summary
Add a
scout anomaliescommand for listing anomaly events from Scout APM, with ashowsubcommand for detail. Wraps the new APM API endpoints being added in scoutapp/apm#5504.Companion issues:
Scope
scout anomalies(list): table output with ID, State (open/closed), Metric, Endpoint, Started, Z-score, Multiplier; respects global--app,--from,--to,--limit,--json,--toon; adds--state(open|closed|all),--metric,--endpointflagsscout anomalies show <id>: detail view with all fields including joined smart_monitor / deploy when presentinternal/api/client.go—ListAnomalyEventsandGetAnomalyEventmethodsinternal/api/types.go—AnomalyEvent,AnomalyEventsResult,AnomalyEventResultstructscmd/anomalies_test.gofor any logic that warrants it (filtering helpers, formatting)CHANGELOG.mdentry under## Pending/### AddedOut of scope