congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
HermesMetrics.registerGauge
Code IndexAdd Tabnine to your IDE (free)

How to use
registerGauge
method
in
pl.allegro.tech.hermes.common.metric.HermesMetrics

Best Java code snippets using pl.allegro.tech.hermes.common.metric.HermesMetrics.registerGauge (Showing top 11 results out of 315)

origin: allegro/hermes

MaxRateCalculator(SubscriptionAssignmentCache subscriptionAssignmentCache,
         SubscriptionsCache subscriptionsCache,
         MaxRateBalancer balancer,
         MaxRateRegistry maxRateRegistry,
         HermesMetrics metrics,
         Clock clock) {
  this.subscriptionAssignmentCache = subscriptionAssignmentCache;
  this.subscriptionsCache = subscriptionsCache;
  this.balancer = balancer;
  this.maxRateRegistry = maxRateRegistry;
  this.metrics = metrics;
  this.clock = clock;
  metrics.registerGauge(Gauges.MAX_RATE_CALCULATION_DURATION, () -> lastUpdateDurationMillis);
}
origin: pl.allegro.tech.hermes/hermes-consumers

MaxRateCalculator(SubscriptionAssignmentCache subscriptionAssignmentCache,
         SubscriptionsCache subscriptionsCache,
         MaxRateBalancer balancer,
         MaxRateRegistry maxRateRegistry,
         HermesMetrics metrics,
         Clock clock) {
  this.subscriptionAssignmentCache = subscriptionAssignmentCache;
  this.subscriptionsCache = subscriptionsCache;
  this.balancer = balancer;
  this.maxRateRegistry = maxRateRegistry;
  this.metrics = metrics;
  this.clock = clock;
  metrics.registerGauge(Gauges.MAX_RATE_CALCULATION_DURATION, () -> lastUpdateDurationMillis);
}
origin: allegro/hermes

public ConsumersRuntimeMonitor(ConsumersSupervisor consumerSupervisor,
                SupervisorController workloadSupervisor,
                HermesMetrics hermesMetrics,
                SubscriptionsCache subscriptionsCache, ConfigFactory configFactory) {
  this.consumerSupervisor = consumerSupervisor;
  this.workloadSupervisor = workloadSupervisor;
  this.subscriptionsCache = subscriptionsCache;
  this.scanIntervalSeconds = configFactory.getIntProperty(Configs.CONSUMER_WORKLOAD_MONITOR_SCAN_INTERVAL);
  hermesMetrics.registerGauge("consumers-workload.monitor.running", () -> monitorMetrics.running);
  hermesMetrics.registerGauge("consumers-workload.monitor.assigned", () -> monitorMetrics.assigned);
  hermesMetrics.registerGauge("consumers-workload.monitor.missing", () -> monitorMetrics.missing);
  hermesMetrics.registerGauge("consumers-workload.monitor.oversubscribed", () -> monitorMetrics.oversubscribed);
}
origin: pl.allegro.tech.hermes/hermes-consumers

public ConsumersRuntimeMonitor(ConsumersSupervisor consumerSupervisor,
                SupervisorController workloadSupervisor,
                HermesMetrics hermesMetrics,
                SubscriptionsCache subscriptionsCache, ConfigFactory configFactory) {
  this.consumerSupervisor = consumerSupervisor;
  this.workloadSupervisor = workloadSupervisor;
  this.subscriptionsCache = subscriptionsCache;
  this.scanIntervalSeconds = configFactory.getIntProperty(Configs.CONSUMER_WORKLOAD_MONITOR_SCAN_INTERVAL);
  hermesMetrics.registerGauge("consumers-workload.monitor.running", () -> monitorMetrics.running);
  hermesMetrics.registerGauge("consumers-workload.monitor.assigned", () -> monitorMetrics.assigned);
  hermesMetrics.registerGauge("consumers-workload.monitor.missing", () -> monitorMetrics.missing);
  hermesMetrics.registerGauge("consumers-workload.monitor.oversubscribed", () -> monitorMetrics.oversubscribed);
}
origin: pl.allegro.tech.hermes/hermes-consumers

