Interface BoundLongCounter


  • @ThreadSafe
    public interface BoundLongCounter
    A counter instrument that records long values with pre-associated attributes.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void add​(long value)
      Records a value with pre-bound attributes.
      void add​(long value, io.opentelemetry.context.Context context)
      Records a value with pre-bound attributes.
      void unbind()
      Unbinds the current bound instance from the LongCounter.
    • Method Detail

      • add

        void add​(long value)
        Records a value with pre-bound attributes.

        Note: This may use Context.current() to pull the context associated with this measurement.

        Parameters:
        value - The increment amount. MUST be non-negative.
      • add

        void add​(long value,
                 io.opentelemetry.context.Context context)
        Records a value with pre-bound attributes.
        Parameters:
        value - The increment amount. MUST be non-negative.
        context - The explicit context to associate with this measurement.
      • unbind

        void unbind()
        Unbinds the current bound instance from the LongCounter.

        After this method returns the current instance is considered invalid (not being managed by the instrument).