Skip to content

Improve structure of event logging #8688

Open
@hendrikmakait

Description

@hendrikmakait

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    diagnosticsenhancementImprove existing functionality or make things work betterhygieneImprove code quality and reduce maintenance overhead

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions