SingleThreadMonitor monitor = getMonitor();
monitor.addError(e);
}
private static SingleThreadMonitor getMonitor() {
SingleThreadMonitor monitor = THREAD_INFO_BY_ID.get(Thread.currentThread());
if (monitor == null) {
monitor = new SingleThreadMonitorImpl(Thread.currentThread());
THREAD_INFO_BY_ID.put(Thread.currentThread(), monitor);
EVENT_BUS.post(new ThreadMonitorEvent(monitor, ThreadMonitorEvent.Type.MonitorAdded));
}