matrix-org / synapse

Synapse: Matrix homeserver written in Python/Twisted.
https://matrix-org.github.io/synapse
Apache License 2.0
11.82k stars 2.13k forks source link

Only use literal strings for process names #16315

Closed erikjohnston closed 1 year ago

erikjohnston commented 1 year ago

LiteralString doesn't do anything yet until https://github.com/python/mypy/issues/12554 lands.

Using unique names blows up our prometheus metrics and causes lots of CPU on /metrics requests.

clokep commented 1 year ago

Do we still want the logs to show a more unique name?

erikjohnston commented 1 year ago

Do we still want the logs to show a more unique name?

Maybe? Each new background process will include a unique logcontext name (an autoincrementing integer). I did briefly debate adding the ability to customise the logcontext name, but I frankly couldn't be bothered