-
Notifications
You must be signed in to change notification settings - Fork 467
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
refact "cscli metrics" part 3 #2807
Conversation
mmetc
commented
Feb 1, 2024
•
edited
Loading
edited
- missing a couple tests for "metrics list" and "metrics show"
- the help text for "cscli metrics" should be changed (different than "cscli metrics show")
- "cscli metrics show" requires at least one section name, could be optional to show them all
- I think we should we display empty tables if explicitly required? We do it for json/raw
- metrics list should maybe add a description for each table? and support -o json
@mmetc: There are no 'kind' label on this PR. You need a 'kind' label to generate the release automatically.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
@mmetc: There are no area labels on this PR. You can add as many areas as you see fit.
DetailsI am a bot created to help the crowdsecurity developers manage community feedback and contributions. You can check out my manifest file to understand my behavior and what I can do. If you want to use this for your project, you can check out the BirthdayResearch/oss-governance-bot repository. |
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #2807 +/- ##
==========================================
+ Coverage 57.27% 57.60% +0.32%
==========================================
Files 238 238
Lines 30584 30748 +164
==========================================
+ Hits 17518 17712 +194
+ Misses 11415 11389 -26
+ Partials 1651 1647 -4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code structure
cmd/crowdsec-cli/metrics.go
Outdated
Use: "show [section]...", | ||
Short: "Display crowdsec prometheus metrics.", | ||
Long: `Fetch metrics from the prometheus server and display them in a human-friendly way`, | ||
Args: cobra.MinimumNArgs(1), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add some long examples with the most useful show subsections :)
9fa1c2f
to
1ebd255
Compare