Open itamarwilf opened 4 years ago
Currently it is the responsibility of the programmer to give appropriate names to the routines and components. This approach is error prone and is unlikely to scale well when working with multiple processes.
My idea consists of the following changes:
Examples:
In general, if something was ran as a process it will have the PID prefix attached and if its a thread it will have a sequential number suffix (starting from the 2nd instance?)
This is achievable with the use of metaclasses and __init_subclass__. Tell me what you think @ItamarWilf
Hi @VladShtompel sorry for the delay. I think it's a good suggestion, you should work it out with @MayoG because I think the manager #44 has some naming mechanism.
In order to perform more informative logging and monitoring, we need to assign better names for each component and routine, and use those names in the logger format. Any ideas about what the format should be are welcome, but remember the names should remain unique across when scaling to many streams or when using multiprocessing (maybe use Redis transactions for the naming?)