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

Structured output feature #2128

Open
seanhoughtonatvi opened this issue Aug 25, 2024 · 3 comments
Open

Structured output feature #2128

seanhoughtonatvi opened this issue Aug 25, 2024 · 3 comments

Comments

@seanhoughtonatvi
Copy link

The output of the CLI is in human-readable tabular format. I looked through the code and the docs and it appears that there is no way to get csv, json, yaml, or any other structured output. This makes using the CLI as part of a script much more challenging.

I would like to be able to provide an --output-format=json argument and get tabular data formatted as a json list of objects.

@szokeasaurusrex
Copy link
Member

Hi @seanhoughtonatvi, thank you for the suggestion. For which specific command(s) are you requesting this feature?

@seanhoughtonatvi
Copy link
Author

I was looking in to using sentry-cli to create a weekly summary report that includes a list of unresolved issues rather than numerical totals like the built-in summary. This would use sentry-cli issues list --project xxxx.

Any command that uses https://github.com/getsentry/sentry-cli/blob/master/src/utils/formatting.rs#L27 would probably benefit from structured output so it can be piped into tools like jq.

I've since realized that there's no command to actually retrieve information about a specific issue (!) - so it looks like this tool isn't really intended as a general-purpose CRUD interface to Sentry. I'm going to change my approach and generate an SDK with swagger-codegen and write an application that uses the REST interface rather than a script. The CLI would have made a prototype easier.

@szokeasaurusrex
Copy link
Member

Ah understood. Yeah, the sentry-cli only performs a subset of the actions available from the Sentry web API.

If the structured output feature cannot help you anyways with what you are trying to accomplish, I will just leave the issue open on our backlog with low priority. If more folks request this feature, we can increase the priority.

If having the ability to query information about a single issue in the CLI would be helpful for you, you can feel free to open another feature request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants