dask / dask/distributed

Improve structure of event logging

Open
#8,688 7 comments 0 reactions 0 assignees View on GitHub
diagnostics enhancement hygiene
Dominant language
Python
Stars
1.7k
Forks
778
Avg merge
2h 50m
Merged PRs (30d)
3

Description

There are two main things that I dislike about the current way we handle event logging:

* Having a catch-all "all" topic defeats the purpose of a topic-based messaging system. We should think more about the topics we use to log events to. As a starting point, structuring this similar to "regular" logging might be a good idea, e.g., sending your usual scheduler events to `scheduler` or P2P events to `p2p`.
* We allow _anything_ that's msgpack-serializable to be a message. Implicitly, we have already aligned on the convention of using a dictionary with an `action` key that acts as an identifier of the specific message type. We should make this explicit. Right now, this free-form format just allows producers to dump bad/unstructured messages and force consumers to deal with the mess. Personally, I'd also be in favor of adding better type-hinting either via typed dicts, dataclasses, or similar.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.