Class ITSpanStore

  • Direct Known Subclasses:
    ITInMemoryStorage.ITSpanStore

    public abstract class ITSpanStore
    extends java.lang.Object
    Base test for SpanStore.

    Subtypes should create a connection to a real backend, even if that backend is in-process.

    • Constructor Detail

      • ITSpanStore

        public ITSpanStore()
    • Method Detail

      • storage

        protected abstract StorageComponent storage()
        Should maintain state between multiple calls within a test.
      • clear

        public abstract void clear()
                            throws java.lang.Exception
        Clears 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.IOException
        This would only happen when the store layer is bootstrapping, or has been purged.
        Throws:
        java.io.IOException
      • allShouldWorkWhenNoIndexableDataYet

        public void allShouldWorkWhenNoIndexableDataYet()
                                                 throws java.io.IOException
        This 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.IOException
        Ideally, 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.Exception
        The 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.IOException
        While 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.IOException
        This 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.IOException
        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:
        java.io.IOException
      • getTraces_duration

        public void getTraces_duration()
                                throws java.io.IOException
        Shows that duration queries go against the root span, not the child
        Throws:
        java.io.IOException
      • getTraces_absentWhenNoTimestamp

        public void getTraces_absentWhenNoTimestamp()
                                             throws java.io.IOException
        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:
        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.IOException
        This 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.IOException
        limit should apply to traces closest to endTs
        Throws:
        java.io.IOException
      • getTraces_endTsAndLookback

        public void getTraces_endTsAndLookback()
                                        throws java.io.IOException
        Traces 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.IOException
        Ensure 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