Package zipkin2
Class TestObjects
java.lang.Object
zipkin2.TestObjects
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Endpoint
static final Span
Only for unit tests, not integration tests.static final long
Notably, the cassandra implementation has day granularitystatic final Endpoint
static final Endpoint
static final Endpoint
static final Span[]
Zipkin trace ids are random 64bit numbers.static final long
Only for unit tests, not integration tests.static final Charset
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
appendSuffix
(String serviceName, String serviceNameSuffix) static long
static long
midnightUTC
(long epochMillis) For bucketed data floored to the day.static Span
newClientSpan
(String serviceNameSuffix) static String
static Span
span
(long traceId) static Span.Builder
spanBuilder
(String serviceNameSuffix) static long
static Endpoint
suffixServiceName
(Endpoint endpoint, String serviceNameSuffix)
-
Field Details
-
UTF_8
-
DAY
public static final long DAYNotably, the cassandra implementation has day granularity -
TODAY
public static final long TODAY -
FRONTEND
-
BACKEND
-
DB
-
KAFKA
-
CLIENT_SPAN
Only for unit tests, not integration tests. Integration tests should use random trace IDs. -
TRACE
Only for unit tests, not integration tests. Integration tests should use random trace IDs. -
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 Details
-
TestObjects
public TestObjects()
-
-
Method Details
-
midnightUTC
public static long midnightUTC(long epochMillis) For bucketed data floored to the day. For example, dependency links. -
startTs
-
endTs
-
span
-
newClientSpan
-
spanBuilder
-
appendSuffix
-
suffixServiceName
-
newTrace
-
newTraceId
-