@@ -60,54 +60,40 @@ type Indices struct {
60
60
61
61
// Configuration describes the configuration properties needed to connect to an ElasticSearch cluster
62
62
type Configuration struct {
63
- Servers []string `mapstructure:"server_urls" valid:"required,url"`
64
- RemoteReadClusters []string `mapstructure:"remote_read_clusters"`
65
- Username string `mapstructure:"username"`
66
- Password string `mapstructure:"password" json:"-"`
67
- TokenFilePath string `mapstructure:"token_file"`
68
- PasswordFilePath string `mapstructure:"password_file"`
69
- AllowTokenFromContext bool `mapstructure:"-"`
70
- Sniffer bool `mapstructure:"sniffer"` // https://github.com/olivere/elastic/wiki/Sniffing
71
- SnifferTLSEnabled bool `mapstructure:"sniffer_tls_enabled"`
72
- MaxDocCount int `mapstructure:"-"` // Defines maximum number of results to fetch from storage per query
73
- MaxSpanAge time.Duration `mapstructure:"-"` // configures the maximum lookback on span reads
74
- NumShards int64 `mapstructure:"num_shards"`
75
- NumReplicas int64 `mapstructure:"num_replicas"`
76
- PrioritySpanTemplate int64 `mapstructure:"priority_span_template"`
77
- PriorityServiceTemplate int64 `mapstructure:"priority_service_template"`
78
- PriorityDependenciesTemplate int64 `mapstructure:"priority_dependencies_template"`
79
- Timeout time.Duration `mapstructure:"-"`
80
- BulkSize int `mapstructure:"-"`
81
- BulkWorkers int `mapstructure:"-"`
82
- BulkActions int `mapstructure:"-"`
83
- BulkFlushInterval time.Duration `mapstructure:"-"`
84
- IndexPrefix string `mapstructure:"index_prefix"`
85
- // Deprecated: use Indices and IndexOptions instead.
86
- IndexDateLayoutSpans string `mapstructure:"-"`
87
- // Deprecated: use Indices and IndexOptions instead.
88
- IndexDateLayoutServices string `mapstructure:"-"`
89
- // Deprecated: use Indices and IndexOptions instead.
90
- IndexDateLayoutSampling string `mapstructure:"-"`
91
- // Deprecated: use Indices and IndexOptions instead.
92
- IndexDateLayoutDependencies string `mapstructure:"-"`
93
- // Deprecated: use Indices and IndexOptions instead.
94
- IndexRolloverFrequencySpans string `mapstructure:"-"`
95
- // Deprecated: use Indices and IndexOptions instead.
96
- IndexRolloverFrequencyServices string `mapstructure:"-"`
97
- // Deprecated: use Indices and IndexOptions instead.
98
- IndexRolloverFrequencySampling string `mapstructure:"-"`
99
- Indices Indices `mapstructure:"indices"`
100
- ServiceCacheTTL time.Duration `mapstructure:"service_cache_ttl"`
101
- AdaptiveSamplingLookback time.Duration `mapstructure:"-"`
102
- Tags TagsAsFields `mapstructure:"tags_as_fields"`
103
- Enabled bool `mapstructure:"-"`
104
- TLS tlscfg.Options `mapstructure:"tls"`
105
- UseReadWriteAliases bool `mapstructure:"use_aliases"`
106
- CreateIndexTemplates bool `mapstructure:"create_mappings"`
107
- UseILM bool `mapstructure:"use_ilm"`
108
- Version uint `mapstructure:"version"`
109
- LogLevel string `mapstructure:"log_level"`
110
- SendGetBodyAs string `mapstructure:"send_get_body_as"`
63
+ Servers []string `mapstructure:"server_urls" valid:"required,url"`
64
+ RemoteReadClusters []string `mapstructure:"remote_read_clusters"`
65
+ Username string `mapstructure:"username"`
66
+ Password string `mapstructure:"password" json:"-"`
67
+ TokenFilePath string `mapstructure:"token_file"`
68
+ PasswordFilePath string `mapstructure:"password_file"`
69
+ AllowTokenFromContext bool `mapstructure:"-"`
70
+ Sniffer bool `mapstructure:"sniffer"` // https://github.com/olivere/elastic/wiki/Sniffing
71
+ SnifferTLSEnabled bool `mapstructure:"sniffer_tls_enabled"`
72
+ MaxDocCount int `mapstructure:"-"` // Defines maximum number of results to fetch from storage per query
73
+ MaxSpanAge time.Duration `mapstructure:"-"` // configures the maximum lookback on span reads
74
+ NumShards int64 `mapstructure:"num_shards"`
75
+ NumReplicas int64 `mapstructure:"num_replicas"`
76
+ PrioritySpanTemplate int64 `mapstructure:"priority_span_template"`
77
+ PriorityServiceTemplate int64 `mapstructure:"priority_service_template"`
78
+ PriorityDependenciesTemplate int64 `mapstructure:"priority_dependencies_template"`
79
+ Timeout time.Duration `mapstructure:"-"`
80
+ BulkSize int `mapstructure:"-"`
81
+ BulkWorkers int `mapstructure:"-"`
82
+ BulkActions int `mapstructure:"-"`
83
+ BulkFlushInterval time.Duration `mapstructure:"-"`
84
+ IndexPrefix string `mapstructure:"index_prefix"`
85
+ Indices Indices `mapstructure:"indices"`
86
+ ServiceCacheTTL time.Duration `mapstructure:"service_cache_ttl"`
87
+ AdaptiveSamplingLookback time.Duration `mapstructure:"-"`
88
+ Tags TagsAsFields `mapstructure:"tags_as_fields"`
89
+ Enabled bool `mapstructure:"-"`
90
+ TLS tlscfg.Options `mapstructure:"tls"`
91
+ UseReadWriteAliases bool `mapstructure:"use_aliases"`
92
+ CreateIndexTemplates bool `mapstructure:"create_mappings"`
93
+ UseILM bool `mapstructure:"use_ilm"`
94
+ Version uint `mapstructure:"version"`
95
+ LogLevel string `mapstructure:"log_level"`
96
+ SendGetBodyAs string `mapstructure:"send_get_body_as"`
111
97
}
112
98
113
99
// TagsAsFields holds configuration for tag schema.
@@ -315,17 +301,17 @@ func (c *Configuration) ApplyDefaults(source *Configuration) {
315
301
316
302
// GetIndexRolloverFrequencySpansDuration returns jaeger-span index rollover frequency duration
317
303
func (c * Configuration ) GetIndexRolloverFrequencySpansDuration () time.Duration {
318
- return getIndexRolloverFrequencyDuration (c .IndexRolloverFrequencySpans )
304
+ return getIndexRolloverFrequencyDuration (c .Indices . Spans . RolloverFrequency )
319
305
}
320
306
321
307
// GetIndexRolloverFrequencyServicesDuration returns jaeger-service index rollover frequency duration
322
308
func (c * Configuration ) GetIndexRolloverFrequencyServicesDuration () time.Duration {
323
- return getIndexRolloverFrequencyDuration (c .IndexRolloverFrequencyServices )
309
+ return getIndexRolloverFrequencyDuration (c .Indices . Services . RolloverFrequency )
324
310
}
325
311
326
312
// GetIndexRolloverFrequencySamplingDuration returns jaeger-sampling index rollover frequency duration
327
313
func (c * Configuration ) GetIndexRolloverFrequencySamplingDuration () time.Duration {
328
- return getIndexRolloverFrequencyDuration (c .IndexRolloverFrequencySampling )
314
+ return getIndexRolloverFrequencyDuration (c .Indices . Sampling . RolloverFrequency )
329
315
}
330
316
331
317
// GetIndexRolloverFrequencyDuration returns the index rollover frequency duration for the given frequency string
0 commit comments