Create an SBObservable instance
Application ID
Debug mode (development, production, production-debug)
Current working directory
Plugin manager instance
Check if observable plugins are ready
true if all plugins have been initialized
Setup and load observable plugins from configuration
Loads configured observable plugins and initializes their filters. This is called during ServiceBase initialization.
Configuration manager instance
Initialize all observable plugins
Calls the init lifecycle method on all loaded observable plugins. This is called during ServiceBase initialization.
DTrace for tracking initialization
Configuration manager instance
Run all observable plugins
Calls the run lifecycle method on all loaded observable plugins. This is called during ServiceBase startup.
DTrace for tracking the run phase
Dispose all observable plugins
Calls the dispose lifecycle method on all loaded observable plugins and clears the plugin list. This is called during ServiceBase shutdown.
Emit a debug log event
Plugin name
DTrace object
Log message
Log metadata
Emit an info log event
Plugin name
DTrace object
Log message
Log metadata
Emit a warn log event
Plugin name
DTrace object
Log message
Log metadata
Emit counter creation event
Event timestamp
Plugin name
Metric name
Short description
Detailed help text
Optionallabels: string[]Optional label names
Emit counter increment event
Event timestamp
Plugin name
Metric name
Increment value
Optionallabels: Record<string, string>Optional label values
Emit gauge creation event
Event timestamp
Plugin name
Metric name
Short description
Detailed help text
Optionallabels: string[]Optional label names
Emit gauge set event
Event timestamp
Plugin name
Metric name
New gauge value
Optionallabels: Record<string, string>Optional label values
Emit histogram creation event
Event timestamp
Plugin name
Metric name
Short description
Detailed help text
Optionalboundaries: number[]Optional histogram boundaries
Optionallabels: string[]Optional label names
Emit histogram observation event
Event timestamp
Plugin name
Metric name
Observed value
Optionallabels: Record<string, string>Optional label values
Emit span start event
Event timestamp
Application ID
Plugin name
Trace ID
Parent span ID (null for root spans)
This span's ID
Span name
Optionalattributes: Record<string, string | number | boolean>Optional span attributes
Emit span end event
Event timestamp
Application ID
Plugin name
Trace ID
Span ID
Optionalattributes: Record<string, string | number | boolean>Optional final attributes
Emit span error event
Event timestamp
Application ID
Plugin name
Trace ID
Span ID
Error to record
Optionalattributes: Record<string, string | number | boolean>Optional error attributes
BSB Observable Controller - Unified logging, metrics, and tracing
This class is responsible for managing all observability in the BSB framework. It coordinates observable plugins (like OpenTelemetry, Prometheus, etc.) and routes events from the Observable API to the configured backends.
If you have a specific way of managing observability, you can extend this class and use your own class when creating the ServiceBase instance.
See
API: SBObservable
Example