Class RequestAwareGRpcMetricsTagsContributor<ReqT>

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean accepts​(java.lang.Object o)  
      java.lang.Iterable<io.micrometer.core.instrument.Tag> addTags​(ReqT request, io.grpc.MethodDescriptor<?,​?> methodDescriptor, io.grpc.Attributes attributes, io.micrometer.core.instrument.Tags existingTags)
      Contribute tags when receiving the request message.
      java.lang.Iterable<io.micrometer.core.instrument.Tag> getTags​(io.grpc.Status status, io.grpc.MethodDescriptor<?,​?> methodDescriptor, io.grpc.Attributes attributes)
      Contribute tags at the end of the call, independent of the request message.
      java.lang.Iterable<io.micrometer.core.instrument.Tag> getTags​(ReqT request, io.grpc.MethodDescriptor<?,​?> methodDescriptor, io.grpc.Attributes attributes)
      Deprecated.
      boolean mightAccept​(io.grpc.MethodDescriptor<?,​?> methodDescriptor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestAwareGRpcMetricsTagsContributor

        protected RequestAwareGRpcMetricsTagsContributor​(java.lang.Class<ReqT> tClass,
                                                         java.util.Set<io.grpc.MethodDescriptor.MethodType> methodTypes)
      • RequestAwareGRpcMetricsTagsContributor

        protected RequestAwareGRpcMetricsTagsContributor​(java.lang.Class<ReqT> tClass,
                                                         io.grpc.MethodDescriptor.MethodType firstMethodType,
                                                         io.grpc.MethodDescriptor.MethodType... otherMethodTypes)
      • RequestAwareGRpcMetricsTagsContributor

        protected RequestAwareGRpcMetricsTagsContributor​(java.lang.Class<ReqT> tClass)
    • Method Detail

      • mightAccept

        public final boolean mightAccept​(io.grpc.MethodDescriptor<?,​?> methodDescriptor)
      • accepts

        public final boolean accepts​(java.lang.Object o)
      • getTags

        public java.lang.Iterable<io.micrometer.core.instrument.Tag> getTags​(io.grpc.Status status,
                                                                             io.grpc.MethodDescriptor<?,​?> methodDescriptor,
                                                                             io.grpc.Attributes attributes)
        Contribute tags at the end of the call, independent of the request message.
        Specified by:
        getTags in interface GRpcMetricsTagsContributor
      • addTags

        public java.lang.Iterable<io.micrometer.core.instrument.Tag> addTags​(ReqT request,
                                                                             io.grpc.MethodDescriptor<?,​?> methodDescriptor,
                                                                             io.grpc.Attributes attributes,
                                                                             io.micrometer.core.instrument.Tags existingTags)
        Contribute tags when receiving the request message. For streaming calls, this method is invoked several times (once per message). The implementation should NOT concatenate existing tags with newly produced tags. It's supposed to produce new tags or accumulate existing tag's value.
        Parameters:
        request - current request message
        methodDescriptor -
        attributes -
        existingTags - currently accumulated tags
        Returns:
        new tags
      • getTags

        @Deprecated
        public java.lang.Iterable<io.micrometer.core.instrument.Tag> getTags​(ReqT request,
                                                                             io.grpc.MethodDescriptor<?,​?> methodDescriptor,
                                                                             io.grpc.Attributes attributes)
        Deprecated.
        Prefer overriding addTags(Object, MethodDescriptor, Attributes, Tags) if you want to get a hold of already added tags(for streaming calls) and accumulate tag's value.