Class StorageComponent

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable
    Direct Known Subclasses:
    ForwardingStorageComponent, InMemoryStorage

    public abstract class StorageComponent
    extends Component
    A component that provides storage interfaces used for spans and aggregations. Implementations are free to provide other interfaces, but the ones declared here must be supported.
    See Also:
    InMemoryStorage
    • Constructor Detail

      • StorageComponent

        public StorageComponent()
    • Method Detail

      • traces

        public Traces traces()
      • spanStore

        public abstract SpanStore spanStore()
      • spanConsumer

        public abstract SpanConsumer spanConsumer()
      • isOverCapacity

        public boolean isOverCapacity​(java.lang.Throwable e)
        A storage request failed and was dropped due to a limit, resource unavailability, or a timeout. Implementations of throttling can use this signal to differentiate between failures, for example to reduce traffic.

        Callers of this method will submit an exception raised by Call.execute() or on the error callback of Call.enqueue(Callback).

        By default, this returns true if the input is a RejectedExecutionException. When originating exceptions, use this type to indicate a load related failure.

        It is generally preferred to specialize this method to handle relevant exceptions for the particular storage rather than wrapping them in RejectedExecutionException at call sites. Extra wrapping can make errors harder to read, for example, by making it harder to "google" a solution for a well known error message for the storage client, instead thinking the error is in Zipkin code itself.

        See also

        While implementation is flexible, one known use is Netflix concurrency limits