Skip to content

Live-check: add min-advice-level option to control advice verbosity#923

Closed
lmolkova wants to merge 2 commits intoopen-telemetry:mainfrom
lmolkova:live-check-min-level
Closed

Live-check: add min-advice-level option to control advice verbosity#923
lmolkova wants to merge 2 commits intoopen-telemetry:mainfrom
lmolkova:live-check-min-level

Conversation

@lmolkova
Copy link
Member

@lmolkova lmolkova commented Sep 7, 2025

No description provided.

@lmolkova lmolkova requested a review from a team as a code owner September 7, 2025 05:14
@lmolkova lmolkova requested a review from Copilot September 7, 2025 05:15
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds a new command-line option --min-advice-level to the live-check functionality to control the verbosity of advice output by filtering based on advice level severity.

  • Adds --min-advice-level CLI argument with default value "information"
  • Threads advice level filtering through the entire live check execution chain
  • Implements filtering logic in LiveCheckResult to exclude advice below the minimum level

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/registry/live_check.rs Adds CLI argument and passes it to live check execution
crates/weaver_live_check/src/lib.rs Updates trait signatures and implements filtering logic
crates/weaver_live_check/src/sample_*.rs Updates all sample types to accept and pass through advice level parameter
crates/weaver_live_check/src/live_checker.rs Updates test calls with new parameter signature
crates/weaver_checker/src/violation.rs Adds string conversion implementation for AdviceLevel
crates/weaver_live_check/README.md Documents the new feature with usage examples

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link

codecov bot commented Sep 7, 2025

Codecov Report

❌ Patch coverage is 88.77551% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.0%. Comparing base (7155122) to head (6ec81b8).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/weaver_checker/src/violation.rs 0.0% 6 Missing ⚠️
crates/weaver_live_check/src/lib.rs 72.2% 5 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main    #923   +/-   ##
=====================================
  Coverage   77.9%   78.0%           
=====================================
  Files         76      76           
  Lines       5972    6012   +40     
=====================================
+ Hits        4657    4690   +33     
- Misses      1315    1322    +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.


#### Customize advise level

By default, live-check shows `information`, `improvement` and `violation` advices. You can provide `--min-advice-level` argument to only show advices of this and higher levels.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
By default, live-check shows `information`, `improvement` and `violation` advices. You can provide `--min-advice-level` argument to only show advices of this and higher levels.
By default, live-check shows `information`, `improvement` and `violation` advice. You can provide `--min-advice-level` argument to only show advices of this and higher levels.

@lmolkova
Copy link
Member Author

lmolkova commented Sep 10, 2025

Discussed at the weaver call, the conclusion:

The full report contains a lot of details which are useful too.
Let's focus on a compact version like a list of advices grouped by source (attribute / signal), violation type and level with number of them.

We could print this summary at the bottom of ansi report and have the section in the json report. We could also print it to stderr if -output is used.

I'll close this PR and will open another one with that proposal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants