autotel-devtools 6.1.0 → 6.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -440,13 +440,16 @@ var DevtoolsServer = class {
440
440
  addTraces(traces) {
441
441
  for (const trace of traces) this.addTrace(trace);
442
442
  }
443
+ // `errors` is full-state on every broadcast (the client replaces, not appends),
444
+ // so non-trace broadcasts must echo the current error groups rather than `[]` —
445
+ // otherwise a log/metric arriving after an error would wipe it from the UI.
443
446
  addLog(log) {
444
447
  this.logs = appendWithLimit(this.logs, log, this.limits.maxLogCount);
445
- this.broadcast({ traces: [], metrics: [], logs: [log], errors: [] });
448
+ this.broadcast({ traces: [], metrics: [], logs: [log], errors: this.errorAggregator.getErrorGroups() });
446
449
  }
447
450
  addLogs(logs) {
448
451
  this.logs = appendManyWithLimit(this.logs, logs, this.limits.maxLogCount);
449
- this.broadcast({ traces: [], metrics: [], logs, errors: [] });
452
+ this.broadcast({ traces: [], metrics: [], logs, errors: this.errorAggregator.getErrorGroups() });
450
453
  }
451
454
  addMetric(metric) {
452
455
  this.metrics = appendWithLimit(
@@ -454,7 +457,7 @@ var DevtoolsServer = class {
454
457
  metric,
455
458
  this.limits.maxMetricCount
456
459
  );
457
- this.broadcast({ traces: [], metrics: [metric], logs: [], errors: [] });
460
+ this.broadcast({ traces: [], metrics: [metric], logs: [], errors: this.errorAggregator.getErrorGroups() });
458
461
  }
459
462
  getCurrentData() {
460
463
  return {