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

Redo tempo-cli with basic command structure and improvements #385

Merged
merged 13 commits into from
Dec 3, 2020

Conversation

mdisibio
Copy link
Contributor

@mdisibio mdisibio commented Dec 1, 2020

What this PR does:
Redo of tempo-cli to have basic command structure for easier maintenance and new commands. Existing three commands now look like:

  • tempo-cli list block <tenant-id> <block-id>
  • tempo-cli list blocks <tenant-id>
  • tempo-cli query <trace-id>

Notable changes:

  • Using kong library, provides help (-h, --help) and discoverability at each level (./tempo-cli -h, list -h, list blocks -h)
  • Added universal --config-file (-c) parameter to load backend settings from existing tempo yaml. --backend, etc existing parameters can still be used and override config values if both are used.
  • Updated behavior of list block/blocks commands to put expensive operations behind additional flags: By default only meta is loaded. list blocks --load-index to check index for dupes and record counts, list block --check-dupes to load block and check for duplicate trace ids.

Which issue(s) this PR fixes:
Fixes #281

Checklist

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

@mdisibio mdisibio changed the title WIP: Redo tempo-cli with basic command structure and improvements Redo tempo-cli with basic command structure and improvements Dec 1, 2020
@joe-elliott
Copy link
Member

Welcome improvement in both code organization and tempo-cli ux.

The current main readme.md now contains some out of date info on tempo-cli. What do you think about adding updated info to the ./docs folder and just linking to it from the main readme?

@mdisibio
Copy link
Contributor Author

mdisibio commented Dec 2, 2020

Welcome improvement in both code organization and tempo-cli ux.

The current main readme.md now contains some out of date info on tempo-cli. What do you think about adding updated info to the ./docs folder and just linking to it from the main readme?

Agree. Added CLI section to docs that covers commands, options, etc, and updated readme to link to it.

Copy link
Contributor

@annanay25 annanay25 left a comment

Choose a reason for hiding this comment

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

Fantastic work, thank you @mdisibio! Can you please also add a CHANGELOG entry and then we can merge this!

Copy link
Contributor

@achatterjee-grafana achatterjee-grafana left a comment

Choose a reason for hiding this comment

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

Doc content looks good. Added some copy-edit suggestions.

@joe-elliott joe-elliott merged commit 9e690dd into grafana:master Dec 3, 2020
@mdisibio mdisibio deleted the cli-kong-rewrite branch February 3, 2021 18:09
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.

Add more structure and extend tempo-cli
4 participants