Add logs saved views commands - #672
Merged
Merged
Conversation
|
Bits Code status: ✅ Done Comment @DataDog to request changes |
|
I can only run on private repositories. |
This comment has been minimized.
This comment has been minimized.
Co-authored-by: platinummonkey <cody.lee@datadoghq.com>
platinummonkey
marked this pull request as ready for review
July 28, 2026 14:30
platinummonkey
marked this pull request as draft
July 28, 2026 14:41
platinummonkey
marked this pull request as ready for review
July 28, 2026 17:25
Co-authored-by: platinummonkey <cody.lee@datadoghq.com>
jack-edmonds-dd
approved these changes
Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
pup logs saved-viewssubgroup 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
pup logs saved-views list,get,create --file, anddeletedispatch insrc/main.rs.src/commands/logs.rsagainst the logs saved-view config path.createschema-flexible by passing the JSON file body through unchanged.origin/maininto the branch to clear any base-branch conflicts.docs/COMMANDS.mdwith 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 --fileexpects the endpoint-native JSON request body.Testing
RUSTUP_TOOLCHAIN=stable cargo fmt --checkRUSTUP_TOOLCHAIN=stable cargo test saved_views --offlinecould not compile because the pinneddatadog-api-clientgit dependency is not cached in the sandbox.RUSTUP_TOOLCHAIN=stable cargo test saved_viewsalso could not run because the sandbox received 403 errors fetching the pinned SDK dependency.Variable does not need to be mutable in src/commands/logs.rs:857:13; this follow-up removes thatmut.Checklist
Related Issues
Closes #488
PR by Bits - View session in Datadog
Comment @DataDog to request changes