Package zipkin2.storage
Class ITSpanStore<T extends StorageComponent>
java.lang.Object
zipkin2.storage.ITStorage<T>
zipkin2.storage.ITSpanStore<T>
public abstract class ITSpanStore<T extends StorageComponent> extends ITStorage<T>
Base test for
SpanStore
.
Subtypes should create a connection to a real backend, even if that backend is in-process.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description ITSpanStore()
-
Method Summary
Modifier and Type Method Description protected void
allShouldWorkWhenEmpty()
This would only happen when the store layer is bootstrapping, or has been purged.protected void
allShouldWorkWhenNoIndexableDataYet()
This is unlikely and means instrumentation sends empty spans by mistake.protected void
configureStorageForTest(StorageComponent.Builder storage)
Configures aStorageComponent.Builder
with parameters for the test being executed.protected void
consumer_properlyImplementsCallContract_execute()
protected void
consumer_properlyImplementsCallContract_submit()
protected void
getTraces_absentWhenNoTimestamp()
Spans and traces are meaningless unless they have a timestamp.protected void
getTraces_annotation()
protected void
getTraces_considersBitsAbove64bit()
protected void
getTraces_differentiateOnServiceName()
This test makes sure that annotation queries pay attention to which host recorded dataprotected void
getTraces_duration()
Shows that duration queries go against the root span, not the childprotected void
getTraces_endTsAndLookback()
Traces whose root span has timestamps between (endTs - lookback) and endTs are returnedprotected void
getTraces_endTsInsideTheTrace()
Ensure complete traces are aggregated, even if they complete after endTsprotected void
getTraces_filteringMatchesMostRecentTraces()
protected void
getTraces_groupsTracesTogether()
protected void
getTraces_lateDuration()
protected void
getTraces_limit()
limit should apply to traces closest to endTsprotected void
getTraces_manyTraces()
Formerly, a bug was present where cassandra didn't index more than bucket count traces per millisecond.protected void
getTraces_maxDuration()
protected void
getTraces_minDuration()
protected void
getTraces_multipleAnnotationsBecomeAndFilter()
protected void
getTraces_serviceNames()
protected void
getTraces_serviceNames_mixedTraceIdLength()
protected void
getTraces_spanName()
protected void
getTraces_spanName_mixedTraceIdLength()
protected void
getTraces_tags()
protected void
names_goLowercase()
protected void
readback_minimalErrorSpan()
The following skeletal span is used in dependency linking.protected void
readsBackLargeValues()
While large spans are discouraged, and maybe not indexed, we should be able to read them back.protected static QueryRequest.Builder
requestBuilder()
protected void
spanWithProblematicData()
This tests problematic data that can sometimes break storage: json in span name tag with nested dots (can be confused as nested objects)protected void
traceWithManySpans()
Methods inherited from class zipkin2.storage.ITStorage
accept, accept, blockWhileInFlight, clear, initializeStoragePerTest, names, newStorageBuilder, store, traces
-
Constructor Details
-
ITSpanStore
public ITSpanStore()
-
-
Method Details
-
configureStorageForTest
Description copied from class:ITStorage
Configures aStorageComponent.Builder
with parameters for the test being executed.- Specified by:
configureStorageForTest
in classITStorage<T extends StorageComponent>
-
allShouldWorkWhenEmpty
This would only happen when the store layer is bootstrapping, or has been purged.- Throws:
IOException
-
allShouldWorkWhenNoIndexableDataYet
This is unlikely and means instrumentation sends empty spans by mistake.- Throws:
IOException
-
consumer_properlyImplementsCallContract_execute
- Throws:
IOException
-
consumer_properlyImplementsCallContract_submit
- Throws:
Exception
-
getTraces_groupsTracesTogether
- Throws:
IOException
-
getTraces_considersBitsAbove64bit
- Throws:
IOException
-
getTraces_filteringMatchesMostRecentTraces
- Throws:
Exception
-
getTraces_serviceNames
- Throws:
Exception
-
getTraces_serviceNames_mixedTraceIdLength
- Throws:
Exception
-
getTraces_spanName
- Throws:
Exception
-
getTraces_spanName_mixedTraceIdLength
- Throws:
Exception
-
getTraces_tags
- Throws:
Exception
-
getTraces_minDuration
- Throws:
Exception
-
getTraces_lateDuration
- Throws:
Exception
-
getTraces_maxDuration
- Throws:
Exception
-
readback_minimalErrorSpan
The following skeletal span is used in dependency linking.Notably this guards empty tag values work
- Throws:
Exception
-
readsBackLargeValues
While large spans are discouraged, and maybe not indexed, we should be able to read them back.- Throws:
IOException
-
spanWithProblematicData
This tests problematic data that can sometimes break storage:- json in span name
- tag with nested dots (can be confused as nested objects)
- Throws:
IOException
-
getTraces_manyTraces
Formerly, a bug was present where cassandra didn't index more than bucket count traces per millisecond. This stores a lot of spans to ensure indexes work under high-traffic scenarios.- Throws:
IOException
-
getTraces_duration
Shows that duration queries go against the root span, not the child- Throws:
IOException
-
getTraces_absentWhenNoTimestamp
Spans and traces are meaningless unless they have a timestamp. While unlikely, this could happen if a binary annotation is logged before a timestamped one is.- Throws:
IOException
-
getTraces_annotation
- Throws:
IOException
-
getTraces_multipleAnnotationsBecomeAndFilter
- Throws:
IOException
-
getTraces_differentiateOnServiceName
This test makes sure that annotation queries pay attention to which host recorded data- Throws:
IOException
-
getTraces_limit
limit should apply to traces closest to endTs- Throws:
IOException
-
getTraces_endTsAndLookback
Traces whose root span has timestamps between (endTs - lookback) and endTs are returned- Throws:
IOException
-
traceWithManySpans
- Throws:
IOException
-
names_goLowercase
- Throws:
IOException
-
getTraces_endTsInsideTheTrace
Ensure complete traces are aggregated, even if they complete after endTs- Throws:
IOException
-
requestBuilder
-