Skip to content

Commit 3b4f911

Browse files
authored
Remove deprecated otel elasticsearch exporter config *_dynamic_index (#8592)
As *_dynamic_index are all no-op and logs_index defaults to empty string from v0.122.0 elasticsearchexporter, clean up deprecated config usage in EA repo.
1 parent 21aa2ac commit 3b4f911

File tree

11 files changed

+33
-79
lines changed

11 files changed

+33
-79
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: enhancement
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Remove deprecated otel elasticsearch exporter config `*_dynamic_index` from code and samples
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
#description:
20+
21+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
22+
component: elastic-agent
23+
24+
# PR URL; optional; the PR number that added the changeset.
25+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
26+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
27+
# Please provide it if you are adding a fragment for a different PR.
28+
pr: https://github.com/elastic/elastic-agent/pull/8592
29+
30+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
31+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
32+
#issue: https://github.com/owner/repo/1234

deploy/helm/edot-collector/kube-stack/values.yaml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -611,12 +611,6 @@ collectors:
611611
endpoints: # List of Elasticsearch endpoints.
612612
- ${env:ELASTIC_ENDPOINT}
613613
api_key: ${env:ELASTIC_API_KEY} # API key for Elasticsearch authentication.
614-
logs_dynamic_index:
615-
enabled: true
616-
metrics_dynamic_index:
617-
enabled: true
618-
traces_dynamic_index:
619-
enabled: true
620614
# Enable in order to skip the SSL certificate Check
621615
# tls:
622616
# insecure_skip_verify: true

internal/pkg/otel/samples/darwin/logs_metrics_traces.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -100,24 +100,12 @@ exporters:
100100
api_key: ${env:ELASTIC_API_KEY}
101101
mapping:
102102
mode: ecs
103-
logs_dynamic_index:
104-
enabled: true
105-
metrics_dynamic_index:
106-
enabled: true
107-
traces_dynamic_index:
108-
enabled: true
109103

110104
elasticsearch/otel:
111105
endpoints: [ "${env:ELASTIC_ENDPOINT}" ]
112106
api_key: ${env:ELASTIC_API_KEY}
113107
mapping:
114108
mode: otel
115-
logs_dynamic_index:
116-
enabled: true
117-
metrics_dynamic_index:
118-
enabled: true
119-
traces_dynamic_index:
120-
enabled: true
121109

122110
service:
123111
extensions: [file_storage]

internal/pkg/otel/samples/darwin/platformlogs.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ exporters:
5858
api_key: ${env:ELASTIC_API_KEY}
5959
mapping:
6060
mode: otel
61-
logs_dynamic_index:
62-
enabled: true
63-
metrics_dynamic_index:
64-
enabled: true
65-
traces_dynamic_index:
66-
enabled: true
6761

6862
service:
6963
extensions: [file_storage]

internal/pkg/otel/samples/darwin/platformlogs_hostmetrics.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -91,23 +91,11 @@ exporters:
9191
api_key: ${env:ELASTIC_API_KEY}
9292
mapping:
9393
mode: ecs
94-
logs_dynamic_index:
95-
enabled: true
96-
metrics_dynamic_index:
97-
enabled: true
98-
traces_dynamic_index:
99-
enabled: true
10094
elasticsearch/otel:
10195
endpoints: [ "${env:ELASTIC_ENDPOINT}" ]
10296
api_key: ${env:ELASTIC_API_KEY}
10397
mapping:
10498
mode: otel
105-
logs_dynamic_index:
106-
enabled: true
107-
metrics_dynamic_index:
108-
enabled: true
109-
traces_dynamic_index:
110-
enabled: true
11199

112100
service:
113101
extensions: [file_storage]

internal/pkg/otel/samples/linux/gateway.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,6 @@ exporters:
4949
endpoints:
5050
- ${ELASTIC_ENDPOINT} # Will be populated from environment variable
5151
api_key: ${ELASTIC_API_KEY} # Will be populated from environment variable
52-
logs_dynamic_index:
53-
enabled: true
54-
metrics_dynamic_index:
55-
enabled: true
56-
traces_dynamic_index:
57-
enabled: true
5852
# tls:
5953
# insecure_skip_verify: true
6054
mapping:

internal/pkg/otel/samples/linux/logs_metrics_traces.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -107,24 +107,12 @@ exporters:
107107
api_key: ${env:ELASTIC_API_KEY}
108108
mapping:
109109
mode: ecs
110-
logs_dynamic_index:
111-
enabled: true
112-
metrics_dynamic_index:
113-
enabled: true
114-
traces_dynamic_index:
115-
enabled: true
116110

117111
elasticsearch/otel:
118112
endpoints: [ "${env:ELASTIC_ENDPOINT}" ]
119113
api_key: ${env:ELASTIC_API_KEY}
120114
mapping:
121115
mode: otel
122-
logs_dynamic_index:
123-
enabled: true
124-
metrics_dynamic_index:
125-
enabled: true
126-
traces_dynamic_index:
127-
enabled: true
128116

129117
service:
130118
extensions: [file_storage]

internal/pkg/otel/samples/linux/platformlogs.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ exporters:
5858
api_key: ${env:ELASTIC_API_KEY}
5959
mapping:
6060
mode: otel
61-
logs_dynamic_index:
62-
enabled: true
63-
metrics_dynamic_index:
64-
enabled: true
65-
traces_dynamic_index:
66-
enabled: true
6761

6862
service:
6963
extensions: [file_storage]

internal/pkg/otel/samples/linux/platformlogs_hostmetrics.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,23 +98,11 @@ exporters:
9898
api_key: ${env:ELASTIC_API_KEY}
9999
mapping:
100100
mode: ecs
101-
logs_dynamic_index:
102-
enabled: true
103-
metrics_dynamic_index:
104-
enabled: true
105-
traces_dynamic_index:
106-
enabled: true
107101
elasticsearch/otel:
108102
endpoints: [ "${env:ELASTIC_ENDPOINT}" ]
109103
api_key: ${env:ELASTIC_API_KEY}
110104
mapping:
111105
mode: otel
112-
logs_dynamic_index:
113-
enabled: true
114-
metrics_dynamic_index:
115-
enabled: true
116-
traces_dynamic_index:
117-
enabled: true
118106

119107
service:
120108
extensions: [file_storage]

internal/pkg/otel/translate/otelconfig.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,7 @@ func translateEsOutputToExporter(cfg *config.C) (map[string]any, error) {
401401
if err != nil {
402402
return nil, err
403403
}
404-
// we want to use dynamic indexing
405-
esConfig["logs_index"] = "" // needs to be empty for logs_dynamic_index
406-
esConfig["logs_dynamic_index"] = map[string]any{"enabled": true}
404+
// dynamic indexing works by default
407405

408406
// we also want to use dynamic log ids
409407
esConfig["logs_dynamic_id"] = map[string]any{"enabled": true}

0 commit comments

Comments
 (0)