Skip to content

Commit b2e7b2e

Browse files
mergify[bot]carsoniprogercoll
authored
Remove deprecated otel elasticsearch exporter config *_dynamic_index (#8592) (#8603)
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. (cherry picked from commit 3b4f911) Co-authored-by: Carson Ip <[email protected]> Co-authored-by: Roger Coll <[email protected]>
1 parent 0b2194d commit b2e7b2e

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
@@ -610,12 +610,6 @@ collectors:
610610
endpoints: # List of Elasticsearch endpoints.
611611
- ${env:ELASTIC_ENDPOINT}
612612
api_key: ${env:ELASTIC_API_KEY} # API key for Elasticsearch authentication.
613-
logs_dynamic_index:
614-
enabled: true
615-
metrics_dynamic_index:
616-
enabled: true
617-
traces_dynamic_index:
618-
enabled: true
619613
# Enable in order to skip the SSL certificate Check
620614
# tls:
621615
# 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
@@ -99,24 +99,12 @@ exporters:
9999
api_key: ${env:ELASTIC_API_KEY}
100100
mapping:
101101
mode: ecs
102-
logs_dynamic_index:
103-
enabled: true
104-
metrics_dynamic_index:
105-
enabled: true
106-
traces_dynamic_index:
107-
enabled: true
108102

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

121109
service:
122110
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
@@ -90,23 +90,11 @@ exporters:
9090
api_key: ${env:ELASTIC_API_KEY}
9191
mapping:
9292
mode: ecs
93-
logs_dynamic_index:
94-
enabled: true
95-
metrics_dynamic_index:
96-
enabled: true
97-
traces_dynamic_index:
98-
enabled: true
9993
elasticsearch/otel:
10094
endpoints: [ "${env:ELASTIC_ENDPOINT}" ]
10195
api_key: ${env:ELASTIC_API_KEY}
10296
mapping:
10397
mode: otel
104-
logs_dynamic_index:
105-
enabled: true
106-
metrics_dynamic_index:
107-
enabled: true
108-
traces_dynamic_index:
109-
enabled: true
11098

11199
service:
112100
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
@@ -106,24 +106,12 @@ exporters:
106106
api_key: ${env:ELASTIC_API_KEY}
107107
mapping:
108108
mode: ecs
109-
logs_dynamic_index:
110-
enabled: true
111-
metrics_dynamic_index:
112-
enabled: true
113-
traces_dynamic_index:
114-
enabled: true
115109

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

128116
service:
129117
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
@@ -97,23 +97,11 @@ exporters:
9797
api_key: ${env:ELASTIC_API_KEY}
9898
mapping:
9999
mode: ecs
100-
logs_dynamic_index:
101-
enabled: true
102-
metrics_dynamic_index:
103-
enabled: true
104-
traces_dynamic_index:
105-
enabled: true
106100
elasticsearch/otel:
107101
endpoints: [ "${env:ELASTIC_ENDPOINT}" ]
108102
api_key: ${env:ELASTIC_API_KEY}
109103
mapping:
110104
mode: otel
111-
logs_dynamic_index:
112-
enabled: true
113-
metrics_dynamic_index:
114-
enabled: true
115-
traces_dynamic_index:
116-
enabled: true
117105

118106
service:
119107
extensions: [file_storage]

internal/pkg/otel/translate/otelconfig.go

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

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

0 commit comments

Comments
 (0)