Skip to content

Commit 986816d

Browse files
mergify[bot]andrzej-stencelswiatekm
authored
[9.1] (backport #9858) feat: Update OTel Collector components to v0.135.0 (#10849)
* feat: Update OTel Collector components to v0.135.0 (#9858) * feat: Update OTel Collector components to v0.135.0 * chore: update Elastic OTel components go get github.com/elastic/opentelemetry-collector-components/connector/elasticapmconnector go get github.com/elastic/opentelemetry-collector-components/extension/apikeyauthextension go get github.com/elastic/opentelemetry-collector-components/extension/apmconfigextension go get github.com/elastic/opentelemetry-collector-components/processor/elasticinframetricsprocessor github.com/elastic/opentelemetry-collector-components/processor/elastictraceprocessor go get github.com/elastic/opentelemetry-collector-components/receiver/elasticapmintakereceiver * test: fix test after upstream change Logging was changed in open-telemetry/opentelemetry-collector#13606 * test: update gotestsum to latest Not sure why it got downgraded to v1.7.0 * use Beats from branch to verify CI This commit must be reverted before merging this PR. It temporarily replaces Beats dependency with elastic/beats#46464 to see if CI is happy with it, and to fix any remaining failures without waiting for that PR to be merged. * test: fix unit test * revert "use Beats from branch to verify CI" This reverts 4813ce3. * update Beats to 16c4d9a1aa8c This Beats commit has the update to OTel v0.135.0. * fix collector's metric names Without this replacement, some of the collector's internal metric names are broken. This has been broken since: - v9.1.3 in v9.1.x - v8.19.3 in v8.19.x See open-telemetry/opentelemetry-go#7039. See https://cloud-native.slack.com/archives/C01N6P7KR6W/p1757442690145329. * update go-mod-replace allowlist * mage notice --------- Co-authored-by: Christos Markou <[email protected]> (cherry picked from commit ecb0e06) # Conflicts: # NOTICE-fips.txt # NOTICE.txt # go.mod # go.sum # internal/pkg/otel/README.md * Fix conflicts * Fix unit tests * Fix an api change in mockes * Revert "Fix unit tests" This reverts commit 81ea886. * Bump beats dependency and fix tests * mage notice --------- Co-authored-by: Andrzej Stencel <[email protected]> Co-authored-by: Mikołaj Świątek <[email protected]>
1 parent ae007ca commit 986816d

File tree

13 files changed

+3738
-5689
lines changed

13 files changed

+3738
-5689
lines changed

.ci/scripts/update-otel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@ else
5252
fi
5353
elastic-agent-changelog-tool new "$changelog_fragment_name"
5454
sed -i.bak "s/^kind:.*$/kind: enhancement/" ./changelog/fragments/*-"${changelog_fragment_name}".yaml
55-
sed -i.bak "s/^summary:.*$/summary: Update OTel components to ${next_contrib}/" ./changelog/fragments/*-"${changelog_fragment_name}".yaml
55+
sed -i.bak "s/^summary:.*$/summary: Update OTel Collector components to ${next_contrib}/" ./changelog/fragments/*-"${changelog_fragment_name}".yaml
5656
sed -i.bak "s/^component:.*$/component: elastic-agent/" ./changelog/fragments/*-"${changelog_fragment_name}".yaml
5757
rm ./changelog/fragments/*-"${changelog_fragment_name}".yaml.bak

.golangci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ linters:
5959
- github.com/google/gopacket
6060
- github.com/insomniacslk/dhcp
6161
- github.com/meraki/dashboard-api-go/v3
62+
- go.opentelemetry.io/otel/exporters/prometheus
6263
replace-local: false
6364
gomodguard:
6465
blocked:

NOTICE-fips.txt

Lines changed: 1530 additions & 2509 deletions
Large diffs are not rendered by default.

NOTICE.txt

Lines changed: 1405 additions & 2415 deletions
Large diffs are not rendered by default.
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: Update OTel Collector components to v0.135.0
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/owner/repo/1234
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

go.mod

Lines changed: 222 additions & 214 deletions
Large diffs are not rendered by default.

go.sum

Lines changed: 485 additions & 483 deletions
Large diffs are not rendered by default.

internal/pkg/otel/README.md

Lines changed: 53 additions & 53 deletions
Large diffs are not rendered by default.

internal/pkg/otel/manager/manager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ func TestOTelManager_Logging(t *testing.T) {
273273
logs := obs.All()
274274
require.NotEmpty(collect, logs, "Logs should not be empty")
275275
firstMessage := logs[0].Message
276-
assert.Equal(collect, firstMessage, "Setting up own telemetry...")
276+
assert.Equal(collect, "Internal metrics telemetry disabled", firstMessage)
277277
}, time.Second*10, time.Second)
278278
}
279279

internal/pkg/otel/translate/otelconfig_test.go

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -292,23 +292,18 @@ func TestGetOtelConfig(t *testing.T) {
292292
"block_on_overflow": true,
293293
"wait_for_result": true,
294294
"batch": map[string]any{
295-
"max_size": 1600,
296-
"min_size": 0,
297-
"sizer": "items",
295+
"flush_timeout": "10s",
296+
"max_size": 1600,
297+
"min_size": 0,
298+
"sizer": "items",
298299
},
299300
},
300301
"logs_dynamic_id": map[string]any{
301302
"enabled": true,
302303
},
303-
"timeout": 90 * time.Second,
304-
"idle_conn_timeout": 3 * time.Second,
305304
"auth": map[string]any{
306305
"authenticator": "beatsauth/_agent-component/" + outputName,
307306
},
308-
"tls": map[string]any{
309-
"min_version": "1.2",
310-
"max_version": "1.3",
311-
},
312307
}
313308
}
314309

0 commit comments

Comments
 (0)