webmachine – wmtrace exception

webmachine – wmtrace exception – Problem discription

I was getting the following exception when i thought i had wmtrace successfully set up.

The server encountered an error while processing this request:

I had following setup complete and i was seeing the .trace files successfully created after hitting requests to my resource.

init(Config) ->
%% enable tracing the decision core for debugging
{{trace, "traces"}, Config}.

And adding the vmtrace dispatch rule

{["wmtrace",'*'], %% exposed at /wmtrace/*
wmtrace_resource, %% defined in wmtrace_resource.erl
%% (included with webmachine)
[{trace_dir, "traces"}]}. %% trace files are in "traces" directory


What i had skipped over in the documentation was that the visualization to be enabled.

After hitting ./start.sh hit return and enter the following in the erlang shell (absolute path).

wmtrace_resource:add_dispatch_rule("wmtrace", "/tmp").

…or relative path

wmtrace_resource:add_dispatch_rule("wmtrace", "traces").

This should yield a more inviting message like Traces in /tmp when you hit hostname:port/wmtrace