crossbar.edge.worker.tracing

Classes

FabricRouterTrace

How it works:

Module Contents

class FabricRouterTrace(session, trace_id, on_trace_period_finished=None, trace_level='message', trace_app_payload=False, batching_period=200, persist=False, duration=None, limit=60)[source]

Bases: object

How it works:

A trace is always run from a router worker process. The router code calls into maybe_trace_rx_msg/maybe_trace_tx_msg to trace messages as they are received and sent to/from the router. These 2 functions check if the message is to be traced in the first place, and if so, create a trace record and append that to a in-memory list in the same (main) thread. Every 10-100ms, a looping call will trigger that will then take the buffered messages in the list and forward that to a background thread where it is written to a LMDB database file specific to this trace.

_batch_loop()[source]
_batch_looper = None[source]
_batching_period = 200[source]
_current_batch = [][source]
_duration = None[source]
_ended = None[source]
_limit = 60[source]
_maybe_trace_msg(session, msg, direction)[source]
_on_trace_period_finished = None[source]
_open_actions[source]
_period = 0[source]
_period_ts = None[source]
_persist = False[source]
_seq = 0[source]
_session[source]
_started = None[source]
_status = 'created'[source]
_trace[source]
_trace_app_payload = False[source]
_trace_id[source]
_trace_level = 'message'[source]
get_data(from_seq, to_seq, limit)[source]
log[source]
marshal()[source]
maybe_trace_rx_msg(session, msg)[source]
maybe_trace_tx_msg(session, msg)[source]
start()[source]
stop()[source]