public ByteBufferMessageBatchFactory(int poolableSize, int maxPoolSize, Clock clock, HermesMetrics hermesMetrics) {
  this.clock = clock;
  this.bufferPool = new DirectBufferPool(maxPoolSize, poolableSize, true);
  hermesMetrics.registerGauge(Gauges.BATCH_BUFFER_TOTAL_BYTES, bufferPool::totalMemory);
  hermesMetrics.registerGauge(Gauges.BATCH_BUFFER_AVAILABLE_BYTES, bufferPool::availableMemory);
}
origin: allegro/hermes

public ByteBufferMessageBatchFactory(int poolableSize, int maxPoolSize, Clock clock, HermesMetrics hermesMetrics) {
  this.clock = clock;
  this.bufferPool = new DirectBufferPool(maxPoolSize, poolableSize, true);
  hermesMetrics.registerGauge(Gauges.BATCH_BUFFER_TOTAL_BYTES, bufferPool::totalMemory);
  hermesMetrics.registerGauge(Gauges.BATCH_BUFFER_AVAILABLE_BYTES, bufferPool::availableMemory);
}
origin: allegro/hermes

private void registerGauge(Producer<byte[], byte[]> producer, HermesMetrics metrics, String gauge,
              Predicate<Map.Entry<MetricName, ? extends Metric>> predicate) {
  metrics.registerGauge(gauge, () -> {
    Optional<? extends Map.Entry<MetricName, ? extends Metric>> first =
        producer.metrics().entrySet().stream().filter(predicate).findFirst();
    double value = first.isPresent() ? first.get().getValue().value() : 0.0;
    return value < 0? 0.0 : value;
  });
}
origin: allegro/hermes

this.intervalSeconds = intervalSeconds;
metrics.registerGauge(
    gaugeName(kafkaCluster, "selective.all-assignments"),
    () -> balancingMetrics.allAssignments
);
metrics.registerGauge(
    gaugeName(kafkaCluster, "selective.missing-resources"),
    () -> balancingMetrics.missingResources
);
metrics.registerGauge(
    gaugeName(kafkaCluster, ".selective.deleted-assignments"),
    () -> balancingMetrics.deletedAssignments
);
metrics.registerGauge(
    gaugeName(kafkaCluster, ".selective.created-assignments"),
    () -> balancingMetrics.createdAssignments
origin: pl.allegro.tech.hermes/hermes-consumers

this.intervalSeconds = intervalSeconds;
metrics.registerGauge(
    gaugeName(kafkaCluster, "selective.all-assignments"),
    () -> balancingMetrics.allAssignments
);
metrics.registerGauge(
    gaugeName(kafkaCluster, "selective.missing-resources"),
    () -> balancingMetrics.missingResources
);
metrics.registerGauge(
    gaugeName(kafkaCluster, ".selective.deleted-assignments"),
    () -> balancingMetrics.deletedAssignments
);
metrics.registerGauge(
    gaugeName(kafkaCluster, ".selective.created-assignments"),
    () -> balancingMetrics.createdAssignments
origin: allegro/hermes

public MonitoredMpscQueue(HermesMetrics metrics, String name, int capacity) {
  this.queue = new MpscArrayQueue<>(capacity);
  this.name = name;
  this.metrics = metrics;
  metrics.registerGauge("queue." + name + ".utilization", () -> queue.size() / queue.capacity());
}
origin: pl.allegro.tech.hermes/hermes-consumers

public MonitoredMpscQueue(HermesMetrics metrics, String name, int capacity) {
  this.queue = new MpscArrayQueue<>(capacity);
  this.name = name;
  this.metrics = metrics;
  metrics.registerGauge("queue." + name + ".utilization", () -> queue.size() / queue.capacity());
}
pl.allegro.tech.hermes.common.metricHermesMetricsregisterGauge

Popular methods of HermesMetrics

  • counter
  • meter
  • timer
  • consumerErrorsOtherMeter
  • escapeDots
  • latencyTimer
  • consumerErrorsTimeoutMeter
  • consumersWorkloadRebalanceDurationTimer
  • decrementInflightCounter
  • incrementInflightCounter
  • inflightTimeHistogram
  • maxRateFetchFailuresCounter
  • inflightTimeHistogram,
  • maxRateFetchFailuresCounter,
  • oAuthProviderLatencyTimer,
  • oAuthSubscriptionTokenRequestMeter,
  • rateHistoryFailuresCounter,
  • registerConsumerHttpAnswer,
  • registerConsumersThreadGauge,
  • registerDyingConsumerProcessesCountGauge,
  • registerMaxRateGauge

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Reference (javax.naming)
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now