package metrics

Content Hierarchy
Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Package Members

  1. package protobuf

Type Members

  1. final case class AdaptiveLoadBalancingGroup(metricsSelector: MetricsSelector = MixMetricsSelector, paths: Iterable[String] = Nil, routerDispatcher: String = Dispatchers.DefaultDispatcherId) extends Group with Product with Serializable

    A router group that performs load balancing of messages to cluster nodes based on cluster metric data.

    A router group that performs load balancing of messages to cluster nodes based on cluster metric data.

    It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.

    The configuration parameter trumps the constructor arguments. This means that if you provide paths during instantiation they will be ignored if the router is defined in the configuration file for the actor being used.

    metricsSelector

    decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics

    paths

    string representation of the actor paths of the routees, messages are sent with akka.actor.ActorSelection to these paths

    routerDispatcher

    dispatcher to use for the router head actor, which handles router management messages

    Annotations
    @SerialVersionUID()
  2. final case class AdaptiveLoadBalancingPool(metricsSelector: MetricsSelector = MixMetricsSelector, nrOfInstances: Int = 0, supervisorStrategy: SupervisorStrategy = Pool.defaultSupervisorStrategy, routerDispatcher: String = Dispatchers.DefaultDispatcherId, usePoolDispatcher: Boolean = false) extends Pool with Product with Serializable

    A router pool that performs load balancing of messages to cluster nodes based on cluster metric data.

    A router pool that performs load balancing of messages to cluster nodes based on cluster metric data.

    It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.

    The configuration parameter trumps the constructor arguments. This means that if you provide nrOfInstances during instantiation they will be ignored if the router is defined in the configuration file for the actor being used.

    Supervision Setup

    Any routees that are created by a router will be created as the router's children. The router is therefore also the children's supervisor.

    The supervision strategy of the router actor can be configured with #withSupervisorStrategy. If no strategy is provided, routers default to a strategy of “always escalate”. This means that errors are passed up to the router's supervisor for handling.

    The router's supervisor will treat the error as an error with the router itself. Therefore a directive to stop or restart will cause the router itself to stop or restart. The router, in turn, will cause its children to stop and restart.

    metricsSelector

    decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics

    nrOfInstances

    initial number of routees in the pool

    supervisorStrategy

    strategy for supervising the routees, see 'Supervision Setup'

    routerDispatcher

    dispatcher to use for the router head actor, which handles supervision, death watch and router management messages

    Annotations
    @SerialVersionUID()
  3. final case class AdaptiveLoadBalancingRoutingLogic(system: ActorSystem, metricsSelector: MetricsSelector = MixMetricsSelector) extends RoutingLogic with NoSerializationVerificationNeeded with Product with Serializable

    Load balancing of messages to cluster nodes based on cluster metric data.

    Load balancing of messages to cluster nodes based on cluster metric data.

    It uses random selection of routees based on probabilities derived from the remaining capacity of corresponding node.

    system

    the actor system hosting this router

    metricsSelector

    decides what probability to use for selecting a routee, based on remaining capacity as indicated by the node metrics

  4. abstract class CapacityMetricsSelector extends MetricsSelector

    A MetricsSelector producing weights from remaining capacity.

    A MetricsSelector producing weights from remaining capacity. The weights are typically proportional to the remaining capacity.

    Annotations
    @nowarn() @SerialVersionUID()
  5. final case class ClusterMetricsChanged(nodeMetrics: Set[NodeMetrics]) extends ClusterMetricsEvent with Product with Serializable

    Current snapshot of cluster node metrics.

  6. trait ClusterMetricsEvent extends AnyRef

    Local cluster metrics extension events.

    Local cluster metrics extension events.

    Published to local event bus subscribers by ClusterMetricsCollector.

  7. class ClusterMetricsExtension extends Extension

    Cluster metrics extension.

    Cluster metrics extension.

    Cluster metrics is primarily for load-balancing of nodes. It controls metrics sampling at a regular frequency, prepares highly variable data for further analysis by other entities, and publishes the latest cluster metrics data around the node ring and local eventStream to assist in determining the need to redirect traffic to the least-loaded nodes.

    Metrics sampling is delegated to the MetricsCollector.

    Smoothing of the data for each monitored process is delegated to the EWMA for exponential weighted moving average.

  8. case class ClusterMetricsSettings(config: Config) extends Product with Serializable

    Metrics extension settings.

    Metrics extension settings. Documented in: src/main/resources/reference.conf.

  9. class ClusterMetricsStrategy extends OneForOneStrategy

    Default ClusterMetricsSupervisor strategy: A configurable akka.actor.OneForOneStrategy with restart-on-throwable decider.

  10. sealed abstract class CollectionControlMessage extends Serializable

    Runtime collection management commands.

  11. case class DefaultSigarProvider(settings: ClusterMetricsSettings) extends SigarProvider with Product with Serializable

    Provide sigar instance as SigarProxy with configured location via ClusterMetricsSettings.

  12. final case class EWMA(value: Double, alpha: Double) extends Product with Serializable

    The exponentially weighted moving average (EWMA) approach captures short-term movements in volatility for a conditional volatility forecasting model.

    The exponentially weighted moving average (EWMA) approach captures short-term movements in volatility for a conditional volatility forecasting model. By virtue of its alpha, or decay factor, this provides a statistical streaming data model that is exponentially biased towards newer entries.

    https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average

    An EWMA only needs the most recent forecast value to be kept, as opposed to a standard moving average model.

    value

    the current exponentially weighted moving average, e.g. Y(n - 1), or, the sampled value resulting from the previous smoothing iteration. This value is always used as the previous EWMA to calculate the new EWMA.

    alpha

    decay factor, sets how quickly the exponential weighting decays for past data compared to new data, see https://en.wikipedia.org/wiki/Moving_average#Exponential_moving_average

    Annotations
    @SerialVersionUID()
  13. class JmxMetricsCollector extends MetricsCollector

    Loads JVM and system metrics through JMX monitoring beans.

  14. final case class Metric extends MetricNumericConverter with Product with Serializable

    Metrics key/value.

    Metrics key/value.

    Equality of Metric is based on its name.

    Annotations
    @SerialVersionUID()
  15. trait MetricsCollector extends Closeable

    Metrics sampler.

    Metrics sampler.

    Implementations of cluster system metrics collectors extend this trait.

  16. trait MetricsSelector extends Serializable

    A MetricsSelector is responsible for producing weights from the node metrics.

    A MetricsSelector is responsible for producing weights from the node metrics.

    Annotations
    @nowarn() @SerialVersionUID()
  17. final case class MixMetricsSelector(selectors: IndexedSeq[CapacityMetricsSelector]) extends MixMetricsSelectorBase with Product with Serializable

    MetricsSelector that combines other selectors and aggregates their capacity values.

    MetricsSelector that combines other selectors and aggregates their capacity values. By default it uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]

    Annotations
    @SerialVersionUID()
  18. abstract class MixMetricsSelectorBase extends CapacityMetricsSelector

    Base class for MetricsSelector that combines other selectors and aggregates their capacity.

    Base class for MetricsSelector that combines other selectors and aggregates their capacity.

    Annotations
    @SerialVersionUID()
  19. final case class NodeMetrics(address: Address, timestamp: Long, metrics: Set[Metric] = Set.empty[Metric]) extends Product with Serializable

    The snapshot of current sampled health metrics for any monitored process.

    The snapshot of current sampled health metrics for any monitored process. Collected and gossipped at regular intervals for dynamic cluster management strategies.

    Equality of NodeMetrics is based on its address.

    address

    akka.actor.Address of the node the metrics are gathered at

    timestamp

    the time of sampling, in milliseconds since midnight, January 1, 1970 UTC

    metrics

    the set of sampled akka.cluster.metrics.Metric

    Annotations
    @SerialVersionUID()
  20. class SigarMetricsCollector extends JmxMetricsCollector

    Loads metrics through Hyperic SIGAR and JMX monitoring beans.

    Loads metrics through Hyperic SIGAR and JMX monitoring beans. This loads wider and more accurate range of metrics compared to JmxMetricsCollector by using SIGAR's native OS library.

    The constructor will by design throw exception if org.hyperic.sigar.Sigar can't be loaded, due to missing classes or native libraries.

  21. trait SigarProvider extends AnyRef

    Provide sigar instance as SigarProxy.

    Provide sigar instance as SigarProxy.

    User can provision sigar classes and native library in one of the following ways:

    1) Use Kamon sigar-loader as a project dependency for the user project. Metrics extension will extract and load sigar library on demand with help of Kamon sigar provisioner.

    2) Use Kamon sigar-loader as java agent: java -javaagent:/path/to/sigar-loader.jar Kamon sigar loader agent will extract and load sigar library during JVM start.

    3) Place sigar.jar on the classpath and sigar native library for the o/s on the java.library.path User is required to manage both project dependency and library deployment manually.

