Add logs saved views commands#672
Draft
platinummonkey wants to merge 1 commit into
Draft
Conversation
|
I can only run on private repositories. |
|
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 an experimental
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.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 --checkgit diff --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.Checklist
Related Issues
Closes #488
PR by Bits - View session in Datadog
Comment @DataDog to request changes