Skip to content

Commit a045482

Browse files
authored
Make elasticsearchexporter available in Agent running in OTel mode (#4707)
* Make elasticsearch exporter available in Agent running in OTel mode * Reordering dependencies * Regenerating README * Adding CHANGELOG entry
1 parent 410c40c commit a045482

File tree

6 files changed

+534
-1
lines changed

6 files changed

+534
-1
lines changed

NOTICE.txt

+484
Large diffs are not rendered by default.
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: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Makes the `elasticsearchexporter` available to users running Elastic Agent in `otel` mode.
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/4707
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

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/elastic/elastic-agent
22

3-
go 1.21
3+
go 1.21.0
4+
5+
toolchain go1.21.8
46

57
require (
68
github.com/Microsoft/go-winio v0.6.1
@@ -85,6 +87,7 @@ require (
8587
// open telemetry dependencies
8688
// pinned to v0.97.0 due to issue with ports binding which causes our tests to fail
8789
// Do NOT upgrade the version beyond 0.97.0 until https://github.com/open-telemetry/opentelemetry-collector/issues/10031 is fixed!
90+
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.97.0
8891
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.97.0
8992
github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor v0.97.0
9093
github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourceprocessor v0.97.0
@@ -126,6 +129,7 @@ require (
126129
github.com/dnephin/pflag v1.0.7 // indirect
127130
github.com/docker/docker v25.0.5+incompatible // indirect
128131
github.com/docker/go-connections v0.5.0 // indirect
132+
github.com/elastic/go-elasticsearch/v7 v7.17.10 // indirect
129133
github.com/elastic/go-structform v0.0.10 // indirect
130134
github.com/elastic/go-windows v1.0.1 // indirect
131135
github.com/elastic/gosigar v0.14.3 // indirect
@@ -168,6 +172,7 @@ require (
168172
github.com/knadh/koanf/providers/confmap v0.1.0 // indirect
169173
github.com/knadh/koanf/v2 v2.1.1 // indirect
170174
github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b // indirect
175+
github.com/lestrrat-go/strftime v1.0.6 // indirect
171176
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
172177
github.com/mailru/easyjson v0.7.7 // indirect
173178
github.com/markbates/pkger v0.17.0 // indirect
@@ -185,6 +190,7 @@ require (
185190
github.com/mostynb/go-grpc-compression v1.2.2 // indirect
186191
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
187192
github.com/onsi/ginkgo/v2 v2.9.0 // indirect
193+
github.com/open-telemetry/opentelemetry-collector-contrib/internal/common v0.97.0 // indirect
188194
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.97.0 // indirect
189195
github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.97.0 // indirect
190196
github.com/open-telemetry/opentelemetry-collector-contrib/internal/sharedcomponent v0.97.0 // indirect

go.sum

+8
Original file line numberDiff line numberDiff line change
@@ -804,6 +804,8 @@ github.com/elastic/elastic-package v0.77.0/go.mod h1:Xeqx0OOVnKBfFoSHsHmKI74RxgR
804804
github.com/elastic/elastic-transport-go/v8 v8.5.0 h1:v5membAl7lvQgBTexPRDBO/RdnlQX+FM9fUVDyXxvH0=
805805
github.com/elastic/elastic-transport-go/v8 v8.5.0/go.mod h1:YLHer5cj0csTzNFXoNQ8qhtGY1GTvSqPnKWKaqQE3Hk=
806806
github.com/elastic/go-elasticsearch/v7 v7.17.7/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4=
807+
github.com/elastic/go-elasticsearch/v7 v7.17.10 h1:TCQ8i4PmIJuBunvBS6bwT2ybzVFxxUhhltAs3Gyu1yo=
808+
github.com/elastic/go-elasticsearch/v7 v7.17.10/go.mod h1:OJ4wdbtDNk5g503kvlHLyErCgQwwzmDtaFC4XyOxXA4=
807809
github.com/elastic/go-elasticsearch/v8 v8.0.0-20210317102009-a9d74cec0186/go.mod h1:xe9a/L2aeOgFKKgrO3ibQTnMdpAeL0GC+5/HpGScSa4=
808810
github.com/elastic/go-elasticsearch/v8 v8.13.1 h1:du5F8IzUUyCkzxyHdrO9AtopcG95I/qwi2WK8Kf1xlg=
809811
github.com/elastic/go-elasticsearch/v8 v8.13.1/go.mod h1:DIn7HopJs4oZC/w0WoJR13uMUxtHeq92eI5bqv5CRfI=
@@ -1322,6 +1324,10 @@ github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6Fm
13221324
github.com/leodido/ragel-machinery v0.0.0-20181214104525-299bdde78165/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg=
13231325
github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b h1:11UHH39z1RhZ5dc4y4r/4koJo6IYFgTRMe/LlwRTEw0=
13241326
github.com/leodido/ragel-machinery v0.0.0-20190525184631-5f46317e436b/go.mod h1:WZxr2/6a/Ar9bMDc2rN/LJrE/hF6bXE4LPyDSIxwAfg=
1327+
github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc h1:RKf14vYWi2ttpEmkA4aQ3j4u9dStX2t4M8UM6qqNsG8=
1328+
github.com/lestrrat-go/envload v0.0.0-20180220234015-a3eb8ddeffcc/go.mod h1:kopuH9ugFRkIXf3YoqHKyrJ9YfUFsckUU9S7B+XP+is=
1329+
github.com/lestrrat-go/strftime v1.0.6 h1:CFGsDEt1pOpFNU+TJB0nhz9jl+K0hZSLE205AhTIGQQ=
1330+
github.com/lestrrat-go/strftime v1.0.6/go.mod h1:f7jQKgV5nnJpYgdEasS+/y7EsTb8ykN2z68n3TtcTaw=
13251331
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
13261332
github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
13271333
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9B/r2mtpb6U+EI2rYA5OAXxsYw6wTamcNW+zcE=
@@ -1519,6 +1525,8 @@ github.com/onsi/gomega v1.22.1/go.mod h1:x6n7VNe4hw0vkyYUM4mjIXx3JbLiPaBPNgB7PRQ
15191525
github.com/onsi/gomega v1.23.0/go.mod h1:Z/NWtiqwBrwUt4/2loMmHL63EDLnYHmVbuBpDr2vQAg=
15201526
github.com/onsi/gomega v1.27.3 h1:5VwIwnBY3vbBDOJrNtA4rVdiTZCsq9B5F12pvy1Drmk=
15211527
github.com/onsi/gomega v1.27.3/go.mod h1:5vG284IBtfDAmDyrK+eGyZmUgUlmi+Wngqo557cZ6Gw=
1528+
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.97.0 h1:VDx9u2xhgrjb0ozp2/SDeSF0cGZ0ECP4KSSQT8jOo5U=
1529+
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter v0.97.0/go.mod h1:PXX2jvijwqSwoS2wR/kNqeW3YLH9FcWIkJp4GBOGlVE=
15221530
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.97.0 h1:hiLEBltXVuC1aTxp8J/6dJv0qu1dLJMFvmU7BJSlWoM=
15231531
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter v0.97.0/go.mod h1:tkySqhV+P3MZI0GhbSHFFs4dkYlUjFqUDm+L9AIdU4I=
15241532
github.com/open-telemetry/opentelemetry-collector-contrib/extension/encoding v0.97.0 h1:HgmPxcExu/+JEe0SAH3nCwE/tXXtZR8piQLukFNwKZM=

internal/pkg/otel/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ This section provides a summary of components included in the Elastic Distributi
4141

4242
| Component | Version |
4343
|---|---|
44+
| elasticsearchexporter | v0.97.0|
4445
| fileexporter | v0.97.0|
4546
| debugexporter | v0.97.0|
4647
| otlpexporter | v0.97.0|

internal/pkg/otel/components.go

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"go.opentelemetry.io/collector/processor/memorylimiterprocessor" // for putting backpressure when approach a memory limit
2323

2424
// Exporters:
25+
"github.com/open-telemetry/opentelemetry-collector-contrib/exporter/elasticsearchexporter"
2526
fileexporter "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/fileexporter" // for e2e tests
2627
debugexporter "go.opentelemetry.io/collector/exporter/debugexporter" // for dev
2728
"go.opentelemetry.io/collector/exporter/otlpexporter"
@@ -57,6 +58,7 @@ func components() (otelcol.Factories, error) {
5758
otlpexporter.NewFactory(),
5859
debugexporter.NewFactory(),
5960
fileexporter.NewFactory(),
61+
elasticsearchexporter.NewFactory(),
6062
)
6163
if err != nil {
6264
return otelcol.Factories{}, err

0 commit comments

Comments
 (0)