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

Enable debug logging for ShardCoordinator/ShardRegion/Shard actors #7097

Open
LeonHartley opened this issue Feb 14, 2024 · 7 comments · May be fixed by #7179
Open

Enable debug logging for ShardCoordinator/ShardRegion/Shard actors #7097

LeonHartley opened this issue Feb 14, 2024 · 7 comments · May be fixed by #7179

Comments

@LeonHartley
Copy link

Is your feature request related to a problem? Please describe.
We are seeing potential issues with the shard coordinator when recovering millions of entities, where shard regions do not receive acknowledgement from the coordinator. We'd like to allow debug logs to be switched on for sharding system-level actors without having to enable debug logging for the whole system

Describe the solution you'd like
A configuration switch to perhaps change the log level of all logs from the shard coordinator and shard region actors, so we can view more information, even when the rest of the system is set to Information or Warning level.

Describe alternatives you've considered
We could switch debug logging on for the whole system but this would cause unnecessary stress on our logging infrastructure.

@Aaronontheweb
Copy link
Member

Aaronontheweb commented Feb 16, 2024

There is a setting that will do this for Akka.Cluster.Sharding already, have you tried setting this to on ?

@LeonHartley
Copy link
Author

From the looks of it, that would still require us to enable debug logging for the whole system, this feature request is more around allowing debug logs without turning full system level log level to debug.

@Aaronontheweb
Copy link
Member

I guess we could change that setting to accept a LOGLEVEL argument - that should do it

@LeonHartley
Copy link
Author

Yeah that would work.

Cheers

@Aaronontheweb
Copy link
Member

@LeonHartley so I implemented a fix for this in #7118 but decided not to merge it for 1.5.18 because it's kind of weird / sloppy.

What I think we're going to do instead is introduce a new "log filtering" feature on the backend that allows you to scrub out logs you don't care about at various log levels. I'll create a separate GH issue to spec it out, but I think that will be a much cleaner solution to your problems - it'll let you enable LogLevel.Debug and just say "get rid of everything that isn't from LogSources that start with /system/sharding/. Would that work for you?

@LeonHartley
Copy link
Author

Yeah that sounds perfect, nice one @Aaronontheweb.

@Aaronontheweb Aaronontheweb modified the milestones: 1.5.18, 1.5.19 Mar 12, 2024
@Aaronontheweb Aaronontheweb modified the milestones: 1.5.19, 1.5.20 Apr 15, 2024
Aaronontheweb added a commit to Aaronontheweb/akka.net that referenced this issue Apr 29, 2024
@Aaronontheweb
Copy link
Member

Working on a preview of this feature here #7179

@Aaronontheweb Aaronontheweb modified the milestones: 1.5.20, 1.5.21 Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment