本文整理了Java中kamon.Kamon.histogram()
方法的一些代码示例,展示了Kamon.histogram()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Kamon.histogram()
方法的具体详情如下:
包路径:kamon.Kamon
类名称: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;
});
}
}
内容来源于网络,如有侵权,请联系作者删除!