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] Move back receiver definitions, make profile embed receiver #11254

Merged
merged 1 commit into from
Sep 26, 2024
Merged
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
212 changes: 0 additions & 212 deletions receiver/internal/factory.go

This file was deleted.

15 changes: 0 additions & 15 deletions receiver/internal/logs.go

This file was deleted.

15 changes: 0 additions & 15 deletions receiver/internal/metrics.go

This file was deleted.

15 changes: 0 additions & 15 deletions receiver/internal/profiles.go

This file was deleted.

17 changes: 0 additions & 17 deletions receiver/internal/receiver.go

This file was deleted.

15 changes: 0 additions & 15 deletions receiver/internal/traces.go

This file was deleted.

8 changes: 4 additions & 4 deletions receiver/otlpreceiver/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ const (

// NewFactory creates a new OTLP receiver factory.
func NewFactory() receiver.Factory {
return receiver.NewFactory(
return receiverprofiles.NewFactory(
metadata.Type,
createDefaultConfig,
receiver.WithTraces(createTraces, metadata.TracesStability),
receiver.WithMetrics(createMetrics, metadata.MetricsStability),
receiver.WithLogs(createLog, metadata.LogsStability),
receiverprofiles.WithTraces(createTraces, metadata.TracesStability),
receiverprofiles.WithMetrics(createMetrics, metadata.MetricsStability),
receiverprofiles.WithLogs(createLog, metadata.LogsStability),
receiverprofiles.WithProfiles(createProfiles, metadata.ProfilesStability),
)
}
Expand Down
5 changes: 3 additions & 2 deletions receiver/otlpreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"go.opentelemetry.io/collector/consumer/consumerprofiles"
"go.opentelemetry.io/collector/consumer/consumertest"
"go.opentelemetry.io/collector/internal/testutil"
"go.opentelemetry.io/collector/receiver/receiverprofiles"
"go.opentelemetry.io/collector/receiver/receivertest"
)

Expand Down Expand Up @@ -47,7 +48,7 @@ func TestCreateSameReceiver(t *testing.T) {
assert.NotNil(t, lReceiver)
require.NoError(t, err)

pReceiver, err := factory.CreateProfilesReceiver(context.Background(), creationSet, cfg, consumertest.NewNop())
pReceiver, err := factory.(receiverprofiles.Factory).CreateProfilesReceiver(context.Background(), creationSet, cfg, consumertest.NewNop())
assert.NotNil(t, pReceiver)
require.NoError(t, err)

Expand Down Expand Up @@ -415,7 +416,7 @@ func TestCreateProfilesReceiver(t *testing.T) {
creationSet := receivertest.NewNopSettings()
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
tr, err := factory.CreateProfilesReceiver(ctx, creationSet, tt.cfg, tt.sink)
tr, err := factory.(receiverprofiles.Factory).CreateProfilesReceiver(ctx, creationSet, tt.cfg, tt.sink)
if tt.wantErr {
assert.Error(t, err)
return
Expand Down
Loading
Loading