Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tempo-cli: add support for dropping multiple traces in single operation #4246

Closed
electron0zero opened this issue Oct 29, 2024 · 2 comments · Fixed by #4266
Closed

tempo-cli: add support for dropping multiple traces in single operation #4246

electron0zero opened this issue Oct 29, 2024 · 2 comments · Fixed by #4266
Labels
component/tempo-cli enhancement New feature or request good first issue Good for newcomers keepalive Label to exempt Issues / PRs from stale workflow

Comments

@electron0zero
Copy link
Member

We currently have a command in tempo-cli under rewrite-blocks drop-trace to delete a single trace from a block.

However, there are scenarios where operators may need to drop multiple traces from a single block.
To achieve this now, they must loop through the list of trace IDs and execute the drop-trace command. This is inefficient, as it requires rewriting the same block multiple times (pulling and uploading the same block to backend) when dropping several traces.

I propose adding a new command (or updating the current one) to accept a list of trace IDs to delete multiple traces from a block in a single operation.

@electron0zero electron0zero added enhancement New feature or request component/tempo-cli good first issue Good for newcomers keepalive Label to exempt Issues / PRs from stale workflow labels Oct 29, 2024
@ndk
Copy link
Contributor

ndk commented Nov 4, 2024

How about letting to specify multiple trace IDs separated by commas?

tempo-cli rewrite-blocks drop-trace --backend=local --bucket=./data --drop-trace traceid1 single-tenant
tempo-cli rewrite-blocks drop-trace --backend=local --bucket=./data --drop-trace traceid1,traceid2 single-tenant
tempo-cli rewrite-blocks drop-trace --backend=local --bucket=./data --drop-trace traceid1,traceid2,traceid3 single-tenant

BTW, I found some discrepancies between the documentation and the implementation. The difference is in the order of arguments.

@electron0zero
Copy link
Member Author

I am good on passing the multiple traceIDs via comma to the current command instead of adding a new command, very valid approach and gets the job done.

To better indicate that it can take multiple traceIDs, we are rename the command to be plural (from drop-trace to drop-traces)

will leave more feedback on the PR when it's out of draft and ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/tempo-cli enhancement New feature or request good first issue Good for newcomers keepalive Label to exempt Issues / PRs from stale workflow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants