Class GrpcMetrics

    • Method Detail

      • tags

        public GrpcMetrics tags​(Map<String,​String> tags)
        Set the tags to apply to the metric.
        Parameters:
        tags - the tags to apply to the metric
        Returns:
        a GrpcMetrics interceptor
        See Also:
        Metadata
      • description

        public GrpcMetrics description​(String description)
        Set the description to apply to the metric.
        Parameters:
        description - the description to apply to the metric
        Returns:
        a GrpcMetrics interceptor
        See Also:
        Metadata
      • displayName

        public GrpcMetrics displayName​(String displayName)
        Set the display name to apply to the metric.
        Parameters:
        displayName - the display name to apply to the metric
        Returns:
        a GrpcMetrics interceptor
        See Also:
        Metadata
      • units

        public GrpcMetrics units​(String units)
        Set the units to apply to the metric.
        Parameters:
        units - the units to apply to the metric
        Returns:
        a GrpcMetrics interceptor
        See Also:
        Metadata
      • reusable

        public GrpcMetrics reusable​(boolean reusable)
        Set the reusability of the metric.
        Parameters:
        reusable - true if this metric may be reused
        Returns:
        a GrpcMetrics interceptor
        See Also:
        Metadata
      • metricType

        public org.eclipse.microprofile.metrics.MetricType metricType()
        Obtain the MetricType.
        Returns:
        the MetricType
      • counted

        public static GrpcMetrics counted()
        A static factory method to create a GrpcMetrics instance to count gRPC method calls.
        Returns:
        a GrpcMetrics instance to capture call counts
      • metered

        public static GrpcMetrics metered()
        A static factory method to create a GrpcMetrics instance to meter gRPC method calls.
        Returns:
        a GrpcMetrics instance to meter gRPC calls
      • histogram

        public static GrpcMetrics histogram()
        A static factory method to create a GrpcMetrics instance to create a histogram of gRPC method calls.
        Returns:
        a GrpcMetrics instance to create a histogram of gRPC method calls
      • timed

        public static GrpcMetrics timed()
        A static factory method to create a GrpcMetrics instance to time gRPC method calls.
        Returns:
        a GrpcMetrics instance to time gRPC method calls
      • interceptCall

        public <ReqT,​RespT> io.grpc.ServerCall.Listener<ReqT> interceptCall​(io.grpc.ServerCall<ReqT,​RespT> call,
                                                                                  io.grpc.Metadata headers,
                                                                                  io.grpc.ServerCallHandler<ReqT,​RespT> next)
        Specified by:
        interceptCall in interface io.grpc.ServerInterceptor
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object