Class TracerImpl

  • All Implemented Interfaces:
    Tracer

    public class TracerImpl
    extends Object
    implements Tracer
    • Constructor Detail

      • TracerImpl

        public TracerImpl()
    • 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)
      • setWarnThresholds

        public void setWarnThresholds​(Map<String,​Duration> warnThresholds)
      • setHandler

        public void setHandler​(TraceHandler handler)
      • openContext

        public TraceContext openContext​(String fullContextName,
                                        String contextLabel,
                                        Object... labelFormatArgs)
        Description copied from interface: Tracer
        Opens 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:
        openContext in interface Tracer
        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 warnings
        contextLabel - a label for the context; in contrast to fullContextName this 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 sequence
        labelFormatArgs - the format arguments for the context label
        Returns:
        the started trace context
      • checkWarnThreshold

        public void checkWarnThreshold​(TraceContextImpl context)