Class MetricsTracer

java.lang.Object
com.google.api.gax.tracing.MetricsTracer
All Implemented Interfaces:
ApiTracer

@BetaApi @InternalApi public class MetricsTracer extends Object implements ApiTracer
This class computes generic metrics that can be observed in the lifecycle of an RPC operation. The responsibility of recording metrics should delegate to MetricsRecorder, hence this class should not have any knowledge about the observability framework used for metrics recording.
  • Constructor Details

  • Method Details

    • addAttributes

      public void addAttributes(String key, String value)
      Add attributes that will be attached to all metrics. This is expected to be called by handwritten client teams to add additional attributes that are not supposed be collected by Gax.