Re: Support for non-unique process labels?

Stanislav Ledenev <[email protected]>
Newsgroups gmane.comp.lang.erlang.general
Message-ID <CAOkK=A+w0fh1hVPYFQjBAaAWQTXLLgZb4B5MgoOQ-0mLpnsj6A@mail.gmail.com>
Sorry I've misread your message. My first question is irrelevant.
Could you explain in more details why you need that?
In my experience I try to give names to every *long-living* process I start
(except for "simple_one_for_one" for obvious reasons).
For the short-living processes, when needed for debugging, I give internal
Ids (like UUID) to be printed to logs.

чт, 6 мая 2021 г. в 19:55, Nathan Long <[email protected]>:

> Is there a way to add a non-unique label to a process? If not, I would
> like to propose that it be added.
>
> The label could be shown with or instead of a PID. I think this would be
> useful in at least two areas.
>
> First, when observing a running system, the PID is not descriptive. I have
> Observer open right now looking at part of my system, and I can see one
> globally registered process name displayed, but everything else is a PID.
> What are those processes? I might be able to figure it out by clicking the
> process and seeing what its initial call was, but often I can tell is "it's
> a GenServer." The structure of the system would be much more apparent if I
> saw labels like "db_connection" or "request_queue_worker".
>
> Second, when reading error messages in logs or an exception tracker, the
> PID is not useful. For example, I'm looking at an error in Sentry right now
> that says "Sentry.CrashError error ** (exit) 'stopping because dependent
> process <0.2255.0> died: killed'". I have no idea what `<0.2555.0>` was, so
> I don't know what to debug.
>
> Does this exist or would others support it being added to the BEAM?
>
> -- Nathan
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.