Package zipkin2
Class TestObjects
java.lang.Object
zipkin2.TestObjects
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Endpointstatic final SpanOnly for unit tests, not integration tests.static final longNotably, the cassandra implementation has day granularitystatic final Endpointstatic final Endpointstatic final Endpointstatic final Span[]Zipkin trace ids are random 64bit numbers.static final longOnly for unit tests, not integration tests.static final Charset -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringappendSuffix(String serviceName, String serviceNameSuffix) static longstatic longmidnightUTC(long epochMillis) For bucketed data floored to the day.static SpannewClientSpan(String serviceNameSuffix) static Stringstatic Spanspan(long traceId) static Span.BuilderspanBuilder(String serviceNameSuffix) static longstatic EndpointsuffixServiceName(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
-