Skip to content

Display process label in application and process views#479

Merged
josevalim merged 2 commits into
phoenixframework:mainfrom
andzdroid:main
May 25, 2025
Merged

Display process label in application and process views#479
josevalim merged 2 commits into
phoenixframework:mainfrom
andzdroid:main

Conversation

@andzdroid
Copy link
Copy Markdown
Contributor

I submitted #478 but I decided to try it myself.

Display process label in application view:

Screenshot 2025-05-24 at 22 37 10

Display process label in process view:

Screenshot 2025-05-24 at 22 37 21

defp to_wrapped_node(type, pid, children) do
case Process.info(pid, :registered_name) do
{:registered_name, []} ->
case Process.info(pid, :label) do
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to read it from :dictionary, see this line as an example:

format_process_label(Keyword.get(dictionary, :"$process_label")) ||

Can you also please add a test? thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I updated the PR

{:ancestors,
Keyword.get(dictionary, :"$ancestors", [])
|> Enum.map(&pid_or_port_details/1)},
{:label, Keyword.get(dictionary, :"$process_label", [])}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default be nil instead? 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{:label, Keyword.get(dictionary, :"$process_label", [])}
{:label, Keyword.get(dictionary, :"$process_label")}

@josevalim josevalim merged commit 5f38d35 into phoenixframework:main May 25, 2025
4 checks passed
@josevalim
Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants