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] initialize carbon receiver with compatible id #38283

Closed
wants to merge 1 commit into from

Conversation

atoulme
Copy link
Contributor

@atoulme atoulme commented Feb 28, 2025

This fixes contrib-tests for core, as a new validation fails when creating a carbon receiver with the wavefront receiver receiver settings.

Currently, tests fail with:

=== Failed
=== FAIL: . TestComponentLifecycle/metrics-lifecycle (0.00s)
    generated_component_test.go:63: 
        	Error Trace:	/tmp/contrib/receiver/wavefrontreceiver/generated_component_test.go:63
        	Error:      	Received unexpected error:
        	            	component type mismatch: component ID "wavefront/50a66f9b-48cc-4338-9701-fd51487c5ecc" does not have type "carbon"
        	Test:       	TestComponentLifecycle/metrics-lifecycle

=== FAIL: . TestComponentLifecycle (0.00s)

=== FAIL: . Test_wavefrontreceiver_EndToEnd (0.00s)
    receiver_test.go:38: 
        	Error Trace:	/tmp/contrib/receiver/wavefrontreceiver/receiver_test.go:38
        	Error:      	Received unexpected error:
        	            	component type mismatch: component ID "wavefront/03ee0cef-57a4-4444-b7e2-18bdc84c22cc" does not have type "carbon"
        	Test:       	Test_wavefrontreceiver_EndToEnd

=== FAIL: . TestComponentLifecycle/metrics-lifecycle (re-run 1) (0.00s)
    generated_component_test.go:63: 
        	Error Trace:	/tmp/contrib/receiver/wavefrontreceiver/generated_component_test.go:63
        	Error:      	Received unexpected error:
        	            	component type mismatch: component ID "wavefront/b873a78a-6cc5-4dc2-9859-fc28142a28af" does not have type "carbon"
        	Test:       	TestComponentLifecycle/metrics-lifecycle

make[3]: *** [../../Makefile.Common:102: test] Error 1
make[2]: *** [Makefile:231: receiver/wavefrontreceiver] Error 2
make[1]: *** [Makefile:149: gotest] Error 2
make: *** [Makefile:278: check-contrib] Error 2
=== FAIL: . TestComponentLifecycle (re-run 1) (0.00s)

=== FAIL: . Test_wavefrontreceiver_EndToEnd (re-run 1) (0.00s)
    receiver_test.go:38: 
        	Error Trace:	/tmp/contrib/receiver/wavefrontreceiver/receiver_test.go:38
        	Error:      	Received unexpected error:
        	            	component type mismatch: component ID "wavefront/99cf9fcc-e9dc-438e-a41a-52b2c2c1f9f8" does not have type "carbon"
        	Test:       	Test_wavefrontreceiver_EndToEnd

See https://github.com/open-telemetry/opentelemetry-collector/actions/runs/13596976480/job/38016127009?pr=12528

Comment on lines +58 to +64
carbonSettings := receiver.Settings{
ID: component.MustNewIDWithName("carbon", r.set.ID.Name()),
TelemetrySettings: r.set.TelemetrySettings,
BuildInfo: r.set.BuildInfo,
}

carbonReceiver, err := fact.CreateMetrics(ctx, carbonSettings, carbonCfg, r.nextConsumer)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do like here: #38284, it avoids mistakes to not copy all the fields.

@atoulme
Copy link
Contributor Author

atoulme commented Feb 28, 2025

Closing in favor of #38284

@atoulme atoulme closed this Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants