java.lang.Object
de.codecamp.tracer.impl.TracerImpl
- All Implemented Interfaces:
Tracer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheckWarnThreshold(TraceContextImpl context) booleanopenContext(String fullContextName, String contextLabel, Object... labelFormatArgs) Opens a new trace context.voidsetExcludes(String[] excludes) voidsetGapsIncluded(boolean gapsIncluded) voidsetGapsThreshold(Duration gapsThreshold) voidsetHandler(TraceHandler handler) voidsetIncludes(String[] includes) voidsetListeners(List<TraceContextListener> listeners) voidsetWarnThresholds(Map<String, Duration> warnThresholds) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.codecamp.tracer.Tracer
openContext, openContext
-
Constructor Details
-
TracerImpl
public TracerImpl()
-
-
Method Details
-
isGapsIncluded
public boolean isGapsIncluded() -
setGapsIncluded
public void setGapsIncluded(boolean gapsIncluded) -
getGapsThreshold
-
setGapsThreshold
-
setIncludes
-
setExcludes
-
setWarnThresholds
-
getHandler
-
setHandler
-
getListeners
-
setListeners
-
openContext
public TraceContext openContext(String fullContextName, String contextLabel, Object... labelFormatArgs) Description copied from interface:TracerOpens a new trace context. Each context will implicitly have an associated root trace. All traces started through that context will be sub-traces (i.e. children) of that root trace. If the context is started within another active context (i.e. also bound to the current thread), the new context's root trace will be a sub-trace of the currently active trace.- Specified by:
openContextin interfaceTracer- Parameters:
fullContextName- the full context name, typically the fully qualified name of the traced class suffixed with '#' and the method name, if applicable; this name is used for selection, e.g. in includes, excludes and warningscontextLabel- a label for the context; in contrast tofullContextNamethis is supposed to be a shorter label better suited for logging; may contain{}as placeholders that will be replaced with the given format arguments in sequencelabelFormatArgs- the format arguments for the context label- Returns:
- the started trace context
-
checkWarnThreshold
-