Skip to content

Add logs saved views commands#672

Draft
platinummonkey wants to merge 1 commit into
mainfrom
dd/feat/logs-saved-views
Draft

Add logs saved views commands#672
platinummonkey wants to merge 1 commit into
mainfrom
dd/feat/logs-saved-views

Conversation

@platinummonkey

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds an experimental pup logs saved-views subgroup for listing, fetching, creating, and deleting Logs saved views.

Motivation

Logs saved views currently have to be created manually in the Datadog UI, which blocks automation workflows for bootstrapping service-specific log views. This addresses issue #488 by adding CLI coverage for that gap while the saved-view schema remains unavailable in the typed Rust SDK.

Changes

  • Adds pup logs saved-views list, get, create --file, and delete dispatch in src/main.rs.
  • Adds raw HTTP helpers in src/commands/logs.rs against the logs saved-view config path.
  • Keeps create schema-flexible by passing the JSON file body through unchanged.
  • Adds command parser and mocked HTTP route tests for the new subgroup.
  • Updates docs/COMMANDS.md with the saved views command surface.

Additional Notes

The saved views endpoint is implemented as an experimental raw API path because the current typed Datadog Rust client does not expose saved-view models. create --file expects the endpoint-native JSON request body.

Testing

  • RUSTUP_TOOLCHAIN=stable cargo fmt --check
  • git diff --check
  • RUSTUP_TOOLCHAIN=stable cargo test saved_views --offline could not compile because the pinned datadog-api-client git dependency is not cached in the sandbox.
  • RUSTUP_TOOLCHAIN=stable cargo test saved_views also could not run because the sandbox received 403 errors fetching the pinned SDK dependency.

Checklist

  • The code change follows the project conventions (see CONTRIBUTING.md)
  • Tests have been added/updated (if applicable)
  • Documentation has been updated (if applicable)
  • All CI checks pass
  • Code coverage is maintained or improved

Related Issues

Closes #488


PR by Bits - View session in Datadog

Comment @DataDog to request changes

@datadog-prod-us1-3

datadog-prod-us1-3 Bot commented Jul 23, 2026

Copy link
Copy Markdown

View session in Datadog

Bits Code status: ✅ Done

CI Auto-fix: Disabled | Enable

Comment @DataDog to request changes

@datadog-datadog-prod-us1-2

Copy link
Copy Markdown

I can only run on private repositories.

@datadog-prod-us1-3

Copy link
Copy Markdown

Pipelines

Unblock PR with BitsAI

⚠️ Warnings

🚦 1 Pipeline job failed

CI | Check, Test & Coverage   View in Datadog   GitHub Actions

Useful? React with 👍 / 👎

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 8206a60 | Docs | Datadog PR Page | Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add pup logs saved-views (list/get/create/delete)

2 participants