Individual tree items represent events and their descriptive labels depend on the information available in the trace record for the event. Causeway labels the tree items according to the following priority.

+

Individual tree items (e.g. shown in the Message-order view above) represent events and their descriptive labels depend on the information available in the trace record for the event. Causeway labels the tree items according to the following priority.

# The <tt>text</tt> field string. This field is required for <tt>Comment</tt> records; it is optional for <tt>Sent</tt>, <tt>SentIf</tt>, and <tt>Resolved</tt> records. (e.g. # Order placed for West Coast Buyers)

# The <tt>text</tt> field string. This field is required for <tt>Comment</tt> records; it is optional for <tt>Sent</tt>, <tt>SentIf</tt>, and <tt>Resolved</tt> records. (e.g. # Order placed for West Coast Buyers)

Instrumenting a Platform to Generate Causeway Trace Logs

See Causeway for user documentation, which includes instructions for launching Causeway from a command line shell.

Setting Causeway's debug flag enables a Debug view. As events are selected in the viewer, the Debug view shows the corresponding trace record in the log file.

$ rune -Dcauseway_debug=true causeway.e-swt

Individual tree items (e.g. shown in the Message-order view above) represent events and their descriptive labels depend on the information available in the trace record for the event. Causeway labels the tree items according to the following priority.

The text field string. This field is required for Comment records; it is optional for Sent, SentIf, and Resolved records. (e.g. # Order placed for West Coast Buyers)

If the trace record has at least one stack entry with a source and span, a single line of source code from the source file specified in the top stack entry. (e.g. _._(inventory).partInStock(partNo, teller);)

If there's no span, source file name and function name specified in the top stack entry. (e.g. [buyer, 8] AsyncAnd.run)

If nothing else, a Causeway comment. (e.g. ## unknown sender)

Causeway's Trace Log Format

Causeway supports the defined by Tyler Close.

When causality tracing is on the events are logged as follows.

Event

Record type

An eventual send to an object

Sent

A message delivery, starting a new turn

Got

Registration of a when-block, to execute when a promise resolves

SentIf

Returned result from a remote object, for local promise resolution

Returned

A state-based event contributes to promise resolution

Progressed

A promise resolves

Fulfilled or Rejected

Programmer logs a comment

Comment

Logging Ajax-style Messaging in Waterken

Consider the sequence of events shown below.

a remote inventory object is queried for the availability of a part

the inventory object reports true to teller, a callback object

The eventual send to the inventory object has two log entries: a Sent and its corresponding Got.

The corresponding Got record matches on message. The message delivery in the product vat starts a new turn, turn 2.
Being at the top of a new turn, there is limited stack capture and getting a source span through Java reflection, is not practical.

Reporting true to teller has two log entries: a Sent and its corresponding Got.

The registration of when-blocks, logged as SentIf records, are filtered from the message-order view, as they don't contribute to the understanding of message flow. However, they do appear in process-order, as shown below.

Performance Issues in Waterken

Due to the expense of stack capture in Java, tracing in Waterken incurs roughly, an order of magnitude performance penalty. If tracing is off, there is no penalty.

Waterken guarantees message order delivery and in addition, if a connection is dropped, there's enough information to know about partial success. For example, if 2 messages (msg1, msg2) are sent from vat A to vat B, they are guaranteed to be processed in the order sent. If the connection is dropped after msg1 is successfully sent, when the connection is re-established, it is known that only msg2 must be resent.

The identifiers used to support these guarantees are also used for tracing. The advantage of these multi-purpose identifiers is there is no overhead when tracing is off (i.e., unique message identifiers, just for tracing, are not sent out over the wire.)

Note: Resending a message after a connection is re-established can result in 2 identical Sent events being logged. Causeway notices when the event records are identical and ignores the duplicate.