package health
- Alphabetic
- Public
- Protected
Type Members
- trait AtomicHealthComponent extends AtomicHealthElement with HealthComponent
An AtomicHealthElement whose state is a ComponentHealthState
- trait AtomicHealthElement extends HealthElement
Trait for HealthElement at the leaves of the health dependency tree.
Trait for HealthElement at the leaves of the health dependency tree. Maintains its own state instead of aggregating other components.
- See also
CompositeHealthElement for the aggregating counterpart
- trait CloseableAtomicHealthComponent extends CloseableHealthComponent with AtomicHealthComponent
- trait CloseableHealthComponent extends CloseableHealthQuasiComponent with HealthComponent
Fixes the state of a CloseableHealthQuasiComponent to ComponentHealthState
- trait CloseableHealthElement extends FlagCloseable with HealthElement
A HealthElement that is its own com.digitalasset.canton.lifecycle.FlagCloseable.
A HealthElement that is its own com.digitalasset.canton.lifecycle.FlagCloseable. Use this when the health reporting shall use inheritance over composition.
When combining different HealthElement traits, mix in this one first so that the com.digitalasset.canton.lifecycle.FlagCloseable gets initialized first.
- trait CloseableHealthQuasiComponent extends CloseableHealthElement with HealthQuasiComponent
Refines the state of a CloseableHealthElement to something convertible to a ComponentHealthState
- sealed trait ComponentHealthState extends ToComponentHealthState with PrettyPrinting
Generic State implementation of a component This can be used as a base health state for most component.
Generic State implementation of a component This can be used as a base health state for most component. However ComponentHealth (below) does not enforce the use of this class and a custom State class can be used instead
- final case class ComponentStatus(name: String, state: ComponentHealthState) extends PrettyPrinting with Product with Serializable
Simple representation of the health state of a component, easily (de)serializable (from)to protobuf or JSON
- trait CompositeHealthComponent[ID, HE <: HealthElement] extends CompositeHealthElement[ID, HE] with HealthComponent
- trait CompositeHealthElement[ID, HE <: HealthElement] extends HealthElement
Defines a HealthElement that merely aggregates the state of other (dependent) HealthElements.
Defines a HealthElement that merely aggregates the state of other (dependent) HealthElements. The dependencies need not be reported anywhere.
If you need to manage a state separately for this component, add a dedicated dependency on AtomicHealthElement.
- ID
The identifier type for the dependent health elements.
- final class DelegatingMutableHealthComponent[Id] extends DelegatingMutableHealthQuasiComponent[Id, HealthComponent] with CloseableHealthComponent
- abstract class DelegatingMutableHealthQuasiComponent[Id, H <: HealthQuasiComponent] extends CloseableHealthQuasiComponent with CompositeHealthElement[Id, H] with NamedLogging
A health component that aggregates the health state of multiple mutable dependencies using
reduceState
into a single health state. - final class DependenciesHealthService extends HealthService
A DependenciesHealthService aggregates CloseableHealthComponents under critical and soft dependencies.
A DependenciesHealthService aggregates CloseableHealthComponents under critical and soft dependencies. Services are queryable through their name in the gRPC Health Check service. Both critical and soft dependencies are reported under their names too.
The state of the DependenciesHealthService is io.grpc.health.v1.HealthCheckResponse.ServingStatus.SERVING if and only if none of the critical dependencies have failed. Soft dependencies are merely reported as dependencies, but do not influence the status of the DependenciesHealthService itself.
- class GrpcHealthReporter extends NamedLogging with NoTracing
This class updates gRPC health service with updates coming from Canton's ServiceHealth instances.
This class updates gRPC health service with updates coming from Canton's ServiceHealth instances. See https://github.com/grpc/grpc/blob/master/doc/health-checking.md This class will update the health manager when new health state are being reported by the services, which will in turn be available to external clients through the gRPC Health service.
- class GrpcHealthServer extends NamedLogging with FlagCloseable
- trait HealthCheck extends AutoCloseable
Check to determine a health check response
- sealed trait HealthCheckResult extends AnyRef
Result of a health check
- trait HealthComponent extends HealthQuasiComponent
Refines the state of a HealthElement to ComponentHealthState
- trait HealthElement extends AnyRef
A HealthElement maintains a health state and notifies HealthListeners whenever the state has changed.
A HealthElement maintains a health state and notifies HealthListeners whenever the state has changed.
HealthElements are refined in three dimensions - They can be atomic maintaining their own state (AtomicHealthElement) or composite (CompositeHealthElement) aggregating the states of their dependencies - The state can be refined to ToComponentHealthState with HealthQuasiComponent and further to ComponentHealthState with HealthComponent. - Whether they need to be closed on their own (CloseableHealthElement).
The traits from each dimension can be mixed together to create the appropriate combination. Do not mix several traits from the same dimension!
- trait HealthListener extends AnyRef
A listener on the state of a HealthElement
- trait HealthQuasiComponent extends HealthElement
Refines the state of a HealthElement to ToComponentHealthState
- class HealthServer extends FlagCloseableAsync with NamedLogging
- trait HealthService extends CloseableHealthElement with CompositeHealthElement[String, HealthQuasiComponent]
- class IsActiveCheck extends HealthCheck
For components that simply flag whether they are active or not, just return that.
- final class LivenessHealthService extends HealthService
A LivenessHealthService aggregates CloseableHealthComponents under dependencies.
A LivenessHealthService aggregates CloseableHealthComponents under dependencies. Once switching to io.grpc.health.v1.HealthCheckResponse.ServingStatus.NOT_SERVING it will not switch back. Services are queryable through their name in the gRPC Health Check service. Dependencies are reported under their names too.
The state of the LivenessHealthService is io.grpc.health.v1.HealthCheckResponse.ServingStatus.SERVING if and only if none of the dependencies have fatally failed (have their state ComponentHealthState.Fatal.
- final class MutableHealthComponent extends MutableHealthQuasiComponent[HealthComponent] with HealthComponent
Refines a MutableHealthQuasiComponent state to ComponentHealthState
- class MutableHealthQuasiComponent[H <: HealthQuasiComponent] extends CloseableHealthQuasiComponent with CompositeHealthElement[Unit, H] with NamedLogging
A CloseableHealthQuasiComponent that derives its state from an optional mutable HealthQuasiComponent.
A CloseableHealthQuasiComponent that derives its state from an optional mutable HealthQuasiComponent. Use when the health component is not instantiated at bootstrap time and/or changes during the lifetime.
Must be closed separately.
- sealed trait NodeStatus[+S <: Status] extends PrettyPrinting with Product with Serializable
- class PeriodicCheck extends HealthCheck with NamedLogging
Rather than executing a check for every isHealthy call periodically run the check and cache the result, and return this cached value for isHealthy.
- class PingHealthCheck extends HealthCheck with NamedLogging
Pings the supplied participant to determine health.
Pings the supplied participant to determine health. Will be considered unhealthy if unable to resolve the ping service for the participant alias (likely due to startup and initialization). Ping success considered healthy, ping failure considered unhealthy. If the ping future fails (rather than completing successfully with a failure), it will be converted to a unhealthy response and the exception will be logged at DEBUG level.
- final case class SequencerAdminStatus(acceptsAdminChanges: Boolean) extends ToComponentHealthState with PrettyPrinting with Product with Serializable
Admin status of the sequencer node.
Admin status of the sequencer node.
- acceptsAdminChanges
indicates whether the sequencer node accepts administration commands
- final case class SequencerHealthStatus(isActive: Boolean, details: Option[String] = None) extends ToComponentHealthState with PrettyPrinting with Product with Serializable
Health status of the sequencer component itself.
Health status of the sequencer component itself.
- isActive
implementation specific flag indicating whether the sequencer is active
- final case class ServiceHealthStatusManager(name: String, manager: HealthStatusManager, services: Set[HealthService]) extends Product with Serializable
Combines a io.grpc.protobuf.services.HealthStatusManager (exposed as a gRPC health service) with the set of DependenciesHealthServices it needs to report on.
- final case class SimpleStatus(uid: UniqueIdentifier, uptime: Duration, ports: Map[String, Port], active: Boolean, topologyQueue: TopologyQueueStatus, components: Seq[ComponentStatus], version: ReleaseVersion) extends Status with Product with Serializable
- final case class StaticHealthCheck(result: HealthCheckResult) extends HealthCheck with Product with Serializable
Constant response for a health check (used by the always-healthy configuration)
- trait ToComponentHealthState extends AnyRef
Interface that provides conversion from a State type to ComponentHealthState
- final case class TopologyQueueStatus(manager: Int, dispatcher: Int, clients: Int) extends PrettyPrinting with Product with Serializable
Topology manager queue status
Topology manager queue status
Status around topology management queues
- manager
number of queued commands in the topology manager
- dispatcher
number of queued transactions in the dispatcher
- clients
number of observed transactions that are not yet effective
- final case class Unhealthy(message: String) extends HealthCheckResult with Product with Serializable
The check deems something unhealthy
The check deems something unhealthy
- message
User printable message describing why a unhealthy result was given
Value Members
- object ComponentHealthState extends ShowUtil
- object ComponentStatus extends Serializable
- object DependenciesHealthService
- object EnterpriseHealthCheck
- object HealthCheck
- object HealthComponent
- object HealthElement
- object HealthListener
- object HealthServer
- object Healthy extends HealthCheckResult
Everything that the check checks is healthy
- object LivenessHealthService
- object MutableHealthComponent
- object NodeStatus extends Serializable
- object SequencerAdminStatus extends PrettyUtil with ShowUtil with Serializable
- object SequencerHealthStatus extends PrettyUtil with ShowUtil with Serializable
- object TopologyQueueStatus extends Serializable