<p>We used a similar, though more lightweight and probably less thought-through version of this: use make_ref() and show the reference both to the user and in the logs.<br>
(Compared to Jesper's approach, this has potential uniqueness issues, and gives less control over display form, unless you really work for it. On the other hand, Jesper's function technically has a uniqueness problem wrt. multiple nodes - so it'd make sense to add a node() component there.)</p>
<div class="gmail_quote">Den 30/08/2012 16.53 skrev "Jesper Louis Andersen" <<a href="mailto:jesper.louis.andersen@erlang-solutions.com">jesper.louis.andersen@erlang-solutions.com</a>>:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
On Aug 29, 2012, at 9:47 AM, Thomas Elsgaard <<a href="mailto:thomas.elsgaard@gmail.com">thomas.elsgaard@gmail.com</a>> wrote:<br>
<br>
> Hi Joe<br>
><br>
> There is also PHK's concept of "guru meditation" in the varnish http accelerator..<br>
><br>
> <a href="http://www.version2.dk/blog/guru-meditation-9738" target="_blank">http://www.version2.dk/blog/guru-meditation-9738</a><br>
><br>
> Basically the idea is: the user cannot do anything about the error, so let it fail, but provide the transaction Id (xid) so the admin can can troubleshoot...<br>
<br>
I did this in erlang. It is very easy. When the web server crashes on the message, you grab Trace = erlang:get_stacktrace(), and Now = erlang:now(). Then you generate a unique token: crypto:sha(term_to_binary({Trace, Now})) and you put that token to the user as well as in the crash log of the server.<br>
<br>
Now any bug reported with a proper token just requires a grep on the logs to find the exact error the user had.<br>
<br>
I think it took me 1-2 hours to write and test.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>