Package zipkin2

Class TestObjects


  • public final class TestObjects
    extends Object
    • Field Detail

      • UTF_8

        public static final Charset UTF_8
      • DAY

        public static final long DAY
        Notably, the cassandra implementation has day granularity
      • TODAY

        public static final long TODAY
      • FRONTEND

        public static final Endpoint FRONTEND
      • BACKEND

        public static final Endpoint BACKEND
      • KAFKA

        public static final Endpoint KAFKA
      • CLIENT_SPAN

        public static final Span CLIENT_SPAN
        Only for unit tests, not integration tests. Integration tests should use random trace IDs.
      • TRACE

        public static final List<Span> TRACE
        Only for unit tests, not integration tests. Integration tests should use random trace IDs.
      • LOTS_OF_SPANS

        public static final Span[] LOTS_OF_SPANS
        Zipkin trace ids are random 64bit numbers. This creates a relatively large input to avoid flaking out due to PRNG nuance.
    • Constructor Detail

      • TestObjects

        public TestObjects()
    • Method Detail

      • midnightUTC

        public static long midnightUTC​(long epochMillis)
        For bucketed data floored to the day. For example, dependency links.
      • startTs

        public static long startTs​(List<Span> trace)
      • endTs

        public static long endTs​(List<Span> trace)
      • span

        public static Span span​(long traceId)
      • newClientSpan

        public static Span newClientSpan​(String serviceNameSuffix)
      • appendSuffix

        public static String appendSuffix​(String serviceName,
                                          String serviceNameSuffix)
      • suffixServiceName

        public static Endpoint suffixServiceName​(Endpoint endpoint,
                                                 String serviceNameSuffix)
      • newTrace

        public static List<Span> newTrace​(String serviceNameSuffix)
      • newTraceId

        public static String newTraceId()