Show a non-unique name for process in Application tab in :observer when using Registry

Hello, is it possible to use unique PID but show process in :observer applications window with some non-unique name?

For, example, I have this sup tree which is a bunch of GenStages:
image

Each one shows nicely with its own module name (since I set in start_link as name: MODULE).

Now I want to be able to create multiple of these GenStage pipelines, no worries, Registry to the rescue:
image

This works great, now each GenStage has a unique name so I can create the whole pipeline multiple times as needed.

But as a “side effect”, it will show as it unique PID in :observer, so I cannot now easily identify which GenStage is each one of these processes.

I would like to be able to keep the names as shown in the first image but still use Registry.

Note 1: I only want to show the names as the first image to more easily identify which module each process is, I do not want to be able to access it with that name (for that I will use Registry). So it’s not an issue if that name is not unique.

Note 2: I do not want to create a pool of one of the GenStage modules, I want to create a totally separated pipeline with the same GenStages multiple times.

Thanks!

1 Like

Hmm, I’m not actually sure as I’ve never checked, but it might just be a unique name registration of the process? You know how you can pass an atom name instead of a PID to register a process, it might be that.

You mean name option during GenServer or GenStage start_link right?
I know that, but I do want to use Registry instead of creating unique names manually myself.

I only want to be able to see in :observer the process module so I can identify it easily, so instead of showing as <0.194.0> it could show something like that: <0.194.0> Elixir.Ema.Ema12.

But as far as I know and searched about, that is not possible :frowning:

Correct. And Registry is an Elixir concept, Erlang’s ‘Registry’ is the name, and observer is made in erlang, thus… ^.^

For note, you can use multiple registries, an atom name, :global, Elixir’s Registry, gproc, whatever, all at the same time. :slight_smile: