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

[Bug]: Serenity bot crashes due to excessive logs #955

Closed
1 task done
jonaro00 opened this issue May 31, 2023 · 3 comments · Fixed by #958
Closed
1 task done

[Bug]: Serenity bot crashes due to excessive logs #955

jonaro00 opened this issue May 31, 2023 · 3 comments · Fixed by #958
Labels
T-Bug Something isn't working

Comments

@jonaro00
Copy link
Member

jonaro00 commented May 31, 2023

What happened?

Serenity projects emit way too many log lines since #864, and can lead a bot to crash (not 100% confirmed).

The excessive logs are due to functions annotated with #[instrument] (spans) are set to INFO by default.

I think we can compromise by having the minimum level increased in the Shuttle log consumer for spans,
but it would be awesome if this was separately configurable with #842 (set separate span and event levels, per crate)

Version

v0.17.0

Which operating system(s) are you seeing the problem on?

Linux, In deployment

Which CPU architectures are you seeing the problem on?

x86_64, In deployment

Relevant log output

2023-05-31T02:03:10.586481275Z  INFO {shard="Shard { shard_info: ShardInfo { id: 0, total: 1 }, .. }"} serenity::gateway::bridge::shard_runner: [span] recv
2023-05-31T02:03:10.586582375Z  INFO serenity::gateway::shard: [span] do_heartbeat
2023-05-31T02:03:10.586616675Z  INFO {shard="Shard { shard_info: ShardInfo { id: 0, total: 1 }, .. }"} serenity::gateway::bridge::shard_runner: [span] recv_event

Duplicate declaration

  • I have searched the issues and there are none like this.
@jonaro00 jonaro00 added T-Bug Something isn't working A-runtime labels May 31, 2023
@techs-sus
Copy link

techs-sus commented May 31, 2023

Same here. Even though my bot isn't crashing, I am concerned about the ever expanding log file. These "span" log messages take up hundreds of lines of space in the file.

Besides, it makes hosting shuttle more expensive 😔.

@oddgrd
Copy link
Contributor

oddgrd commented May 31, 2023

Thanks for getting to the bottom of this @jonaro00! If the #842 param takes a RUST_LOG string, would that resolve this? If we can't get that over the line for the next release we could also change the minimum level in the spans consumer as you suggested, since IIRC only tide users were affected by missing logs before #864. And we have very few tide users (I reported the initial bug).

@jonaro00
Copy link
Member Author

From what I understand, the RUST_LOG only targets events by defaults, and not spans. Not sure how complex the difference is.

I'll try lowering the span log level.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants