crossbar.edge.worker.tracing¶
Classes¶
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:
objectHow 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.