Skip to content

Commit 41e41e5

Browse files
[9.1](backport #47873) cleanup(otel): move otelbeat packages to x-pack/otel (#48339)
* cleanup(otel): move otelbeat packages to x-pack/otel (#47873) Move the remaining otelbeat packages to x-pack/otel so that all otel-related code is centralized. (cherry picked from commit 8a10df6) # Conflicts: # .buildkite/x-pack/pipeline.xpack.otel.yml # libbeat/common/net_test.go # libbeat/otelbeat/oteltest/helper.go # x-pack/filebeat/fbreceiver/receiver_test.go # x-pack/filebeat/input/gcppubsub/otel_test.go # x-pack/filebeat/tests/integration/otel_lsexporter_test.go # x-pack/libbeat/cmd/instance/receiver.go # x-pack/libbeat/outputs/otelconsumer/otelconsumer.go # x-pack/metricbeat/mbreceiver/receiver_test.go # x-pack/otel/beatconverter/beatconverter.go # x-pack/otel/exporter/logstashexporter/exporter.go # x-pack/otel/exporter/logstashexporter/exporter_test.go # x-pack/otel/exporter/logstashexporter/exporter_tls_test.go # x-pack/otel/exporter/logstashexporter/internal/batch_test.go # x-pack/otel/exporter/logstashexporter/internal/event.go # x-pack/otel/exporter/logstashexporter/internal/event_test.go # x-pack/otel/extension/beatsauthextension/beatsauth_test.go # x-pack/otel/otelctx/otelctx.go # x-pack/otel/otelctx/otelctx_test.go # x-pack/otel/oteltest/helper.go # x-pack/otel/oteltest/tls_helper.go # x-pack/otel/oteltranslate/outputs/logstash/config_otel.go * fix imports * remove files not in 9.1 branch * remove unused oteltest import * remove otelctx package not in 9.1 branch --------- Co-authored-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
1 parent 6c27653 commit 41e41e5

33 files changed

Lines changed: 72 additions & 228 deletions

File tree

libbeat/otelbeat/beatconverter/logging.go

Lines changed: 0 additions & 38 deletions
This file was deleted.

x-pack/filebeat/fbreceiver/receiver_leak_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"go.uber.org/zap/zapcore"
2222
"go.uber.org/zap/zaptest/observer"
2323

24-
"github.com/elastic/beats/v7/libbeat/otelbeat/oteltest"
24+
"github.com/elastic/beats/v7/x-pack/otel/oteltest"
2525
)
2626

2727
func TestLeak(t *testing.T) {

x-pack/filebeat/fbreceiver/receiver_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
"sync/atomic"
2424
"testing"
2525

26-
"github.com/elastic/beats/v7/libbeat/otelbeat/oteltest"
26+
"github.com/elastic/beats/v7/x-pack/otel/oteltest"
2727
"github.com/elastic/elastic-agent-libs/mapstr"
2828

2929
"github.com/stretchr/testify/assert"

x-pack/filebeat/tests/integration/otel_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import (
3535

3636
libbeattesting "github.com/elastic/beats/v7/libbeat/testing"
3737
"github.com/elastic/beats/v7/libbeat/tests/integration"
38-
"github.com/elastic/beats/v7/x-pack/libbeat/common/otelbeat/oteltestcol"
38+
"github.com/elastic/beats/v7/x-pack/otel/oteltestcol"
3939
"github.com/elastic/elastic-agent-libs/mapstr"
4040
"github.com/elastic/elastic-agent-libs/testing/estools"
4141
"github.com/elastic/go-elasticsearch/v8"

x-pack/libbeat/cmd/instance/beat.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
"github.com/elastic/beats/v7/libbeat/publisher/pipeline"
2525
"github.com/elastic/beats/v7/libbeat/publisher/processing"
2626
"github.com/elastic/beats/v7/libbeat/version"
27-
"github.com/elastic/beats/v7/x-pack/libbeat/common/otelbeat/otelmanager"
27+
"github.com/elastic/beats/v7/x-pack/otel/otelmanager"
2828
"github.com/elastic/elastic-agent-libs/config"
2929
"github.com/elastic/elastic-agent-libs/keystore"
3030
"github.com/elastic/elastic-agent-libs/logp"

x-pack/libbeat/cmd/instance/beat_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import (
1616
"github.com/elastic/beats/v7/filebeat/cmd"
1717
"github.com/elastic/beats/v7/filebeat/input/log"
1818
"github.com/elastic/beats/v7/libbeat/management"
19-
"github.com/elastic/beats/v7/x-pack/libbeat/common/otelbeat/otelmanager"
19+
"github.com/elastic/beats/v7/x-pack/otel/otelmanager"
2020
conf "github.com/elastic/elastic-agent-libs/config"
2121
)
2222

x-pack/libbeat/cmd/instance/receiver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ import (
1616
"github.com/elastic/beats/v7/libbeat/cfgfile"
1717
"github.com/elastic/beats/v7/libbeat/cmd/instance"
1818
"github.com/elastic/beats/v7/libbeat/common/backoff"
19-
"github.com/elastic/beats/v7/x-pack/libbeat/common/otelbeat/otelmanager"
20-
"github.com/elastic/beats/v7/x-pack/libbeat/common/otelbeat/status"
2119
_ "github.com/elastic/beats/v7/x-pack/libbeat/include"
20+
"github.com/elastic/beats/v7/x-pack/otel/otelmanager"
21+
"github.com/elastic/beats/v7/x-pack/otel/status"
2222
"github.com/elastic/elastic-agent-libs/logp"
2323
"github.com/elastic/elastic-agent-libs/monitoring"
2424
metricreport "github.com/elastic/elastic-agent-system-metrics/report"

x-pack/libbeat/outputs/otelconsumer/otelconsumer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ import (
1515

1616
"github.com/elastic/beats/v7/libbeat/beat"
1717
"github.com/elastic/beats/v7/libbeat/common"
18-
"github.com/elastic/beats/v7/libbeat/otelbeat/otelmap"
1918
"github.com/elastic/beats/v7/libbeat/outputs"
2019
"github.com/elastic/beats/v7/libbeat/publisher"
20+
"github.com/elastic/beats/v7/x-pack/otel/otelmap"
2121
"github.com/elastic/elastic-agent-libs/config"
2222
"github.com/elastic/elastic-agent-libs/logp"
2323
"github.com/elastic/elastic-agent-libs/mapstr"

x-pack/metricbeat/mbreceiver/receiver_leak_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"go.uber.org/zap/zapcore"
2222
"go.uber.org/zap/zaptest/observer"
2323

24-
"github.com/elastic/beats/v7/libbeat/otelbeat/oteltest"
24+
"github.com/elastic/beats/v7/x-pack/otel/oteltest"
2525
)
2626

2727
func TestLeak(t *testing.T) {

x-pack/metricbeat/mbreceiver/receiver_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
"strings"
2222
"testing"
2323

24-
"github.com/elastic/beats/v7/libbeat/otelbeat/oteltest"
24+
"github.com/elastic/beats/v7/x-pack/otel/oteltest"
2525
"github.com/elastic/elastic-agent-libs/mapstr"
2626

2727
"github.com/stretchr/testify/assert"

0 commit comments

Comments
 (0)