Skip to content

Add Insights CLI commands - #2067

Merged
SSharma-10 merged 8 commits into
digitalocean:mainfrom
dmamidala-glitch:insights_v2
Oct 22, 2026
Merged

SSharma-10 merged 8 commits into
digitalocean:mainfrom
dmamidala-glitch:insights_v2

Conversation

@dmamidala-glitch

@dmamidala-glitch dmamidala-glitch commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds the complete Insights CLI surface developed under COBS-1630:

  • notification channel and alert rule CRUD
  • alert instance get/list
  • PromQL query, query-range, labels, label-values, and series
  • log search
  • span search and trace search/get
  • resource enablement and listing

The branch is rebased onto the latest main and uses godo v1.230.0.

Validation

  • go build ./cmd/doctl
  • focused Insights and serverless inference tests
  • go vet ./...

dmamidala-glitch and others added 7 commits October 22, 2026 10:53
Co-authored-by: Cursor <cursoragent@cursor.com>
…2044)

* Add Insights alert instance, PromQL, and logs commands

Add doctl insights alert-instance (list, get), metrics (query,
query-range, labels, label-values, series), and logs search commands
backed by the Insights service, with input validation, text and
Prometheus-shaped JSON output, and unit tests.

Related: COBS-1695

* Fix Insights flag help placeholders

pflag treats the first backticked word in a flag's usage as its value
placeholder, which produced help such as --end 2026-09-01T00:00:00Z.
Drop incidental backticks and keep only intentional placeholders.

* Reuse shared Insights helpers from alert rule commands

Use the shared Insights flag names, AddStringArrayFlag and
getInsightsStringArray for --match, readInsightsRequest for logs
request and filter files (adding YAML support), and
rejectRequestFileFlagMix for request-file conflicts.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
* Align Insights tracing wire contract

Co-authored-by: Cursor <cursoragent@cursor.com>

* Correct Insights tracing filter help

Co-authored-by: Cursor <cursoragent@cursor.com>

* Update godo to v1.230.0

Co-authored-by: Cursor <cursoragent@cursor.com>

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread commands/insights_alert_rules.go Resolved
Co-authored-by: Cursor <cursoragent@cursor.com>

@SSharma-10 SSharma-10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SSharma-10
SSharma-10 merged commit 813301f into digitalocean:main Oct 22, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

⌂ 换网址