-
Notifications
You must be signed in to change notification settings - Fork 897
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
Session report collection and report templates #981
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piksel
force-pushed
the
feat/notification-stats
branch
from
June 11, 2021 15:42
4b7110a
to
c34de89
Compare
Codecov Report
@@ Coverage Diff @@
## main #981 +/- ##
==========================================
+ Coverage 57.11% 59.63% +2.51%
==========================================
Files 25 22 -3
Lines 1476 1412 -64
==========================================
- Hits 843 842 -1
+ Misses 564 500 -64
- Partials 69 70 +1
Continue to review full report at Codecov.
|
piksel
commented
Jun 11, 2021
piksel
changed the title
wip: session stats
Session report collection and report templates
Jun 11, 2021
simskij
approved these changes
Jun 23, 2021
simskij
approved these changes
Jun 27, 2021
This was referenced Jun 27, 2021
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PoC for collecting a report containing session stats. Updated to not replace the current notification templates, but instead make the report-based notifications an opt-in (using the
--notification-report
flag)This will generate the following report for each session:
watchtower/pkg/types/report.go
Lines 3 to 10 in c34de89
where each
ContainerReport
containswatchtower/pkg/types/report.go
Lines 12 to 20 in c34de89
This report is passed to the template together with the log entries (the old template data):
watchtower/pkg/notifications/shoutrrr.go
Lines 206 to 209 in c34de89
This makes it possible to send notifications like these instead of the full logs:
...using template:
Note that the above still contains the old "log" notifications at the bottom as well, but the point is that you don't have to include them.
Report container classifications: