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

feat: Optional output of grype and prometheus debug statements #388

Closed
samcornwell opened this issue Dec 7, 2023 · 5 comments
Closed

feat: Optional output of grype and prometheus debug statements #388

samcornwell opened this issue Dec 7, 2023 · 5 comments
Labels
good first issue Denotes an issue ready for a new contributor. help wanted Denotes an issue that needs help from a contributor. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@samcornwell
Copy link
Contributor

While I was debugging an issue, I decided to enable the logging package in the grype module so that I could see if my sbom was actually being processed (I received no results initially, but resolved the issue -- see #386 for details). I wondered if you wanted me to submit a PR with this modification. I fed the verbosity argument into the grype logging module in order to do this. If this logging feature is desired, perhaps it would be better to have a new argument called --grype-verbosity or something similar because it is extremely verbose, and the logging may not be desired in most cases.

Let me know if:

  1. you would like me to submit a PR with this modification
  2. if "yes", do you want me to add a separate argument called --grype-verbosity or similar so that there is not a flood of output in the standard vulnerability-operator use case

Another thing is that I would like to attempt is to enable logging from the prometheus metrics module. I feel this will be useful to see when/if the metrics are being scraped and whatever other debug output the prometheus endpoint code can provide. Let me know if you think this would be something that you would want in the main code base. I can't guarantee this feature at this moment because I haven't looked into how easy or hard it is. The grype logging was non-trivial because of I've been learning Go along the way, and the Grype logging module makes you pass some "extra stuff" which turns out to be useless but necessary to have things operate properly.

BTW thanks for this project, it has filled a use case that I had initially started writing from scratch, but your features check a lot of boxes for what I want to accomplish, and after some tweaking it works beautifully. Also it has helped me to learn Go as I had to figure out why certain things were going wrong along the way to getting everything working :)

@ckotzbauer
Copy link
Owner

Thanks for your detailed report. Yes, this would be a very good enhancement, please add a new flag as well to control the verbosity of grype. Thanks for your work!

@ckotzbauer ckotzbauer added help wanted Denotes an issue that needs help from a contributor. good first issue Denotes an issue ready for a new contributor. kind/feature Categorizes issue or PR as related to a new feature. labels Dec 9, 2023
Copy link

github-actions bot commented Mar 9, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label with /remove-lifecycle stale or comment or this will be closed in 5 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 9, 2024
@ckotzbauer ckotzbauer removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 9, 2024
Copy link

github-actions bot commented Jun 8, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label with /remove-lifecycle stale or comment or this will be closed in 5 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 8, 2024
@ckotzbauer ckotzbauer removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 8, 2024
Copy link

github-actions bot commented Sep 7, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label with /remove-lifecycle stale or comment or this will be closed in 5 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 7, 2024
@ckotzbauer ckotzbauer removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 8, 2024
Copy link

github-actions bot commented Dec 8, 2024

This issue is stale because it has been open 90 days with no activity. Remove stale label with /remove-lifecycle stale or comment or this will be closed in 5 days.

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 8, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Denotes an issue ready for a new contributor. help wanted Denotes an issue that needs help from a contributor. kind/feature Categorizes issue or PR as related to a new feature. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants