All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.rocketmq.shaded.io.opentelemetry.api.metrics.LongCounter Maven / Gradle / Ivy

There is a newer version: 5.0.7
Show newest version
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package org.apache.rocketmq.shaded.io.opentelemetry.api.metrics;

import org.apache.rocketmq.shaded.io.opentelemetry.api.common.Attributes;
import org.apache.rocketmq.shaded.io.opentelemetry.context.Context;
import javax.annotation.concurrent.ThreadSafe;

/**
 * A counter instrument that records {@code long} values.
 *
 * 

Counters only allow adding positive values, and guarantee the resulting metrics will be * always-increasing monotonic sums. */ @ThreadSafe public interface LongCounter { /** * Records a value. * *

Note: This may use {@code Context.current()} to pull the context associated with this * measurement. * * @param value The increment amount. MUST be non-negative. */ void add(long value); /** * Records a value with a set of attributes. * *

Note: This may use {@code Context.current()} to pull the context associated with this * measurement. * * @param value The increment amount. MUST be non-negative. * @param attributes A set of attributes to associate with the count. */ void add(long value, Attributes attributes); /** * Records a value with a set of attributes. * * @param value The increment amount. MUST be non-negative. * @param attributes A set of attributes to associate with the count. * @param context The explicit context to associate with this measurement. */ void add(long value, Attributes attributes, Context context); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy