Class ConfigFilterHelper


  • @Internal
    public class ConfigFilterHelper
    extends java.lang.Object
    Parses gRPC GcpObservability configuration filters for interceptors usage.
    • Method Detail

      • getInstance

        public static ConfigFilterHelper getInstance​(ObservabilityConfig config)
        Creates and returns helper instance for log filtering.
        Parameters:
        config - processed ObservabilityConfig object
        Returns:
        helper instance for filtering
      • logRpcMethod

        public ConfigFilterHelper.FilterParams logRpcMethod​(java.lang.String fullMethodName,
                                                            boolean client)
        Checks if the corresponding service/method passed needs to be logged according to user provided observability configuration. Filters are evaluated in text order, first match is used.
        Parameters:
        fullMethodName - the fully qualified name of the method
        client - set to true if method being checked is a client method; false otherwise
        Returns:
        FilterParams object 1. specifies if the corresponding method needs to be logged (log field will be set to true) 2. values of payload limits retrieved from configuration