Skip to content

fix(logs): support index option#629

Merged
platinummonkey merged 1 commit into
DataDog:mainfrom
Platane:fix/logs-index-option
Jul 1, 2026
Merged

fix(logs): support index option#629
platinummonkey merged 1 commit into
DataDog:mainfrom
Platane:fix/logs-index-option

Conversation

@Platane

@Platane Platane commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds --index support to pup logs search, pup logs list, pup logs query, and pup logs aggregate.

The option uses Clap's Vec<String> + value_delimiter = ',' pattern, so callers can pass either --index a,b or repeated --index a --index b.

Motivation

The CLI accepted --index for logs search, but the value was dropped before reaching the Datadog API.

The --index option is particularly useful to route BYOC Logs search queries.

Additional Notes

Validation:

  • cargo fmt
  • cargo test commands::logs
  • cargo build
  • cargo clippy -- -D warnings

Validated against the dogfooding org from the local source build:

  • cargo run -- logs query --query '*' --index byoc--test--main --from 15min --limit 20
  • cargo run -- logs aggregate --query '*' --index byoc--test--main --from 15min --compute count --group-by status --limit 20

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

N/A

Comment thread src/commands/logs.rs
@Platane Platane force-pushed the fix/logs-index-option branch from fb46d62 to a03021e Compare July 1, 2026 12:37
@Platane Platane marked this pull request as ready for review July 1, 2026 14:54
@Platane Platane requested a review from a team as a code owner July 1, 2026 14:54
@platinummonkey platinummonkey merged commit 1a31fcf into DataDog:main Jul 1, 2026
6 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.

2 participants