Package zipkin2.elasticsearch
Class ElasticsearchStorage.Builder
- java.lang.Object
-
- zipkin2.storage.StorageComponent.Builder
-
- zipkin2.elasticsearch.ElasticsearchStorage.Builder
-
- Enclosing class:
- ElasticsearchStorage
public abstract static class ElasticsearchStorage.Builder extends StorageComponent.Builder
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ElasticsearchStorage.Builder
autocompleteCardinality(int autocompleteCardinality)
abstract ElasticsearchStorage.Builder
autocompleteKeys(List<String> autocompleteKeys)
abstract ElasticsearchStorage.Builder
autocompleteTtl(int autocompleteTtl)
abstract ElasticsearchStorage
build()
ElasticsearchStorage.Builder
dateSeparator(char dateSeparator)
The date separator to use when generating daily index names.abstract ElasticsearchStorage.Builder
ensureTemplates(boolean ensureTemplates)
False disables automatic index template installation.abstract ElasticsearchStorage.Builder
flushOnWrites(boolean flushOnWrites)
Internal and visible only for testing.ElasticsearchStorage.Builder
index(String index)
The index prefix to use when generating daily index names.abstract ElasticsearchStorage.Builder
indexReplicas(int indexReplicas)
The number of replica copies of each shard in the index.abstract ElasticsearchStorage.Builder
indexShards(int indexShards)
The number of shards to split the index into.abstract ElasticsearchStorage.Builder
namesLookback(int namesLookback)
Only return span and service names where allSpan.timestamp()
are at or after (now - lookback) in milliseconds.abstract ElasticsearchStorage.Builder
pipeline(String pipeline)
Only valid when the destination is Elasticsearch 5.x.abstract ElasticsearchStorage.Builder
searchEnabled(boolean searchEnabled)
abstract ElasticsearchStorage.Builder
strictTraceId(boolean strictTraceId)
abstract ElasticsearchStorage.Builder
templatePriority(Integer templatePriority)
Only valid when the destination is Elasticsearch >= 7.8.
-
-
-
Method Detail
-
pipeline
public abstract ElasticsearchStorage.Builder pipeline(String pipeline)
Only valid when the destination is Elasticsearch 5.x. Indicates the ingest pipeline used before spans are indexed. No default.See https://www.elastic.co/guide/en/elasticsearch/reference/master/pipeline.html
-
namesLookback
public abstract ElasticsearchStorage.Builder namesLookback(int namesLookback)
Only return span and service names where allSpan.timestamp()
are at or after (now - lookback) in milliseconds. Defaults to 1 day (86400000).
-
flushOnWrites
public abstract ElasticsearchStorage.Builder flushOnWrites(boolean flushOnWrites)
Internal and visible only for testing.See https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-refresh.html
-
index
public final ElasticsearchStorage.Builder index(String index)
The index prefix to use when generating daily index names. Defaults to zipkin.
-
dateSeparator
public final ElasticsearchStorage.Builder dateSeparator(char dateSeparator)
The date separator to use when generating daily index names. Defaults to '-'.By default, spans with a timestamp falling on 2016/03/19 end up in the index 'zipkin-span-2016-03-19'. When the date separator is '.', the index would be 'zipkin-span-2016.03.19'. If the date separator is 0, there is no delimiter. Ex the index would be 'zipkin-span-20160319'
-
indexShards
public abstract ElasticsearchStorage.Builder indexShards(int indexShards)
The number of shards to split the index into. Each shard and its replicas are assigned to a machine in the cluster. Increasing the number of shards and machines in the cluster will improve read and write performance. Number of shards cannot be changed for existing indices, but new daily indices will pick up changes to the setting. Defaults to 5.Corresponds to index.number_of_shards
-
indexReplicas
public abstract ElasticsearchStorage.Builder indexReplicas(int indexReplicas)
The number of replica copies of each shard in the index. Each shard and its replicas are assigned to a machine in the cluster. Increasing the number of replicas and machines in the cluster will improve read performance, but not write performance. Number of replicas can be changed for existing indices. Defaults to 1. It is highly discouraged to set this to 0 as it would mean a machine failure results in data loss.Corresponds to index.number_of_replicas
-
ensureTemplates
public abstract ElasticsearchStorage.Builder ensureTemplates(boolean ensureTemplates)
False disables automatic index template installation.
-
templatePriority
public abstract ElasticsearchStorage.Builder templatePriority(@Nullable Integer templatePriority)
Only valid when the destination is Elasticsearch >= 7.8. Indicates the index template priority in case of multiple matching templates. The template with highest priority is used. Default to 0.See https://www.elastic.co/guide/en/elasticsearch/reference/7.8/_index_template_and_settings_priority.html
-
strictTraceId
public abstract ElasticsearchStorage.Builder strictTraceId(boolean strictTraceId)
- Specified by:
strictTraceId
in classStorageComponent.Builder
-
searchEnabled
public abstract ElasticsearchStorage.Builder searchEnabled(boolean searchEnabled)
- Specified by:
searchEnabled
in classStorageComponent.Builder
-
autocompleteKeys
public abstract ElasticsearchStorage.Builder autocompleteKeys(List<String> autocompleteKeys)
- Overrides:
autocompleteKeys
in classStorageComponent.Builder
-
autocompleteTtl
public abstract ElasticsearchStorage.Builder autocompleteTtl(int autocompleteTtl)
- Overrides:
autocompleteTtl
in classStorageComponent.Builder
-
autocompleteCardinality
public abstract ElasticsearchStorage.Builder autocompleteCardinality(int autocompleteCardinality)
- Overrides:
autocompleteCardinality
in classStorageComponent.Builder
-
build
public abstract ElasticsearchStorage build()
- Specified by:
build
in classStorageComponent.Builder
-
-