Package org.aoju.bus.tracer.config
Class PropertiesBasedTraceFilter
java.lang.Object
org.aoju.bus.tracer.config.PropertiesBasedTraceFilter
- All Implemented Interfaces:
TraceFilterConfig
A TraceFilterConfiguration that is based on a
PropertyChain.
The default property chain may be obtained by the loadPropertyChain() method.- Since:
- Java 17+
- Author:
- Kimi Liu
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.aoju.bus.tracer.config.TraceFilterConfig
TraceFilterConfig.Channel -
Constructor Summary
ConstructorsConstructorDescriptionPropertiesBasedTraceFilter(PropertyChain propertyChain) PropertiesBasedTraceFilter(PropertyChain propertyChain, String profileName) -
Method Summary
Modifier and TypeMethodDescriptionfilterDeniedParams(Map<String, String> unfiltered, TraceFilterConfig.Channel channel) intintstatic PropertyChainLoads a layered property chain based on: System properties merged entries from all/META-INF/Builder.propertiesfiles on the classpath (loaded in undefined order) merged entries from all/META-INF/Builder.default.propertiesfiles on the classpath (loaded in undefined order)booleanbooleanbooleanbooleanshouldProcessParam(String paramName, TraceFilterConfig.Channel channel)
-
Constructor Details
-
PropertiesBasedTraceFilter
-
PropertiesBasedTraceFilter
-
-
Method Details
-
loadPropertyChain
Loads a layered property chain based on:- System properties
- merged entries from all
/META-INF/Builder.propertiesfiles on the classpath (loaded in undefined order) - merged entries from all
/META-INF/Builder.default.propertiesfiles on the classpath (loaded in undefined order)
- Returns:
- the propertyChain
-
shouldProcessParam
- Specified by:
shouldProcessParamin interfaceTraceFilterConfig
-
shouldProcessContext
- Specified by:
shouldProcessContextin interfaceTraceFilterConfig
-
shouldGenerateInvocationId
public boolean shouldGenerateInvocationId()- Specified by:
shouldGenerateInvocationIdin interfaceTraceFilterConfig
-
generatedInvocationIdLength
public int generatedInvocationIdLength()- Specified by:
generatedInvocationIdLengthin interfaceTraceFilterConfig
-
shouldGenerateSessionId
public boolean shouldGenerateSessionId()- Specified by:
shouldGenerateSessionIdin interfaceTraceFilterConfig
-
generatedSessionIdLength
public int generatedSessionIdLength()- Specified by:
generatedSessionIdLengthin interfaceTraceFilterConfig
-
filterDeniedParams
public Map<String,String> filterDeniedParams(Map<String, String> unfiltered, TraceFilterConfig.Channel channel) - Specified by:
filterDeniedParamsin interfaceTraceFilterConfig
-