Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Moves internal/kafka To pkg/kafka #33181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .chloggen/move_internal_kafka_to_pkg.yaml
Original file line number Diff line number Diff line change
@@ -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]
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ internal/filter/ @open-telemetry/collector-cont
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
Expand All @@ -148,6 +147,7 @@ pkg/batchpersignal/ @open-telemetry/collector-cont
pkg/datadog/ @open-telemetry/collector-contrib-approvers @mx-psi @dineshg13 @liustanley @songy23 @mackjmr @ankitpatel96 @jade-guiton-dd
pkg/experimentalmetricmetadata/ @open-telemetry/collector-contrib-approvers @dmitryax
pkg/golden/ @open-telemetry/collector-contrib-approvers @djaglowski @atoulme
pkg/kafka/ @open-telemetry/collector-contrib-approvers @pavolloffay @MovieStoreGuy
pkg/kafka/topic/ @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
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ body:
- internal/grpcutil
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- internal/kubelet
- internal/metadataproviders
- internal/otelarrow
Expand All @@ -148,6 +147,7 @@ body:
- pkg/experimentalmetricmetadata
- pkg/golden
- pkg/kafka/topic
- pkg/kafka
- pkg/ottl
- pkg/pdatatest
- pkg/pdatautil
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ body:
- internal/grpcutil
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- internal/kubelet
- internal/metadataproviders
- internal/otelarrow
Expand All @@ -142,6 +141,7 @@ body:
- pkg/experimentalmetricmetadata
- pkg/golden
- pkg/kafka/topic
- pkg/kafka
- pkg/ottl
- pkg/pdatatest
- pkg/pdatautil
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/other.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ body:
- internal/grpcutil
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- internal/kubelet
- internal/metadataproviders
- internal/otelarrow
Expand All @@ -142,6 +141,7 @@ body:
- pkg/experimentalmetricmetadata
- pkg/golden
- pkg/kafka/topic
- pkg/kafka
- pkg/ottl
- pkg/pdatatest
- pkg/pdatautil
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/unmaintained.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ body:
- internal/grpcutil
- internal/k8sconfig
- internal/k8stest
- internal/kafka
- internal/kubelet
- internal/metadataproviders
- internal/otelarrow
Expand All @@ -147,6 +146,7 @@ body:
- pkg/experimentalmetricmetadata
- pkg/golden
- pkg/kafka/topic
- pkg/kafka
- pkg/ottl
- pkg/pdatatest
- pkg/pdatautil
Expand Down
2 changes: 1 addition & 1 deletion cmd/otelcontribcol/builder-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,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
Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions exporter/kafkaexporter/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/jaegertracing/jaeger v1.62.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/batchpersignal v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka/topic v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/pdatautil v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0
Expand Down Expand Up @@ -115,7 +115,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

Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/kafka_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion exporter/kafkaexporter/kafka_exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -14,7 +14,7 @@ import (
"github.com/aws/aws-msk-iam-sasl-signer-go/signer"
"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.
Expand Down
2 changes: 1 addition & 1 deletion internal/kafka/awsmsk/doc.go → pkg/kafka/awsmsk/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion internal/kafka/go.mod → pkg/kafka/go.mod
Original file line number Diff line number Diff line change
@@ -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

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions receiver/kafkametricsreceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.115.0
github.com/stretchr/testify v1.10.0
go.opentelemetry.io/collector/component v0.115.1-0.20241206185113-3f3e208e71b8
go.opentelemetry.io/collector/component/componenttest v0.115.1-0.20241206185113-3f3e208e71b8
Expand Down Expand Up @@ -98,7 +98,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
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"go.opentelemetry.io/collector/receiver/scraperhelper"
"go.opentelemetry.io/collector/scraper"

"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"
)

Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkametricsreceiver/receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"go.opentelemetry.io/collector/receiver/receivertest"
"go.opentelemetry.io/collector/scraper"

"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) {
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
4 changes: 2 additions & 2 deletions receiver/kafkareceiver/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ require (
github.com/json-iterator/go v1.1.12
github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/coreinternal v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/kafka v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/kafka v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/azure v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/jaeger v0.115.0
github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/zipkin v0.115.0
Expand Down Expand Up @@ -121,7 +121,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

Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/kafka_receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,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"
)

Expand Down
2 changes: 1 addition & 1 deletion receiver/kafkareceiver/kafka_receiver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down
2 changes: 1 addition & 1 deletion versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,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
Expand Down
Loading