Value Members

  1. object ClusterMetricsExtension extends ExtensionId[ClusterMetricsExtension] with ExtensionIdProvider

    Cluster metrics extension provider.

  2. object ClusterMetricsStrategy extends Serializable

    Provide custom metrics strategy resources.

  3. case object CollectionStartMessage extends CollectionControlMessage with Product with Serializable

    Command for ClusterMetricsSupervisor to start metrics collection.

    Command for ClusterMetricsSupervisor to start metrics collection.

    Annotations
    @SerialVersionUID()
  4. case object CollectionStopMessage extends CollectionControlMessage with Product with Serializable

    Command for ClusterMetricsSupervisor to stop metrics collection.

    Command for ClusterMetricsSupervisor to stop metrics collection.

    Annotations
    @SerialVersionUID()
  5. case object CpuMetricsSelector extends CapacityMetricsSelector with Product with Serializable

    MetricsSelector that uses the combined CPU time metrics and stolen CPU time metrics.

    MetricsSelector that uses the combined CPU time metrics and stolen CPU time metrics. In modern Linux kernels: CpuCombined + CpuStolen + CpuIdle = 1.0 or 100%. Combined CPU is sum of User + Sys + Nice + Wait times, as percentage. Stolen CPU is the amount of CPU taken away from this virtual machine by the hypervisor, as percentage.

    Low CPU capacity => small node weight.

    Annotations
    @SerialVersionUID()
  6. object EWMA extends Serializable
  7. case object HeapMetricsSelector extends CapacityMetricsSelector with Product with Serializable

    MetricsSelector that uses the heap metrics.

    MetricsSelector that uses the heap metrics. Low heap capacity => small weight.

    Annotations
    @SerialVersionUID()
  8. object Metric extends MetricNumericConverter with Serializable

    Factory for creating valid Metric instances.

  9. object MetricsSelector extends Serializable
  10. object MixMetricsSelector extends MixMetricsSelectorBase

    Singleton instance of the default MixMetricsSelector, which uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]

    Singleton instance of the default MixMetricsSelector, which uses [akka.cluster.routing.HeapMetricsSelector], [akka.cluster.routing.CpuMetricsSelector], and [akka.cluster.routing.SystemLoadAverageMetricsSelector]

    Annotations
    @SerialVersionUID()
  11. object SigarProvider
  12. object StandardMetrics

    Definitions of the built-in standard metrics.

    Definitions of the built-in standard metrics.

    The following extractors and data structures makes it easy to consume the NodeMetrics in for example load balancers.

  13. case object SystemLoadAverageMetricsSelector extends CapacityMetricsSelector with Product with Serializable

    MetricsSelector that uses the system load average metrics.

    MetricsSelector that uses the system load average metrics. System load average is OS-specific average load on the CPUs in the system, for the past 1 minute. The system is possibly nearing a bottleneck if the system load average is nearing number of cpus/cores. Low load average capacity => small weight.

    Annotations
    @SerialVersionUID()

Ungrouped