Class ConfigFilterHelper
- java.lang.Object
-
- io.grpc.gcp.observability.interceptors.ConfigFilterHelper
-
@Internal public class ConfigFilterHelper extends java.lang.ObjectParses gRPC GcpObservability configuration filters for interceptors usage.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classConfigFilterHelper.FilterParamsClass containing results for method/service filter information, such as flag for logging method/service and payload limits to be used for filtering.
-
Field Summary
Fields Modifier and Type Field Description static ConfigFilterHelper.FilterParamsNO_FILTER_PARAMS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConfigFilterHelpergetInstance(ObservabilityConfig config)Creates and returns helper instance for log filtering.ConfigFilterHelper.FilterParamslogRpcMethod(java.lang.String fullMethodName, boolean client)Checks if the corresponding service/method passed needs to be logged according to user provided observability configuration.
-
-
-
Field Detail
-
NO_FILTER_PARAMS
public static final ConfigFilterHelper.FilterParams NO_FILTER_PARAMS
-
-
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 methodclient- 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
-
-