[erlang-questions] observer process labels

Paul Rubin paul@REDACTED
Fri Jun 28 01:55:24 CEST 2013


I've been using observer to watch what's happening in my program as
processes come and go.  It's great the way the little ovals on the
applications tab show the supervision and worker structure, with the  name
of each registered process shown in the oval.

It isn't quite as nice when the process is unregistered, as happens with a
bunch of my processes since they're created dynamically based on external
events.  I do register some (maybe all) of those processes with gproc, but
they can't each be on an atom since indeterminately many of them come and
go during the program's operation.

I'm wondering what people think of the idea of an observer patch that does
one of the following:

1) if the process is registered with gproc, show that as the label

2) look at a special entry in the process dictionary, something like
{observer, label, "some string"}  (or arbitrary term instead of string)
that gets displayed as the label.

#2 is maybe more general, since it doesn't require gproc to be loaded, and
it can be expanded to allow setting the ovals' colors in addition to the
labels.  On the other hand, using the process dictionary for this doesn't
seem so nice.  ETS doesn't seem like the right thing because of the need to
clean it up as the processes exit.

Anyone else like this idea?  I could maybe try to write a patch, though I
haven't looked at the observer code and don't really know what I'd be
getting into.

Paul
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20130627/f5f2e36c/attachment.htm>


More information about the erlang-questions mailing list