Package zipkin2.storage
Class ITSpanStore
- java.lang.Object
-
- zipkin2.storage.ITSpanStore
-
- Direct Known Subclasses:
ITInMemoryStorage.ITSpanStore
public abstract class ITSpanStore extends java.lang.ObjectBase test forSpanStore.Subtypes should create a connection to a real backend, even if that backend is in-process.
-
-
Constructor Summary
Constructors Constructor Description ITSpanStore()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaccept(java.util.List<Span> spans)protected voidaccept(Span... spans)voidallShouldWorkWhenEmpty()This would only happen when the store layer is bootstrapping, or has been purged.voidallShouldWorkWhenNoIndexableDataYet()This is unlikely and means instrumentation sends empty spans by mistake.abstract voidclear()Clears store between tests.voidconsumer_properlyImplementsCallContract_execute()voidconsumer_properlyImplementsCallContract_submit()voiddeduplicates()Ideally, storage backends can deduplicate identical documents as this will prevent some analysis problems such as double-counting dependency links or other statistics.voidgetTrace_considersBitsAbove64bit()voidgetTrace_returnsEmptyOnNotFound()voidgetTraces_absentWhenNoTimestamp()Spans and traces are meaningless unless they have a timestamp.voidgetTraces_annotation()voidgetTraces_considersBitsAbove64bit()voidgetTraces_differentiateOnServiceName()This test makes sure that annotation queries pay attention to which host recorded datavoidgetTraces_duration()Shows that duration queries go against the root span, not the childvoidgetTraces_endTsAndLookback()Traces whose root span has timestamps between (endTs - lookback) and endTs are returnedvoidgetTraces_endTsInsideTheTrace()Ensure complete traces are aggregated, even if they complete after endTsvoidgetTraces_filteringMatchesMostRecentTraces()voidgetTraces_groupsTracesTogether()voidgetTraces_lateDuration()voidgetTraces_limit()limit should apply to traces closest to endTsvoidgetTraces_manyTraces()Formerly, a bug was present where cassandra didn't index more than bucket count traces per millisecond.voidgetTraces_maxDuration()voidgetTraces_minDuration()voidgetTraces_multipleAnnotationsBecomeAndFilter()voidgetTraces_serviceNames()voidgetTraces_serviceNames_mixedTraceIdLength()voidgetTraces_spanName()voidgetTraces_spanName_mixedTraceIdLength()voidgetTraces_tags()voidnames_goLowercase()voidreadback_minimalErrorSpan()The following skeletal span is used in dependency linking.voidreadsBackLargeValues()While large spans are discouraged, and maybe not indexed, we should be able to read them back.protected static QueryRequest.BuilderrequestBuilder()voidspanWithProblematicData()This tests problematic data that can sometimes break storage: json in span name tag with nested dots (can be confused as nested objects)protected abstract StorageComponentstorage()Should maintain state between multiple calls within a test.protected SpanStorestore()voidtraceWithManySpans()
-
-
-
Method Detail
-
storage
protected abstract StorageComponent storage()
Should maintain state between multiple calls within a test.
-
store
protected SpanStore store()
-
clear
public abstract void clear() throws java.lang.ExceptionClears store between tests.- Throws:
java.lang.Exception
-
getTrace_considersBitsAbove64bit
public void getTrace_considersBitsAbove64bit() throws java.io.IOException- Throws:
java.io.IOException
-
getTrace_returnsEmptyOnNotFound
public void getTrace_returnsEmptyOnNotFound() throws java.io.IOException- Throws:
java.io.IOException
-
allShouldWorkWhenEmpty
public void allShouldWorkWhenEmpty() throws java.io.IOExceptionThis would only happen when the store layer is bootstrapping, or has been purged.- Throws:
java.io.IOException
-
allShouldWorkWhenNoIndexableDataYet
public void allShouldWorkWhenNoIndexableDataYet() throws java.io.IOExceptionThis is unlikely and means instrumentation sends empty spans by mistake.- Throws:
java.io.IOException
-
consumer_properlyImplementsCallContract_execute
public void consumer_properlyImplementsCallContract_execute() throws java.io.IOException- Throws:
java.io.IOException
-
consumer_properlyImplementsCallContract_submit
public void consumer_properlyImplementsCallContract_submit() throws java.lang.Exception- Throws:
java.lang.Exception
-
deduplicates
public void deduplicates() throws java.io.IOExceptionIdeally, storage backends can deduplicate identical documents as this will prevent some analysis problems such as double-counting dependency links or other statistics. While this test exists, it is known not all backends will be able to cheaply make it pass. In other words, it is optional.- Throws:
java.io.IOException
-
getTraces_groupsTracesTogether
public void getTraces_groupsTracesTogether() throws java.io.IOException- Throws:
java.io.IOException
-
getTraces_considersBitsAbove64bit
public void getTraces_considersBitsAbove64bit() throws java.io.IOException- Throws:
java.io.IOException
-
getTraces_filteringMatchesMostRecentTraces
public void getTraces_filteringMatchesMostRecentTraces() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_serviceNames
public void getTraces_serviceNames() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_serviceNames_mixedTraceIdLength
public void getTraces_serviceNames_mixedTraceIdLength() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_spanName
public void getTraces_spanName() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_spanName_mixedTraceIdLength
public void getTraces_spanName_mixedTraceIdLength() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_tags
public void getTraces_tags() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_minDuration
public void getTraces_minDuration() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_lateDuration
public void getTraces_lateDuration() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_maxDuration
public void getTraces_maxDuration() throws java.lang.Exception- Throws:
java.lang.Exception
-
readback_minimalErrorSpan
public void readback_minimalErrorSpan() throws java.lang.ExceptionThe following skeletal span is used in dependency linking.Notably this guards empty tag values work
- Throws:
java.lang.Exception
-
readsBackLargeValues
public void readsBackLargeValues() throws java.io.IOExceptionWhile large spans are discouraged, and maybe not indexed, we should be able to read them back.- Throws:
java.io.IOException
-
spanWithProblematicData
public void spanWithProblematicData() throws java.io.IOExceptionThis tests problematic data that can sometimes break storage:- json in span name
- tag with nested dots (can be confused as nested objects)
- Throws:
java.io.IOException
-
getTraces_manyTraces
public void getTraces_manyTraces() throws java.io.IOExceptionFormerly, 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:
java.io.IOException
-
getTraces_duration
public void getTraces_duration() throws java.io.IOExceptionShows that duration queries go against the root span, not the child- Throws:
java.io.IOException
-
getTraces_absentWhenNoTimestamp
public void getTraces_absentWhenNoTimestamp() throws java.io.IOExceptionSpans 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:
java.io.IOException
-
getTraces_annotation
public void getTraces_annotation() throws java.io.IOException- Throws:
java.io.IOException
-
getTraces_multipleAnnotationsBecomeAndFilter
public void getTraces_multipleAnnotationsBecomeAndFilter() throws java.io.IOException- Throws:
java.io.IOException
-
getTraces_differentiateOnServiceName
public void getTraces_differentiateOnServiceName() throws java.io.IOExceptionThis test makes sure that annotation queries pay attention to which host recorded data- Throws:
java.io.IOException
-
getTraces_limit
public void getTraces_limit() throws java.io.IOExceptionlimit should apply to traces closest to endTs- Throws:
java.io.IOException
-
getTraces_endTsAndLookback
public void getTraces_endTsAndLookback() throws java.io.IOExceptionTraces whose root span has timestamps between (endTs - lookback) and endTs are returned- Throws:
java.io.IOException
-
traceWithManySpans
public void traceWithManySpans() throws java.io.IOException- Throws:
java.io.IOException
-
names_goLowercase
public void names_goLowercase() throws java.io.IOException- Throws:
java.io.IOException
-
getTraces_endTsInsideTheTrace
public void getTraces_endTsInsideTheTrace() throws java.io.IOExceptionEnsure complete traces are aggregated, even if they complete after endTs- Throws:
java.io.IOException
-
accept
protected void accept(java.util.List<Span> spans) throws java.io.IOException
- Throws:
java.io.IOException
-
accept
protected void accept(Span... spans) throws java.io.IOException
- Throws:
java.io.IOException
-
requestBuilder
protected static QueryRequest.Builder requestBuilder()
-
-