LevitMonitor class
The authoritative entry point for application monitoring and diagnostics.
LevitMonitor acts as a unified hub that collects events from both the dependency injection system and the reactive state engine. It processes these events through a filtering pipeline and dispatches them to a LevitTransport for inspection or storage.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- filter → bool Function(MonitorEvent event)?
-
Returns the current event filter, if any.
no setter
- logLevel → Level
-
Returns the current minimum log level.
no setter
Static Methods
-
attach(
{LevitTransport? transport, List< LevitTransport> ? transports}) → void - Bootstraps the monitoring system and attaches it to the application.
-
detach(
) → void - Detaches the monitor from the application and releases associated resources.
-
emitCustomEvent(
{required String namespace, required String name, Map< String, Object?> attributes = const {}, Level level = Level.info, bool sensitive = false, Object? error, StackTrace? stackTrace}) → void - Emits a dependency-neutral structured custom event.
-
log(
Object? data, {Level level = Level.info, Object? error, StackTrace? stackTrace}) → void - Emits a diagnostic log event to the monitoring pipeline.
-
logDebug(
Object? data, {Object? error, StackTrace? stackTrace}) → void -
Helper method for emitting a log at
Level.debug. -
logError(
Object? data, {Object? error, StackTrace? stackTrace}) → void -
Helper method for emitting a log at
Level.error. -
logFatal(
Object? data, {Object? error, StackTrace? stackTrace}) → void -
Helper method for emitting a log at
Level.fatal. -
logInfo(
Object? data, {Object? error, StackTrace? stackTrace}) → void -
Helper method for emitting a log at
Level.info. -
logTrace(
Object? data, {Object? error, StackTrace? stackTrace}) → void -
Helper method for emitting a log at
Level.trace. -
logWarning(
Object? data, {Object? error, StackTrace? stackTrace}) → void -
Helper method for emitting a log at
Level.warning. -
obfuscate(
dynamic value) → dynamic -
Obfuscates a
valueif it is considered sensitive. -
setFilter(
bool filter(MonitorEvent event)?) → void - Configures a global filter to selectively process monitor events.
-
setLogLevel(
Level level) → void - Sets the minimum log level for LevitMonitor.
-
setObfuscator(
LevitObfuscator? obfuscator) → void - Configures a global obfuscator for sensitive data.
-
shouldProcess(
MonitorEvent event) → bool -
Evaluates whether a specific
eventshould be processed based on the current filter configuration.