Class TraceUtil


  • public class TraceUtil
    extends Object
    • Field Detail

      • LOG

        public static final org.slf4j.Logger LOG
    • Constructor Detail

      • TraceUtil

        public TraceUtil()
    • Method Detail

      • startSpan

        public static io.opentelemetry.api.trace.Span startSpan​(Class<?> caller,
                                                                String spanName)
      • startSpan

        public static io.opentelemetry.api.trace.Span startSpan​(Class<?> caller,
                                                                String spanName,
                                                                Map<String,​String> attributes)
      • startClientRpcSpan

        public static io.opentelemetry.api.trace.Span startClientRpcSpan​(Class<?> caller,
                                                                         String spanName)
      • startFateSpan

        public static io.opentelemetry.api.trace.Span startFateSpan​(Class<?> caller,
                                                                    String spanName,
                                                                    TInfo tinfo)
      • startServerRpcSpan

        public static io.opentelemetry.api.trace.Span startServerRpcSpan​(Class<?> caller,
                                                                         String spanName,
                                                                         TInfo tinfo)
      • setException

        public static void setException​(io.opentelemetry.api.trace.Span span,
                                        Throwable e,
                                        boolean rethrown)
        Record that an Exception occurred in the code covered by a Span
        Parameters:
        span - the span
        e - the exception
        rethrown - whether the exception is subsequently re-thrown
      • traceInfo

        public static TInfo traceInfo()
        Obtain TInfo for the current context. This is used to send the current trace information to a remote process
      • wrapService

        public static <T> T wrapService​(T instance)