kamon.Kamon.histogram()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.6k)|赞(0)|评价(0)|浏览(129)

本文整理了Java中kamon.Kamon.histogram()方法的一些代码示例,展示了Kamon.histogram()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Kamon.histogram()方法的具体详情如下:
包路径:kamon.Kamon
类名称:Kamon
方法名:histogram

Kamon.histogram介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.ditto/ditto-services-utils-metrics

private kamon.metric.Histogram getKamonInternalHistogram() {
  return Kamon.histogram(name).refine(tags);
}

代码示例来源:origin: eclipse/ditto

private kamon.metric.Histogram getKamonInternalHistogram() {
  return Kamon.histogram(name).refine(tags);
}

代码示例来源:origin: eclipse/ditto

private void persistThingEvents(final List<ThingEvent> thingEvents, final long targetRevision) {
  log.debug("Executing bulk write operation with <{}> updates.", thingEvents.size());
  if (!thingEvents.isEmpty()) {
    transactionActive = true;
    Kamon.histogram(COUNT_THING_BULK_UPDATES_PER_BULK).record(thingEvents.size());
    final StartedTimer bulkUpdate =
        DittoMetrics.expiringTimer(TRACE_THING_BULK_UPDATE).tag(UPDATE_TYPE_TAG, "bulkUpdate").build();
    circuitBreaker.callWithCircuitBreakerCS(() -> searchUpdaterPersistence
        .executeCombinedWrites(thingId, thingEvents, policyEnforcer, targetRevision)
        .via(stopTimer(bulkUpdate))
        .runWith(Sink.last(), materializer)
        .whenComplete(this::processWriteResult))
        .exceptionally(t -> {
          log.error(t, "There occurred an error while processing a write operation within the"
              + " circuit breaker for thing <{}>.", thingId);
          //e.g. in case of a circuit breaker timeout, the running transaction must be stopped
          processWriteResult(false, t);
          return null;
        });
  }
}

代码示例来源:origin: org.eclipse.ditto/ditto-services-thingsearch-updater-actors

private void persistThingEvents(final List<ThingEvent> thingEvents, final long targetRevision) {
  log.debug("Executing bulk write operation with <{}> updates.", thingEvents.size());
  if (!thingEvents.isEmpty()) {
    transactionActive = true;
    Kamon.histogram(COUNT_THING_BULK_UPDATES_PER_BULK).record(thingEvents.size());
    final StartedTimer bulkUpdate =
        DittoMetrics.expiringTimer(TRACE_THING_BULK_UPDATE).tag(UPDATE_TYPE_TAG, "bulkUpdate").build();
    circuitBreaker.callWithCircuitBreakerCS(() -> searchUpdaterPersistence
        .executeCombinedWrites(thingId, thingEvents, policyEnforcer, targetRevision)
        .via(stopTimer(bulkUpdate))
        .runWith(Sink.last(), materializer)
        .whenComplete(this::processWriteResult))
        .exceptionally(t -> {
          log.error(t, "There occurred an error while processing a write operation within the"
              + " circuit breaker for thing <{}>.", thingId);
          //e.g. in case of a circuit breaker timeout, the running transaction must be stopped
          processWriteResult(false, t);
          return null;
        });
  }
}

相关文章

Kamon类方法