Package com.floragunn.searchsupport.diag
Class DiagnosticContext
- java.lang.Object
-
- com.floragunn.searchsupport.diag.DiagnosticContext
-
public final class DiagnosticContext extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDiagnosticContext.Handle
-
Field Summary
Fields Modifier and Type Field Description static org.elasticsearch.common.settings.Setting<Boolean>ACTION_STACK_ENABLEDstatic StringACTION_STACK_EXTENSION_TRANSIENTstatic StringACTION_STACK_HEADERstatic org.elasticsearch.common.settings.Setting<Boolean>ADD_EXTENDED_HEADERS_TO_LOG_CONTEXTstatic Collection<String>CLEAR_TRANSIENT_HEADERS_ON_APPLYstatic List<org.elasticsearch.common.settings.Setting<?>>SETTINGS
-
Constructor Summary
Constructors Constructor Description DiagnosticContext(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddHeadersToLogContext(org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.common.util.concurrent.ThreadContext threadContext)static voidfixupLoggingContext(org.elasticsearch.common.util.concurrent.ThreadContext threadContext)StringgetActionStack()static StringgetActionStack(org.elasticsearch.common.util.concurrent.ThreadContext threadContext)com.floragunn.searchsupport.diag.DiagnosticContext.ActionTraceFiltergetActionTraceFilter()DiagnosticContext.HandlepushActionStack(String action)voidtraceActionStack(String action)voidtraceActionStack(String currentActionStack, String action)
-
-
-
Field Detail
-
ACTION_STACK_ENABLED
public static final org.elasticsearch.common.settings.Setting<Boolean> ACTION_STACK_ENABLED
-
ADD_EXTENDED_HEADERS_TO_LOG_CONTEXT
public static final org.elasticsearch.common.settings.Setting<Boolean> ADD_EXTENDED_HEADERS_TO_LOG_CONTEXT
-
SETTINGS
public static final List<org.elasticsearch.common.settings.Setting<?>> SETTINGS
-
ACTION_STACK_HEADER
public static final String ACTION_STACK_HEADER
- See Also:
- Constant Field Values
-
ACTION_STACK_EXTENSION_TRANSIENT
public static final String ACTION_STACK_EXTENSION_TRANSIENT
- See Also:
- Constant Field Values
-
CLEAR_TRANSIENT_HEADERS_ON_APPLY
public static final Collection<String> CLEAR_TRANSIENT_HEADERS_ON_APPLY
-
-
Method Detail
-
traceActionStack
public void traceActionStack(String action)
-
pushActionStack
public DiagnosticContext.Handle pushActionStack(String action)
-
getActionStack
public String getActionStack()
-
addHeadersToLogContext
public void addHeadersToLogContext(org.elasticsearch.cluster.service.ClusterService clusterService, org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
-
getActionTraceFilter
public com.floragunn.searchsupport.diag.DiagnosticContext.ActionTraceFilter getActionTraceFilter()
-
fixupLoggingContext
public static void fixupLoggingContext(org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
-
getActionStack
public static String getActionStack(org.elasticsearch.common.util.concurrent.ThreadContext threadContext)
-
-