Skip to content

feat(annotations): add dashboard/notebook annotations commands#547

Merged
platinummonkey merged 2 commits into
chore/upgrade-dd-sdk-to-masterfrom
feat/annotations-api
May 30, 2026
Merged

feat(annotations): add dashboard/notebook annotations commands#547
platinummonkey merged 2 commits into
chore/upgrade-dd-sdk-to-masterfrom
feat/annotations-api

Conversation

@platinummonkey
Copy link
Copy Markdown
Collaborator

@platinummonkey platinummonkey commented May 30, 2026

Summary

Adds the Annotations API v2 (SDK #1631) to pup. Annotations attach to a page — dashboard:<id> or notebook:<id> — and mark moments/regions in time on dashboard and notebook widgets, so the commands are nested under both pup dashboards annotations and pup notebooks annotations (sharing one module), rather than a top-level domain.

Changes

  • src/commands/annotations.rs — new module: list, get_page, create, update, delete
  • src/commands/mod.rs — register the module
  • src/client.rs — register the 5 annotation ops as unstable (UNSTABLE_OPS 162 → 167)
  • src/main.rsAnnotations subcommand added to both DashboardActions and NotebookActions, dispatched through a shared run_annotations helper
  • docs/COMMANDS.md — documented under the dashboards and notebooks rows

New commands

pup dashboards annotations list --page-id dashboard:<id> --start <ts> --end <ts>
pup dashboards annotations create --file body.json
pup notebooks annotations list --page-id notebook:<id> --start <ts> --end <ts>
pup notebooks annotations get-page --page-id notebook:<id> --start <ts> --end <ts>
# update/delete also available under both

Testing

  • list / get-page / create / update / delete + error and bad-file paths
  • Validated locally against the pinned SDK rev: cargo test green, cargo fmt --check clean, cargo clippy clean (no warnings in pup code). Top-level command alphabetical-order check passes (no new top-level command added).

🤖 Generated with Claude Code

New pup annotations domain wrapping the Annotations API v2 (SDK #1631):
list, get-page, create, update, delete. Registers the 5 annotation
operations as unstable ops (162 -> 167).

Co-Authored-By: Claude <noreply@anthropic.com>
@platinummonkey platinummonkey requested a review from a team as a code owner May 30, 2026 08:44
@datadog-prod-us1-5

This comment has been minimized.

Annotations attach to a page (dashboard:<id> or notebook:<id>), so expose
the actions under both `pup dashboards annotations` and
`pup notebooks annotations` via a shared run_annotations dispatch, instead
of a top-level `pup annotations` domain. Removing the top-level variant
also fixes the alphabetical-order check in test_commands.rs.

Co-Authored-By: Claude <noreply@anthropic.com>
@platinummonkey platinummonkey changed the title feat(annotations): add annotations API v2 commands feat(annotations): add dashboard/notebook annotations commands May 30, 2026
@platinummonkey platinummonkey merged commit 74f55a8 into chore/upgrade-dd-sdk-to-master May 30, 2026
6 checks passed
@platinummonkey platinummonkey deleted the feat/annotations-api branch May 30, 2026 10:17
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.

2 participants