Package zipkin2.elasticsearch
Class ElasticsearchStorage
- java.lang.Object
-
- zipkin2.Component
-
- zipkin2.storage.StorageComponent
-
- zipkin2.elasticsearch.ElasticsearchStorage
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public abstract class ElasticsearchStorage extends StorageComponent
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ElasticsearchStorage.Builder
static interface
ElasticsearchStorage.LazyHttpClient
This defers creation of anWebClient
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AutocompleteTags
autocompleteTags()
CheckResult
check()
This is blocking so that we can determine if the cluster is healthy or notvoid
clear()
This is an internal blocking call, only used in tests.void
close()
abstract boolean
flushOnWrites()
abstract zipkin2.elasticsearch.internal.IndexNameFormatter
indexNameFormatter()
boolean
isOverCapacity(Throwable e)
Internal code and api responses coerce toRejectedExecutionException
when work is rejected.abstract int
namesLookback()
static ElasticsearchStorage.Builder
newBuilder(ElasticsearchStorage.LazyHttpClient lazyHttpClient)
The lazy http client supplier will be closed onclose()
abstract String
pipeline()
ServiceAndSpanNames
serviceAndSpanNames()
SpanConsumer
spanConsumer()
SpanStore
spanStore()
abstract boolean
strictTraceId()
String
toString()
Traces
traces()
float
version()
Returns the Elasticsearch version of the connected cluster.
-
-
-
Method Detail
-
newBuilder
public static ElasticsearchStorage.Builder newBuilder(ElasticsearchStorage.LazyHttpClient lazyHttpClient)
The lazy http client supplier will be closed onclose()
-
pipeline
@Nullable public abstract String pipeline()
-
flushOnWrites
public abstract boolean flushOnWrites()
-
strictTraceId
public abstract boolean strictTraceId()
-
indexNameFormatter
public abstract zipkin2.elasticsearch.internal.IndexNameFormatter indexNameFormatter()
-
namesLookback
public abstract int namesLookback()
-
spanStore
public SpanStore spanStore()
- Specified by:
spanStore
in classStorageComponent
-
traces
public Traces traces()
- Overrides:
traces
in classStorageComponent
-
serviceAndSpanNames
public ServiceAndSpanNames serviceAndSpanNames()
- Overrides:
serviceAndSpanNames
in classStorageComponent
-
autocompleteTags
public AutocompleteTags autocompleteTags()
- Overrides:
autocompleteTags
in classStorageComponent
-
spanConsumer
public SpanConsumer spanConsumer()
- Specified by:
spanConsumer
in classStorageComponent
-
version
@Memoized public float version()
Returns the Elasticsearch version of the connected cluster. Internal use only
-
clear
public void clear() throws IOException
This is an internal blocking call, only used in tests.- Throws:
IOException
-
isOverCapacity
public boolean isOverCapacity(Throwable e)
Internal code and api responses coerce toRejectedExecutionException
when work is rejected. We also classifyResponseTimeoutException
as a capacity related exception eventhough capacity is not the only reason (timeout could also result from a misconfiguration or a network problem).- Overrides:
isOverCapacity
in classStorageComponent
-
check
public CheckResult check()
This is blocking so that we can determine if the cluster is healthy or not
-
-