From fad072e9e71a844794fa8ee61f78d42372009f5b Mon Sep 17 00:00:00 2001 From: Trece Wicklander-Bryant Date: Tue, 21 May 2024 16:35:37 -0700 Subject: [PATCH] chore: Moves internal/kafka To pkg/kafka --- .chloggen/move_internal_kafka_to_pkg.yaml | 27 +++++++++++++++++++ .github/CODEOWNERS | 2 +- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- .github/ISSUE_TEMPLATE/other.yaml | 2 +- .github/ISSUE_TEMPLATE/unmaintained.yaml | 2 +- cmd/otelcontribcol/builder-config.yaml | 2 +- cmd/otelcontribcol/go.mod | 8 +++--- exporter/kafkaexporter/config.go | 2 +- exporter/kafkaexporter/config_test.go | 2 +- exporter/kafkaexporter/go.mod | 4 +-- exporter/kafkaexporter/kafka_exporter.go | 2 +- exporter/kafkaexporter/kafka_exporter_test.go | 2 +- {internal => pkg}/kafka/Makefile | 0 {internal => pkg}/kafka/authentication.go | 4 +-- .../kafka/authentication_test.go | 0 {internal => pkg}/kafka/awsmsk/doc.go | 2 +- .../kafka/awsmsk/iam_scram_client.go | 2 +- .../kafka/awsmsk/iam_scram_client_test.go | 0 .../kafka/awsmsk/package_test.go | 0 {internal => pkg}/kafka/go.mod | 2 +- {internal => pkg}/kafka/go.sum | 0 {internal => pkg}/kafka/metadata.yaml | 0 {internal => pkg}/kafka/package_test.go | 0 {internal => pkg}/kafka/scram_client.go | 2 +- receiver/kafkametricsreceiver/config.go | 2 +- receiver/kafkametricsreceiver/config_test.go | 2 +- receiver/kafkametricsreceiver/go.mod | 4 +-- receiver/kafkametricsreceiver/receiver.go | 2 +- .../kafkametricsreceiver/receiver_test.go | 2 +- receiver/kafkareceiver/config.go | 2 +- receiver/kafkareceiver/config_test.go | 2 +- receiver/kafkareceiver/go.mod | 4 +-- receiver/kafkareceiver/kafka_receiver.go | 2 +- receiver/kafkareceiver/kafka_receiver_test.go | 2 +- versions.yaml | 2 +- 36 files changed, 62 insertions(+), 35 deletions(-) create mode 100644 .chloggen/move_internal_kafka_to_pkg.yaml rename {internal => pkg}/kafka/Makefile (100%) rename {internal => pkg}/kafka/authentication.go (97%) rename {internal => pkg}/kafka/authentication_test.go (100%) rename {internal => pkg}/kafka/awsmsk/doc.go (90%) rename {internal => pkg}/kafka/awsmsk/iam_scram_client.go (99%) rename {internal => pkg}/kafka/awsmsk/iam_scram_client_test.go (100%) rename {internal => pkg}/kafka/awsmsk/package_test.go (100%) rename {internal => pkg}/kafka/go.mod (99%) rename {internal => pkg}/kafka/go.sum (100%) rename {internal => pkg}/kafka/metadata.yaml (100%) rename {internal => pkg}/kafka/package_test.go (100%) rename {internal => pkg}/kafka/scram_client.go (97%) diff --git a/.chloggen/move_internal_kafka_to_pkg.yaml b/.chloggen/move_internal_kafka_to_pkg.yaml new file mode 100644 index 000000000000..8053604a1689 --- /dev/null +++ b/.chloggen/move_internal_kafka_to_pkg.yaml @@ -0,0 +1,27 @@ +# Use this changelog template to create an entry for release notes. + +# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix' +change_type: enhancement + +# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver) +component: kafkainternal + +# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`). +note: moves internal/kafka to pkg/kafka to allow config to be visible for downstream projects + +# Mandatory: One or more tracking issues related to the change. You can use the PR number here if no issue exists. +issues: [33180] + +# (Optional) One or more lines of additional information to render under the primary note. +# These lines will be padded with 2 spaces and then inserted directly into the document. +# Use pipe (|) for multiline entries. +subtext: + +# If your change doesn't affect end users or the exported elements of any package, +# you should instead start your pull request title with [chore] or use the "Skip Changelog" label. +# Optional: The change log or logs in which this entry should be included. +# e.g. '[user]' or '[user, api]' +# Include 'user' if the change is relevant to end users. +# Include 'api' if there is a change to a library API. +# Default: '[user]' +change_logs: [user, api] \ No newline at end of file diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 70a5e095cb32..f6e7b7b80a8c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -132,7 +132,6 @@ internal/filter/ @open-teleme internal/grpcutil/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 @lquerel internal/k8sconfig/ @open-telemetry/collector-contrib-approvers @dmitryax internal/k8stest/ @open-telemetry/collector-contrib-approvers @crobert-1 -internal/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy internal/kubelet/ @open-telemetry/collector-contrib-approvers @dmitryax internal/metadataproviders/ @open-telemetry/collector-contrib-approvers @Aneurysm9 @dashpole internal/otelarrow/ @open-telemetry/collector-contrib-approvers @jmacd @moh-osman3 @@ -149,6 +148,7 @@ pkg/datadog/ @open-teleme pkg/experimentalmetricmetadata/ @open-telemetry/collector-contrib-approvers @rmfitzpatrick pkg/golden/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme pkg/kafka/topic/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy +pkg/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy pkg/ottl/ @open-telemetry/collector-contrib-approvers @TylerHelmuth @kentquirk @bogdandrutu @evan-bradley pkg/pdatatest/ @open-telemetry/collector-contrib-approvers @djaglowski @fatsheep9146 pkg/pdatautil/ @open-telemetry/collector-contrib-approvers @dmitryax diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index b705cbecfb53..15f522c2ffbd 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -129,7 +129,6 @@ body: - internal/grpcutil - internal/k8sconfig - internal/k8stest - - internal/kafka - internal/kubelet - internal/metadataproviders - internal/otelarrow @@ -145,6 +144,7 @@ body: - pkg/experimentalmetricmetadata - pkg/golden - pkg/kafka/topic + - pkg/kafka - pkg/ottl - pkg/pdatatest - pkg/pdatautil diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 8ec681fa0a67..03f6b158a230 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -123,7 +123,6 @@ body: - internal/grpcutil - internal/k8sconfig - internal/k8stest - - internal/kafka - internal/kubelet - internal/metadataproviders - internal/otelarrow @@ -139,6 +138,7 @@ body: - pkg/experimentalmetricmetadata - pkg/golden - pkg/kafka/topic + - pkg/kafka - pkg/ottl - pkg/pdatatest - pkg/pdatautil diff --git a/.github/ISSUE_TEMPLATE/other.yaml b/.github/ISSUE_TEMPLATE/other.yaml index b0098510b798..604a0d426e81 100644 --- a/.github/ISSUE_TEMPLATE/other.yaml +++ b/.github/ISSUE_TEMPLATE/other.yaml @@ -123,7 +123,6 @@ body: - internal/grpcutil - internal/k8sconfig - internal/k8stest - - internal/kafka - internal/kubelet - internal/metadataproviders - internal/otelarrow @@ -139,6 +138,7 @@ body: - pkg/experimentalmetricmetadata - pkg/golden - pkg/kafka/topic + - pkg/kafka - pkg/ottl - pkg/pdatatest - pkg/pdatautil diff --git a/.github/ISSUE_TEMPLATE/unmaintained.yaml b/.github/ISSUE_TEMPLATE/unmaintained.yaml index df65436ba755..5cf21f412661 100644 --- a/.github/ISSUE_TEMPLATE/unmaintained.yaml +++ b/.github/ISSUE_TEMPLATE/unmaintained.yaml @@ -128,7 +128,6 @@ body: - internal/grpcutil - internal/k8sconfig - internal/k8stest - - internal/kafka - internal/kubelet - internal/metadataproviders - internal/otelarrow @@ -144,6 +143,7 @@ body: - pkg/experimentalmetricmetadata - pkg/golden - pkg/kafka/topic + - pkg/kafka - pkg/ottl - pkg/pdatatest - pkg/pdatautil diff --git a/cmd/otelcontribcol/builder-config.yaml b/cmd/otelcontribcol/builder-config.yaml index 1f74a1afc813..fc0d9da03579 100644 --- a/cmd/otelcontribcol/builder-config.yaml +++ b/cmd/otelcontribcol/builder-config.yaml @@ -357,8 +357,8 @@ replaces: - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/azuredataexplorerexporter => ../../exporter/azuredataexplorerexporter - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig => ../../internal/k8sconfig - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka - github.com/open-telemetry/opentelemetry-collector-contrib/internal/rabbitmq => ../../internal/rabbitmq + - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka - github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver => ../../receiver/carbonreceiver - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter => ../../exporter/splunkhecexporter - github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter => ../../exporter/prometheusexporter diff --git a/cmd/otelcontribcol/go.mod b/cmd/otelcontribcol/go.mod index b7e700192bfb..1c1bb8e2e139 100644 --- a/cmd/otelcontribcol/go.mod +++ b/cmd/otelcontribcol/go.mod @@ -4,7 +4,7 @@ module github.com/open-telemetry/opentelemetry-collector-contrib/cmd/otelcontrib go 1.22.0 -toolchain go1.22.7 +toolchain go1.22.4 require ( github.com/open-telemetry/opentelemetry-collector-contrib/confmap/provider/s3provider v0.110.0 @@ -641,7 +641,6 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/internal/filter v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.110.0 // indirect - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/internal/otelarrow v0.110.0 // indirect @@ -654,6 +653,7 @@ require ( github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/datadog v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/experimentalmetricmetadata v0.110.0 // indirect + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl v0.110.0 // indirect github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.110.0 // indirect @@ -1108,10 +1108,10 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sco replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest => ../../internal/k8stest -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka - replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/rabbitmq => ../../internal/rabbitmq +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka + replace github.com/open-telemetry/opentelemetry-collector-contrib/receiver/carbonreceiver => ../../receiver/carbonreceiver replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/splunkhecexporter => ../../exporter/splunkhecexporter diff --git a/exporter/kafkaexporter/config.go b/exporter/kafkaexporter/config.go index 09968dd6a7b7..75114da7d39c 100644 --- a/exporter/kafkaexporter/config.go +++ b/exporter/kafkaexporter/config.go @@ -12,7 +12,7 @@ import ( "go.opentelemetry.io/collector/config/configretry" "go.opentelemetry.io/collector/exporter/exporterhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" ) // Config defines configuration for Kafka exporter. diff --git a/exporter/kafkaexporter/config_test.go b/exporter/kafkaexporter/config_test.go index d019a9dab62b..446c89d96b6e 100644 --- a/exporter/kafkaexporter/config_test.go +++ b/exporter/kafkaexporter/config_test.go @@ -19,7 +19,7 @@ import ( "go.opentelemetry.io/collector/exporter/exporterhelper" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter/internal/metadata" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" ) func TestLoadConfig(t *testing.T) { diff --git a/exporter/kafkaexporter/go.mod b/exporter/kafkaexporter/go.mod index c4178927629d..bdf3d23d90f6 100644 --- a/exporter/kafkaexporter/go.mod +++ b/exporter/kafkaexporter/go.mod @@ -8,8 +8,8 @@ require ( github.com/gogo/protobuf v1.3.2 github.com/jaegertracing/jaeger v1.61.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.110.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.110.0 @@ -98,7 +98,7 @@ require ( replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal => ../../pkg/batchpersignal diff --git a/exporter/kafkaexporter/kafka_exporter.go b/exporter/kafkaexporter/kafka_exporter.go index fe3130cecc9c..469b4d4ba76d 100644 --- a/exporter/kafkaexporter/kafka_exporter.go +++ b/exporter/kafkaexporter/kafka_exporter.go @@ -18,7 +18,7 @@ import ( "go.opentelemetry.io/collector/pdata/ptrace" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic" ) diff --git a/exporter/kafkaexporter/kafka_exporter_test.go b/exporter/kafkaexporter/kafka_exporter_test.go index c229b2829890..9a1c6d6816ef 100644 --- a/exporter/kafkaexporter/kafka_exporter_test.go +++ b/exporter/kafkaexporter/kafka_exporter_test.go @@ -22,7 +22,7 @@ import ( "go.opentelemetry.io/collector/pdata/testdata" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic" ) diff --git a/internal/kafka/Makefile b/pkg/kafka/Makefile similarity index 100% rename from internal/kafka/Makefile rename to pkg/kafka/Makefile diff --git a/internal/kafka/authentication.go b/pkg/kafka/authentication.go similarity index 97% rename from internal/kafka/authentication.go rename to pkg/kafka/authentication.go index d6e48b4bc95c..4ed3d7f4a455 100644 --- a/internal/kafka/authentication.go +++ b/pkg/kafka/authentication.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" +package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" import ( "context" @@ -12,7 +12,7 @@ import ( "github.com/IBM/sarama" "go.opentelemetry.io/collector/config/configtls" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/awsmsk" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/awsmsk" ) // Authentication defines authentication. diff --git a/internal/kafka/authentication_test.go b/pkg/kafka/authentication_test.go similarity index 100% rename from internal/kafka/authentication_test.go rename to pkg/kafka/authentication_test.go diff --git a/internal/kafka/awsmsk/doc.go b/pkg/kafka/awsmsk/doc.go similarity index 90% rename from internal/kafka/awsmsk/doc.go rename to pkg/kafka/awsmsk/doc.go index 94ac3cee7d7a..a0afa5b54832 100644 --- a/internal/kafka/awsmsk/doc.go +++ b/pkg/kafka/awsmsk/doc.go @@ -7,4 +7,4 @@ // Further details on how the SASL connector works can be viewed here: // // https://github.com/aws/aws-msk-iam-auth#details -package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/awsmsk" +package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/awsmsk" diff --git a/internal/kafka/awsmsk/iam_scram_client.go b/pkg/kafka/awsmsk/iam_scram_client.go similarity index 99% rename from internal/kafka/awsmsk/iam_scram_client.go rename to pkg/kafka/awsmsk/iam_scram_client.go index b7098a322c9f..ba82cfff4d64 100644 --- a/internal/kafka/awsmsk/iam_scram_client.go +++ b/pkg/kafka/awsmsk/iam_scram_client.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka/awsmsk" +package awsmsk // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/awsmsk" import ( "encoding/json" diff --git a/internal/kafka/awsmsk/iam_scram_client_test.go b/pkg/kafka/awsmsk/iam_scram_client_test.go similarity index 100% rename from internal/kafka/awsmsk/iam_scram_client_test.go rename to pkg/kafka/awsmsk/iam_scram_client_test.go diff --git a/internal/kafka/awsmsk/package_test.go b/pkg/kafka/awsmsk/package_test.go similarity index 100% rename from internal/kafka/awsmsk/package_test.go rename to pkg/kafka/awsmsk/package_test.go diff --git a/internal/kafka/go.mod b/pkg/kafka/go.mod similarity index 99% rename from internal/kafka/go.mod rename to pkg/kafka/go.mod index d9546864bf18..693477cea3d7 100644 --- a/internal/kafka/go.mod +++ b/pkg/kafka/go.mod @@ -1,4 +1,4 @@ -module github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka +module github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka go 1.22.0 diff --git a/internal/kafka/go.sum b/pkg/kafka/go.sum similarity index 100% rename from internal/kafka/go.sum rename to pkg/kafka/go.sum diff --git a/internal/kafka/metadata.yaml b/pkg/kafka/metadata.yaml similarity index 100% rename from internal/kafka/metadata.yaml rename to pkg/kafka/metadata.yaml diff --git a/internal/kafka/package_test.go b/pkg/kafka/package_test.go similarity index 100% rename from internal/kafka/package_test.go rename to pkg/kafka/package_test.go diff --git a/internal/kafka/scram_client.go b/pkg/kafka/scram_client.go similarity index 97% rename from internal/kafka/scram_client.go rename to pkg/kafka/scram_client.go index 0c3f83d8baaf..8d82fdc80ad5 100644 --- a/internal/kafka/scram_client.go +++ b/pkg/kafka/scram_client.go @@ -1,7 +1,7 @@ // Copyright The OpenTelemetry Authors // SPDX-License-Identifier: Apache-2.0 -package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" +package kafka // import "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" import ( "github.com/IBM/sarama" diff --git a/receiver/kafkametricsreceiver/config.go b/receiver/kafkametricsreceiver/config.go index 8b45224ea486..175092531763 100644 --- a/receiver/kafkametricsreceiver/config.go +++ b/receiver/kafkametricsreceiver/config.go @@ -6,7 +6,7 @@ package kafkametricsreceiver // import "github.com/open-telemetry/opentelemetry- import ( "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver/internal/metadata" ) diff --git a/receiver/kafkametricsreceiver/config_test.go b/receiver/kafkametricsreceiver/config_test.go index 63506b66c2ab..3b4d0ac040d9 100644 --- a/receiver/kafkametricsreceiver/config_test.go +++ b/receiver/kafkametricsreceiver/config_test.go @@ -14,7 +14,7 @@ import ( "go.opentelemetry.io/collector/confmap/confmaptest" "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkametricsreceiver/internal/metadata" ) diff --git a/receiver/kafkametricsreceiver/go.mod b/receiver/kafkametricsreceiver/go.mod index ba837c70339d..062975e87642 100644 --- a/receiver/kafkametricsreceiver/go.mod +++ b/receiver/kafkametricsreceiver/go.mod @@ -5,7 +5,7 @@ go 1.22.0 require ( github.com/IBM/sarama v1.43.3 github.com/google/go-cmp v0.6.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.110.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.110.0 github.com/stretchr/testify v1.9.0 go.opentelemetry.io/collector/component v0.110.0 go.opentelemetry.io/collector/config/configtls v1.16.0 @@ -83,7 +83,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka // see https://github.com/distribution/distribution/issues/3590 exclude github.com/docker/distribution v2.8.0+incompatible diff --git a/receiver/kafkametricsreceiver/receiver.go b/receiver/kafkametricsreceiver/receiver.go index 0a5e66c2b21a..9ee522be4690 100644 --- a/receiver/kafkametricsreceiver/receiver.go +++ b/receiver/kafkametricsreceiver/receiver.go @@ -13,7 +13,7 @@ import ( "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" ) type createKafkaScraper func(context.Context, Config, *sarama.Config, receiver.Settings) (scraperhelper.Scraper, error) diff --git a/receiver/kafkametricsreceiver/receiver_test.go b/receiver/kafkametricsreceiver/receiver_test.go index 455cc797ae04..7d1cf36a9023 100644 --- a/receiver/kafkametricsreceiver/receiver_test.go +++ b/receiver/kafkametricsreceiver/receiver_test.go @@ -17,7 +17,7 @@ import ( "go.opentelemetry.io/collector/receiver/receivertest" "go.opentelemetry.io/collector/receiver/scraperhelper" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" ) func TestNewReceiver_invalid_version_err(t *testing.T) { diff --git a/receiver/kafkareceiver/config.go b/receiver/kafkareceiver/config.go index 5b25c7c7c5f3..7370b7d239dc 100644 --- a/receiver/kafkareceiver/config.go +++ b/receiver/kafkareceiver/config.go @@ -9,7 +9,7 @@ import ( "go.opentelemetry.io/collector/component" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" ) type AutoCommit struct { diff --git a/receiver/kafkareceiver/config_test.go b/receiver/kafkareceiver/config_test.go index 2eb643b4275e..fd6b7e19d1ad 100644 --- a/receiver/kafkareceiver/config_test.go +++ b/receiver/kafkareceiver/config_test.go @@ -15,7 +15,7 @@ import ( "go.opentelemetry.io/collector/confmap/confmaptest" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver/internal/metadata" ) diff --git a/receiver/kafkareceiver/go.mod b/receiver/kafkareceiver/go.mod index 8b1557c65db8..e4cc7bf59364 100644 --- a/receiver/kafkareceiver/go.mod +++ b/receiver/kafkareceiver/go.mod @@ -10,7 +10,7 @@ require ( github.com/json-iterator/go v1.1.12 github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.110.0 - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.110.0 + github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.110.0 github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.110.0 @@ -106,7 +106,7 @@ replace github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafka replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal => ../../internal/coreinternal -replace github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka => ../../internal/kafka +replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka => ../../pkg/kafka replace github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger => ../../pkg/translator/jaeger diff --git a/receiver/kafkareceiver/kafka_receiver.go b/receiver/kafkareceiver/kafka_receiver.go index 750955366816..f9551d271b7a 100644 --- a/receiver/kafkareceiver/kafka_receiver.go +++ b/receiver/kafkareceiver/kafka_receiver.go @@ -23,7 +23,7 @@ import ( "go.opentelemetry.io/otel/metric" "go.uber.org/zap" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver/internal/metadata" ) diff --git a/receiver/kafkareceiver/kafka_receiver_test.go b/receiver/kafkareceiver/kafka_receiver_test.go index 9313ff805f1d..e90356185964 100644 --- a/receiver/kafkareceiver/kafka_receiver_test.go +++ b/receiver/kafkareceiver/kafka_receiver_test.go @@ -31,7 +31,7 @@ import ( "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal/textutils" - "github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka" + "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/kafkareceiver/internal/metadata" ) diff --git a/versions.yaml b/versions.yaml index 97410901355c..92d395c000a2 100644 --- a/versions.yaml +++ b/versions.yaml @@ -128,7 +128,7 @@ module-sets: - github.com/open-telemetry/opentelemetry-collector-contrib/internal/grpcutil - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig - github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest - - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka + - github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka - github.com/open-telemetry/opentelemetry-collector-contrib/internal/kubelet - github.com/open-telemetry/opentelemetry-collector-contrib/internal/metadataproviders - github.com/open-telemetry/opentelemetry-collector-contrib/internal/pdatautil