Skip to content

Add scout anomalies command #15

Description

@quinnmil

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.goListAnomalyEvents and GetAnomalyEvent methods
  • internal/api/types.goAnomalyEvent, 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions