Initializes the observability service with specified options, setting up health, metrics, and error registries based on those options.
Configuration options for observability, including settings for health checks, metrics collection, and error logging.
Readonly
optionsConfiguration options for observability, including settings for health checks, metrics collection, and error logging.
The errors of the monitored application
The status of the monitored application
Update or add a check measure. This should be used to inform about the state of resources behind the Component/Microservice, for example states of connections with field devices.
The new check will be taking into account in the overall health status.
The new check will be included in the checks
object with the key "component:measure".
If this key already exists, the componentId
of the check
parameter will be checked, if
there is a check with the same componentId
in the array, the check will be updated, in other
case the new check will be added to the existing array.
The maximum number external checks is 100
component identification
measure identification
check to be updated or included
true, if the check has been updated
Attaches a new service to be monitored under the observability framework. Services are components of your application that you wish to monitor for health, track errors for, and collect metrics on.
The service to attach to observability.
Represents a comprehensive observability service that aggregates various registries including health checks, metrics, and error logging. This class is responsible for managing and initializing these registries, attaching services to them, and integrating them into a unified observability application.
The service leverages an
ObservabilityAppManager
to orchestrate the express application that serves observability endpoints. It allows for dynamic registration of services to enable monitoring, health checks, and error tracking.