Monitoring Utils API Reference
The Monitoring Utils provide comprehensive monitoring, logging, and observability features for edge applications.MetricsCollector
Metrics collection and reporting.Constructor
options
(object): Metrics configuration options
Methods
counter(name, labels)
Create or get counter metric.name
(string): Metric namelabels
(object, optional): Metric labels
gauge(name, labels)
Create or get gauge metric.name
(string): Metric namelabels
(object, optional): Metric labels
histogram(name, labels)
Create or get histogram metric.name
(string): Metric namelabels
(object, optional): Metric labels
send(name, value, labels)
Send custom metric.name
(string): Metric namevalue
(number): Metric valuelabels
(object, optional): Metric labels
StructuredLogger
Structured logging utilities.Constructor
options
(object): Logger configuration options
Methods
info(message, context)
Log info level message.message
(string): Log messagecontext
(object, optional): Additional context
error(message, error, context)
Log error level message.message
(string): Log messageerror
(Error, optional): Error objectcontext
(object, optional): Additional context
warn(message, context)
Log warning level message.message
(string): Log messagecontext
(object, optional): Additional context
debug(message, context)
Log debug level message.message
(string): Log messagecontext
(object, optional): Additional context
DistributedTracer
Distributed tracing utilities.Constructor
options
(object): Tracing configuration options
Methods
startSpan(name, parent)
Start a new trace span.name
(string): Span nameparent
(Span, optional): Parent span
inject(span, carrier)
Inject trace context into carrier.span
(Span): Trace spancarrier
(object): Context carrier
extract(carrier)
Extract trace context from carrier.carrier
(object): Context carrier
HealthChecker
Application health checking.Constructor
options
(object): Health check configuration
Methods
addCheck(name, checkFn)
Add health check.name
(string): Check namecheckFn
(function): Health check function