protected MicroCounterBuilder(MeterRegistry meterRegistry, String name) { this.meterRegistry = meterRegistry; this.builder = Counter.builder(name); }
.builder(FluxMetrics.METER_SUBSCRIBED) .tags(commonTags) .baseUnit("subscribers")
.builder(METER_SUBSCRIBED) .tags(commonTags) .baseUnit("subscribers")
.register(meterRegistry); this.connectionTimeoutCounter = Counter.builder(METRIC_NAME_TIMEOUT_RATE) .description("Connection timeout total count") .tags(METRIC_CATEGORY, poolName)
/** * 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)); }
protected MicroCounterBuilder(MeterRegistry meterRegistry, String name) { this.meterRegistry = meterRegistry; this.builder = Counter.builder(name); }
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; }
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; }
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); }
public Counter get(String... values) { // Get or create the Counter return Counter.builder(name) .description(description) .tags(Labels.toTags(keys, values)) .register(registry); } }
@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")
/** * 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)); }
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)
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)
.builder(FluxMetrics.METER_SUBSCRIBED) .tags(commonTags) .baseUnit("subscribers")
.builder(METER_SUBSCRIBED) .tags(commonTags) .baseUnit("subscribers")