Package com.google.cloud.logging
Class ContextHandler
java.lang.Object
com.google.cloud.logging.ContextHandler
Class provides a per-thread storage of the instances.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidvoidsetCurrentContext(Context context) voidsetCurrentContext(Context context, ContextHandler.ContextPriority priority) Sets the context based on the priority.
-
Constructor Details
-
ContextHandler
public ContextHandler()
-
-
Method Details
-
getCurrentContext
-
setCurrentContext
-
getCurrentContextPriority
-
setCurrentContext
Sets the context based on the priority. Overrides traceId, spanId and TraceSampled if the passed priority is higher. HttpRequest values will be retrieved and combined from existing context if HttpRequest in the new context is empty . -
removeCurrentContext
public void removeCurrentContext() -
removeCurrentContextPriority
public void removeCurrentContextPriority()
-