Log Size Review #35

Merged
modulatingforce merged 4 commits from logsize_review into main 2024-03-20 21:00:56 -04:00

Small concern about size of logs since recent code involved additional debugging

  • Monitoring over 24 hrs first while running
  • If problematic, review the log for recommendations (code or otherwise)
  • Code Recommendations will be tested in this branch
Small concern about size of logs since recent code involved additional debugging - [x] Monitoring over 24 hrs first while running - [x] If problematic, review the log for recommendations (code or otherwise) - [x] Code Recommendations will be tested in this branch
modulatingforce changed title from Log Size Review to WIP: Log Size Review 2024-03-20 10:05:33 -04:00
modulatingforce self-assigned this 2024-03-20 10:05:39 -04:00
modulatingforce added the
Status
Need More Info
Priority
Low
labels 2024-03-20 10:06:41 -04:00
Author
Owner

Log involving Startup with just Forcebot channel is 205 KB

Will monitor over next 24 hours while in notohh channel

Log involving Startup with just Forcebot channel is 205 KB Will monitor over next 24 hours while in notohh channel
Author
Owner

Yeah the log is very chatty. In just 8 hours, the log is 7.52 MB

I don't think it's problematic at the moment that requires immediate attention . The following issue will likely fix this permanently : #32


Recommendations :

  • For now, Code Fix : adjust the logging crate so :
    • Number of Days of retained logs is just 2
    • If there are ways to limit the sizes, try those

Future Fix :

Will be Permanently fixed in #32 , where there will be additional controls for tracing to be done at a channel level or module, etc, which should greatly reduce the chatter

Yeah the log is very chatty. In just 8 hours, the log is 7.52 MB I don't think it's problematic at the moment that requires immediate attention . The following issue will likely fix this permanently : https://git.flake.sh/modulatingforce/forcebot_rs/issues/32 --- **Recommendations :** - [x] For now, Code Fix : adjust the logging crate so : - Number of Days of retained logs is just 2 - If there are ways to limit the sizes, try those **Future Fix :** Will be Permanently fixed in https://git.flake.sh/modulatingforce/forcebot_rs/issues/32 , where there will be additional controls for tracing to be done at a channel level or module, etc, which should greatly reduce the chatter
modulatingforce removed the
Status
Need More Info
label 2024-03-20 19:30:16 -04:00
Author
Owner
Related https://crates.io/crates/casual_logger/0.2.0 https://docs.rs/crate/casual_logger/0.6.5
modulatingforce added 1 commit 2024-03-20 20:44:07 -04:00
log retention = 2 days
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
a82b4f94ac
Author
Owner

I'm not sure if Unit tests would be required?

Manual Runtime tests appear to work though :

  • Set the retention period to 2 days
  • Set the Purge Routine period to 1 Minute
  • I can see in stdout that it triggers every 1 minute

** We've set the Purge Routine to run every 24 hours , though checking for a retention period of 2 days

👍Approving merge

I'm not sure if Unit tests would be required? Manual Runtime tests appear to work though : - Set the retention period to 2 days - Set the Purge Routine period to 1 Minute - I can see in `stdout` that it triggers every 1 minute ** We've set the Purge Routine to run every 24 hours , though checking for a retention period of 2 days 👍**Approving merge**
modulatingforce changed title from WIP: Log Size Review to Log Size Review 2024-03-20 20:48:53 -04:00
modulatingforce force-pushed logsize_review from a82b4f94ac to 7d8672913a 2024-03-20 20:49:50 -04:00 Compare
modulatingforce reviewed 2024-03-20 20:54:31 -04:00
modulatingforce left a comment
Author
Owner

Please adjust first

Please adjust first
@ -112,0 +114,4 @@
tokio::spawn(async {
loop {
let routine_mins = 60 * 60 * 24 * 1 ; // Every 1 Day
Author
Owner

https://ci.flake.sh/repos/10/pipeline/58/4

cargo clippy --all-targets --all-features
warning: this operation has no effect
   --> src/core/botinstance.rs:117:36
    |
117 |                 let routine_mins = 60 * 60 * 24 * 1 ; // Every 1 Day
    |                                    ^^^^^^^^^^^^^^^^ help: consider reducing it to: `60 * 60 * 24`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op
    = note: `#[warn(clippy::identity_op)]` on by default
https://ci.flake.sh/repos/10/pipeline/58/4 ```powershell cargo clippy --all-targets --all-features ``` ```powershell warning: this operation has no effect --> src/core/botinstance.rs:117:36 | 117 | let routine_mins = 60 * 60 * 24 * 1 ; // Every 1 Day | ^^^^^^^^^^^^^^^^ help: consider reducing it to: `60 * 60 * 24` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op = note: `#[warn(clippy::identity_op)]` on by default ```
modulatingforce marked this conversation as resolved
modulatingforce added 3 commits 2024-03-20 20:56:57 -04:00
log retention = 2 days
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
a82b4f94ac
smol
All checks were successful
ci/woodpecker/pr/cargo-checks Pipeline was successful
9a95584588
modulatingforce merged commit b5873a6ac1 into main 2024-03-20 21:00:56 -04:00
modulatingforce deleted branch logsize_review 2024-03-20 21:00:56 -04:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: modulatingforce/forcebot_rs#35
No description provided.