Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

levit_monitor

Pub Version Platforms License: MIT codecov

Purpose & Scope

levit_monitor is the diagnostics and event export layer for Levit runtimes.

This package is responsible for:

  • Capturing structured runtime events from DI and reactive layers.
  • Filtering and obfuscating payloads before export.
  • Dispatching events through pluggable transports.
  • Maintaining optional in-memory shadow state for debugging workflows.

This package does not include:

  • Visualization UI or dashboards.
  • Business logic instrumentation outside the Levit runtime event model.

Conceptual Overview

Monitoring is opt-in. Calling LevitMonitor.attach() installs middleware into the runtime. Event flow:

  1. Runtime emits DI/reactive events.
  2. Filter decides whether to forward the event.
  3. Obfuscator redacts sensitive values.
  4. Transport(s) deliver encoded events.

Getting Started

dependencies:
  levit_monitor: ^latest
import 'package:levit_monitor/levit_monitor.dart';

void main() {
  LevitMonitor.attach(
    transport: ConsoleTransport(),
    filter: (event) => true,
  );
}

Design Principles

  • Opt-in instrumentation with explicit attach/detach lifecycle.
  • Transport-agnostic event delivery.
  • Privacy-aware output through obfuscation hooks.
  • Low-friction integration with existing Levit middleware semantics.