[erlang-questions] trouble with erlang or erlang is a ghetto
Wed Jul 27 06:30:06 CEST 2011
FWIW: We tag each application-level request with a "what" and "when" and
pass this record along to other parts of the system. When the application
gets back its reply, it computes statistics. This allows us to track
messages that take surprisingly long time -- typically based on some
external dependency -- and alert on how many they are, and get some
The most fun is when the request enters through one node, but finishes/exits
through another node, because the clocks are not 100% in sync, so we
sometimes end up with messages taking negative time. The fix for that is to
also tag the "source node" in the per-request record that we carry along,
and finish off by forwarding that record back to the creator for
Americans might object: there is no way we would sacrifice our living
standards for the benefit of people in the rest of the world. Nevertheless,
whether we get there willingly or not, we shall soon have lower consumption
rates, because our present rates are unsustainable.
On Tue, Jul 26, 2011 at 3:14 PM, Jesper Louis Andersen <
> On Tue, Jul 26, 2011 at 22:51, Joel Reymont <joelr1@REDACTED> wrote:
> > On Jul 26, 2011, at 9:23 PM, Jesper Louis Andersen wrote:
> >> Add a flag to erlang:trace/3 such that we can trace a function based
> upon a
> >> sampling value. For instance, that 1/8192 messages on average is
> >> traced. Together with call/return we now know how much time was spent
> >> in that function as a whole.
> > There may be message passing along the request path, processes talking to
> one another.
> > You want to capture and time this interaction.
> Ah yes, that is something I completely missed. Indeed you want to
> trace along messages also, but that makes it less obvious what to do.
> I am more for capturing such instrumentation information on a random
> sampling basis. You could do it manually though by inserting
> instrumentation functions along the path and then use those functions
> as hooks for a unique tag. That is probably what I'd do today if I
> needed this. Then I'd trace the instrumentation functions at random
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions