Class StorageComponent
- java.lang.Object
-
- zipkin2.Component
-
- zipkin2.storage.StorageComponent
-
- All Implemented Interfaces:
Closeable
,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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StorageComponent.Builder
-
Constructor Summary
Constructors Constructor Description StorageComponent()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AutocompleteTags
autocompleteTags()
boolean
isOverCapacity(Throwable e)
A storage request failed and was dropped due to a limit, resource unavailability, or a timeout.ServiceAndSpanNames
serviceAndSpanNames()
abstract SpanConsumer
spanConsumer()
abstract SpanStore
spanStore()
Traces
traces()
-
-
-
Method Detail
-
traces
public Traces traces()
-
spanStore
public abstract SpanStore spanStore()
-
autocompleteTags
public AutocompleteTags autocompleteTags()
-
serviceAndSpanNames
public ServiceAndSpanNames serviceAndSpanNames()
-
spanConsumer
public abstract SpanConsumer spanConsumer()
-
isOverCapacity
public boolean isOverCapacity(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 ofCall.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
-
-