Class OtelUtil


  • public final class OtelUtil
    extends Object
    • Method Detail

      • startSpan

        public static io.opentelemetry.api.trace.Span startSpan​(String tracerName,
                                                                String spanName)
        Creates a new span with the given tracer and span names, note will return an 'invalid' span if OpenTelementry is turned off.
        Parameters:
        tracerName - Name of the Tracer to use
        spanName - Name of the Span to use.
        Returns:
        new Span
      • getOpenTelemetryActive

        public static boolean getOpenTelemetryActive()
        Get if OpenTelemetry is in use.
        Returns:
        Is active
      • setOpenTelemetryActive

        public static void setOpenTelemetryActive​(boolean active)
        Set if OpenTelemetry is in use.
        Parameters:
        active - Is active