本文整理了Java中io.micrometer.core.instrument.Counter.builder()
方法的一些代码示例,展示了Counter.builder()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Counter.builder()
方法的具体详情如下:
包路径:io.micrometer.core.instrument.Counter
类名称:Counter
方法名:builder
暂无
代码示例来源:origin: spring-projects/spring-integration
protected MicroCounterBuilder(MeterRegistry meterRegistry, String name) {
this.meterRegistry = meterRegistry;
this.builder = Counter.builder(name);
}
代码示例来源:origin: reactor/reactor-core
.builder(FluxMetrics.METER_SUBSCRIBED)
.tags(commonTags)
.baseUnit("subscribers")
代码示例来源:origin: reactor/reactor-core
.builder(METER_SUBSCRIBED)
.tags(commonTags)
.baseUnit("subscribers")
代码示例来源:origin: com.zaxxer/HikariCP
.register(meterRegistry);
this.connectionTimeoutCounter = Counter.builder(METRIC_NAME_TIMEOUT_RATE)
.description("Connection timeout total count")
.tags(METRIC_CATEGORY, poolName)
代码示例来源:origin: yidongnan/grpc-spring-boot-starter
/**
* Creates a new counter builder for the given method. By default the base unit will be messages.
*
* @param method The method the counter will be created for.
* @param name The name of the counter to use.
* @param description The description of the counter to use.
* @return The newly created counter builder.
*/
public static Counter.Builder prepareCounterFor(final MethodDescriptor<?, ?> method,
final String name, final String description) {
return Counter.builder(name)
.description(description)
.baseUnit("messages")
.tag(TAG_SERVICE_NAME, extractServiceName(method))
.tag(TAG_METHOD_NAME, extractMethodName(method));
}
代码示例来源:origin: org.springframework.integration/spring-integration-core
protected MicroCounterBuilder(MeterRegistry meterRegistry, String name) {
this.meterRegistry = meterRegistry;
this.builder = Counter.builder(name);
}
代码示例来源:origin: org.springframework.statemachine/spring-statemachine-autoconfigure
private Counter.Builder getActionCounterBuilder(Action<S, E> action) {
String actionName = actionToName(action);
Counter.Builder builder = Counter.builder("ssm.action.execute")
.tags("actionName", actionName)
.description("Counter of Action");
return builder;
}
代码示例来源:origin: org.springframework.statemachine/spring-statemachine-autoconfigure
private Counter.Builder getTransitionCounterBuilder(Transition<S, E> transition) {
String transitionName = transitionToName(transition);
Counter.Builder builder = Counter.builder("ssm.transition.transit")
.tags("transitionName", transitionName)
.description("Counter of Transition");
return builder;
}
代码示例来源:origin: org.ballerinalang/ballerina-micrometer-extension
public MicrometerCounter(MeterRegistry meterRegistry, MetricId id) {
super(id);
counter = io.micrometer.core.instrument.Counter.builder(id.getName())
.description(id.getDescription())
.tags(id.getTags().stream().map(tag -> Tag.of(tag.getKey(), tag.getValue()))
.collect(Collectors.toList())).register(meterRegistry);
}
代码示例来源:origin: io.vertx/vertx-micrometer-metrics
public Counter get(String... values) {
// Get or create the Counter
return Counter.builder(name)
.description(description)
.tags(Labels.toTags(keys, values))
.register(registry);
}
}
代码示例来源:origin: org.eclipse.che.core/che-core-metrics-core
@Override
public void bindTo(MeterRegistry registry) {
informationalResponseCounter =
Counter.builder("che.server.api.response")
.description("Che Server Tomcat informational responses (1xx responses)")
.tag("code", "1xx")
.register(registry);
successResponseCounter =
Counter.builder("che.server.api.response")
.description("Che Server Tomcat success responses (2xx responses)")
.tag("code", "2xx")
.register(registry);
redirectResponseCounter =
Counter.builder("che.server.api.response")
.description("Che Server Tomcat redirect responses (3xx responses)")
.tag("code", "3xx")
.register(registry);
clientErrorResponseCounter =
Counter.builder("che.server.api.response")
.description("Che Server Tomcat client errors (4xx responses)")
.tag("code", "4xx")
.register(registry);
serverErrorResponseCounter =
Counter.builder("che.server.api.response")
.description("Che Server Tomcat server errors (5xx responses)")
.tag("code", "5xx")
代码示例来源:origin: net.devh/grpc-common-spring-boot
/**
* Creates a new counter builder for the given method. By default the base unit will be messages.
*
* @param method The method the counter will be created for.
* @param name The name of the counter to use.
* @param description The description of the counter to use.
* @return The newly created counter builder.
*/
public static Counter.Builder prepareCounterFor(final MethodDescriptor<?, ?> method,
final String name, final String description) {
return Counter.builder(name)
.description(description)
.baseUnit("messages")
.tag(TAG_SERVICE_NAME, extractServiceName(method))
.tag(TAG_METHOD_NAME, extractMethodName(method));
}
代码示例来源:origin: io.zipkin.java/zipkin-server
Counter.builder("zipkin_collector.messages")
.description("cumulative amount of messages received")
.tag("transport", transport)
.register(registryInstance);
this.messagesDropped =
Counter.builder("zipkin_collector.messages_dropped")
.description("cumulative amount of messages received that were later dropped")
.tag("transport", transport)
Counter.builder("zipkin_collector.bytes")
.description("cumulative amount of bytes received")
.tag("transport", transport)
.register(registryInstance);
this.spans =
Counter.builder("zipkin_collector.spans")
.description("cumulative amount of spans received")
.tag("transport", transport)
.register(registryInstance);
this.spansDropped =
Counter.builder("zipkin_collector.spans_dropped")
.description("cumulative amount of spans received that were later dropped")
.tag("transport", transport)
代码示例来源:origin: io.rsocket.rpc/rsocket-rpc-core
MeterRegistry registry, String name, Iterable<Tag> tags) {
Counter next =
Counter.builder(name + ".request").tags("status", "next").tags(tags).register(registry);
Counter complete =
Counter.builder(name + ".request").tags("status", "complete").tags(tags).register(registry);
Counter error =
Counter.builder(name + ".request").tags("status", "error").tags(tags).register(registry);
Counter cancelled =
Counter.builder(name + ".request")
.tags("status", "cancelled")
.tags(tags)
代码示例来源:origin: io.projectreactor/reactor-core
.builder(FluxMetrics.METER_SUBSCRIBED)
.tags(commonTags)
.baseUnit("subscribers")
代码示例来源:origin: io.projectreactor/reactor-core
.builder(METER_SUBSCRIBED)
.tags(commonTags)
.baseUnit("subscribers")
内容来源于网络,如有侵权,请联系作者删除!