Tabnine Logo
HermesMetrics.subscriptionLatencyTimer
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: allegro/hermes

private void deliver(Runnable signalsInterrupt, MessageBatch batch, Retryer<MessageSendingResult> retryer) {
  try (Timer.Context timer = hermesMetrics.subscriptionLatencyTimer(subscription).time()) {
    retryer.call(() -> {
      signalsInterrupt.run();
      return sender.send(
          batch,
          subscription.getEndpoint(),
          subscription.getEndpointAddressResolverMetadata(),
          subscription.getBatchSubscriptionPolicy().getRequestTimeout()
      );
    });
  } catch (Exception e) {
    logger.error("Batch was rejected [batch_id={}, subscription={}].", batch.getId(), subscription.getQualifiedName(), e);
    monitoring.markDiscarded(batch, subscription, e.getMessage());
  }
}
origin: pl.allegro.tech.hermes/hermes-consumers

private void deliver(Runnable signalsInterrupt, MessageBatch batch, Retryer<MessageSendingResult> retryer) {
  try (Timer.Context timer = hermesMetrics.subscriptionLatencyTimer(subscription).time()) {
    retryer.call(() -> {
      signalsInterrupt.run();
      return sender.send(
          batch,
          subscription.getEndpoint(),
          subscription.getEndpointAddressResolverMetadata(),
          subscription.getBatchSubscriptionPolicy().getRequestTimeout()
      );
    });
  } catch (Exception e) {
    logger.error("Batch was rejected [batch_id={}, subscription={}].", batch.getId(), subscription.getQualifiedName(), e);
    monitoring.markDiscarded(batch, subscription, e.getMessage());
  }
}
pl.allegro.tech.hermes.common.metricHermesMetricssubscriptionLatencyTimer

Popular methods of HermesMetrics

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

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • getApplicationContext (Context)
  • getSharedPreferences (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • Logger (org.slf4j)
    The org.slf4j.Logger interface is the main user entry point of SLF4J API. It is expected that loggin
  • Top Vim plugins
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