- java.lang.Object
-
- de.codecamp.tracer.impl.TracerImpl
-
-
Constructor Summary
Constructors Constructor Description TracerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckWarnThreshold(TraceContextImpl context)DurationgetGapsThreshold()TraceHandlergetHandler()List<TraceContextListener>getListeners()booleanisGapsIncluded()TraceContextopenContext(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, wait
-
Methods inherited from interface de.codecamp.tracer.Tracer
openContext
-
-
-
-
Method Detail
-
isGapsIncluded
public boolean isGapsIncluded()
-
setGapsIncluded
public void setGapsIncluded(boolean gapsIncluded)
-
getGapsThreshold
public Duration getGapsThreshold()
-
setGapsThreshold
public void setGapsThreshold(Duration gapsThreshold)
-
setIncludes
public void setIncludes(String[] includes)
-
setExcludes
public void setExcludes(String[] excludes)
-
getHandler
public TraceHandler getHandler()
-
setHandler
public void setHandler(TraceHandler handler)
-
getListeners
public List<TraceContextListener> getListeners()
-
setListeners
public void setListeners(List<TraceContextListener> listeners)
-
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
public void checkWarnThreshold(TraceContextImpl context)
-
-