monitor.events¶
MonitorEvent — a timestamped, annotated marker for the dashboard timeline.
- Events appear as vertical lines on all metric charts. They can be created by:
The dashboard UI (user types a label and clicks “Mark Event”)
Test suite code via OttoSuite.addMonitorEvent()
Automatically by OttoSuite.setUp() / tearDown() when monitoring is active
-
class otto.monitor.events.MonitorEvent(timestamp, label, source=
'manual', color='#888888', dash='dash', id=0, end_timestamp=None)¶ Bases:
objectA labeled, timestamped marker for the monitoring dashboard.
- timestamp : --is-rst--:py:class:`~datetime.datetime`¶
When the event occurred.
- label : --is-rst--:py:class:`str`¶
Human-readable description shown on hover in the dashboard.
-
source : --is-rst--:py:class:`str` =
'manual'¶ ‘manual’ (dashboard UI), ‘user_code’ (test code), or ‘auto’ (lifecycle).
- Type:¶
Origin of the event
-
color : --is-rst--:py:class:`str` =
'#888888'¶ CSS color for the vertical marker line (hex, named color, or rgb()).
-
dash : --is-rst--:py:class:`str` =
'dash'¶ solid, dot, dash, longdash, dashdot, longdashdot.
- Type:¶
Plotly line dash style. One of
-
id : --is-rst--:py:class:`int` =
0¶ Unique integer id assigned by MetricCollector on creation (or loaded from SQLite).