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][receiver/hostmetrics, exporter/awsxray] Fix some more empty IDs #30994

Merged
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
3 changes: 1 addition & 2 deletions exporter/awsxrayexporter/awsxray_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"go.opentelemetry.io/collector/component"
"go.opentelemetry.io/collector/component/componenttest"
"go.opentelemetry.io/collector/exporter"
"go.opentelemetry.io/collector/exporter/exportertest"
Expand Down Expand Up @@ -70,7 +69,7 @@ func TestTelemetryEnabled(t *testing.T) {
registry := telemetry.NewRegistry()
sink := telemetrytest.NewSenderSink()
// preload the sender that the exporter will use
sender, loaded := registry.LoadOrStore(component.NewID(""), sink)
sender, loaded := registry.LoadOrStore(exportertest.NewNopCreateSettings().ID, sink)
require.False(t, loaded)
require.NotNil(t, sender)
require.Equal(t, sink, sender)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (m *mockFactory) CreateMetricsScraper(context.Context, receiver.CreateSetti
return args.Get(0).(scraperhelper.Scraper), args.Error(1)
}

func (m *mockScraper) ID() component.ID { return component.NewID("") }
func (m *mockScraper) ID() component.ID { return component.NewID("mock_scraper") }
func (m *mockScraper) Start(context.Context, component.Host) error { return nil }
func (m *mockScraper) Shutdown(context.Context) error { return nil }
func (m *mockScraper) Scrape(context.Context) (pmetric.Metrics, error) {
Expand Down
Loading