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<zipkin2.Span> spans)protected voidaccept(zipkin2.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.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_localServiceName()voidgetTraces_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_remoteServiceName()voidgetTraces_remoteServiceName_128()voidgetTraces_remoteServiceName_withoutServiceName()voidgetTraces_spanName()voidgetTraces_spanName_128()voidgetTraces_spanName_noServiceName()voidgetTraces_tags()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.voidremoteServiceName_goesLowercase()protected static zipkin2.storage.QueryRequest.BuilderrequestBuilder()voidserviceNamesGoLowercase()voidspanName_goesLowercase()voidspanNameIsJson()Not a good span name, but better to test it than break mysteriouslyprotected abstract zipkin2.storage.StorageComponentstorage()Should maintain state between multiple calls within a test.protected zipkin2.storage.SpanStorestore()voidtagsWithNestedDots()Dots in tag names can create problems in storage which tries to make a tree out of themvoidtraceWithManySpans()
-
-
-
Method Detail
-
storage
protected abstract zipkin2.storage.StorageComponent storage()
Should maintain state between multiple calls within a test.
-
store
protected zipkin2.storage.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
-
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_localServiceName
public void getTraces_localServiceName() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_remoteServiceName
public void getTraces_remoteServiceName() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_remoteServiceName_withoutServiceName
public void getTraces_remoteServiceName_withoutServiceName() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_remoteServiceName_128
public void getTraces_remoteServiceName_128() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_spanName
public void getTraces_spanName() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_spanName_noServiceName
public void getTraces_spanName_noServiceName() throws java.lang.Exception- Throws:
java.lang.Exception
-
getTraces_spanName_128
public void getTraces_spanName_128() 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
-
spanNameIsJson
public void spanNameIsJson() throws java.io.IOExceptionNot a good span name, but better to test it than break mysteriously- Throws:
java.io.IOException
-
tagsWithNestedDots
public void tagsWithNestedDots() throws java.io.IOExceptionDots in tag names can create problems in storage which tries to make a tree out of them- 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
-
remoteServiceName_goesLowercase
public void remoteServiceName_goesLowercase() throws java.io.IOException- Throws:
java.io.IOException
-
spanName_goesLowercase
public void spanName_goesLowercase() throws java.io.IOException- Throws:
java.io.IOException
-
serviceNamesGoLowercase
public void serviceNamesGoLowercase() 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<zipkin2.Span> spans) throws java.io.IOException- Throws:
java.io.IOException
-
accept
protected void accept(zipkin2.Span... spans) throws java.io.IOException- Throws:
java.io.IOException
-
requestBuilder
protected static zipkin2.storage.QueryRequest.Builder requestBuilder()
-
-