Skip to content

[tempo-cli]: add client for submitting redaction jobs#6832

Merged
zalegrala merged 1 commit intografana:mainfrom
zalegrala:backendSchedulerRedactionCLI
Apr 7, 2026
Merged

[tempo-cli]: add client for submitting redaction jobs#6832
zalegrala merged 1 commit intografana:mainfrom
zalegrala:backendSchedulerRedactionCLI

Conversation

@zalegrala
Copy link
Copy Markdown
Contributor

@zalegrala zalegrala commented Mar 30, 2026

What this PR does:

In #459 we intoduced the redaction job scheduler. Here we include the client to allow job submission over the gRPC interface.

Which issue(s) this PR fixes:
Related #6459

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

Copilot AI review requested due to automatic review settings March 30, 2026 21:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds tempo-cli support for submitting trace redaction batches to the backend-scheduler over gRPC, and adjusts the backend-scheduler client to allow custom transport credentials (for TLS vs plaintext) when dialing.

Changes:

  • Add a new tempo-cli redact command that submits SubmitRedaction requests with tenant + trace IDs.
  • Introduce a backend-scheduler client constructor that accepts an explicit transport-credentials dial option.
  • Wire the new redact subcommand into the CLI root command set.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
modules/backendscheduler/client/client.go Adds NewWithOptions(...) to allow overriding transport credentials when creating a scheduler gRPC client.
cmd/tempo-cli/main.go Registers the new redact subcommand in tempo-cli.
cmd/tempo-cli/cmd-redact.go Implements redaction submission (trace ID parsing, tenant injection, TLS/insecure dial handling, output formatting).

Comment thread modules/backendscheduler/client/client.go Outdated
Comment thread modules/backendscheduler/client/client.go Outdated
Comment thread cmd/tempo-cli/main.go
@zalegrala zalegrala force-pushed the backendSchedulerRedactionCLI branch from b21295c to 278126f Compare March 31, 2026 15:52
Copilot AI review requested due to automatic review settings March 31, 2026 20:30
@zalegrala zalegrala force-pushed the backendSchedulerRedactionCLI branch from 278126f to 9dcef02 Compare March 31, 2026 20:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Comment thread modules/backendscheduler/client/client.go Outdated
Comment thread modules/backendscheduler/client/client.go
Comment thread cmd/tempo-cli/cmd-redact.go Outdated
Comment thread cmd/tempo-cli/cmd-redact.go Outdated
Comment thread CHANGELOG.md
@zalegrala zalegrala force-pushed the backendSchedulerRedactionCLI branch from 9dcef02 to 62f63d7 Compare March 31, 2026 20:39
Copilot AI review requested due to automatic review settings March 31, 2026 20:53
@zalegrala zalegrala force-pushed the backendSchedulerRedactionCLI branch from 62f63d7 to 627a9c6 Compare March 31, 2026 20:53
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment thread modules/backendscheduler/client/client.go Outdated
Comment thread cmd/tempo-cli/cmd-redact.go
@zalegrala zalegrala force-pushed the backendSchedulerRedactionCLI branch from 627a9c6 to 958a0f0 Compare March 31, 2026 21:56
Copilot AI review requested due to automatic review settings April 1, 2026 15:24
@zalegrala zalegrala force-pushed the backendSchedulerRedactionCLI branch from 958a0f0 to 8e75ebf Compare April 1, 2026 15:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread cmd/tempo-cli/cmd-redact.go
Comment thread cmd/tempo-cli/main.go
Comment thread modules/backendscheduler/client/client.go
@knylander-grafana
Copy link
Copy Markdown
Contributor

Will we need docs for --redact?

@zalegrala
Copy link
Copy Markdown
Contributor Author

@knylander-grafana I think the CLI itself is self documenting, but I'll send a PR later for docs about redaction.

@zalegrala zalegrala force-pushed the backendSchedulerRedactionCLI branch from 8e75ebf to 3d41760 Compare April 7, 2026 13:32
@zalegrala zalegrala merged commit 2994636 into grafana:main Apr 7, 2026
27 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.

4 participants