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

Change obsreport receiver calling pattern in k8sclusterreciver, kubeletstatsreceiver, sapmreceiver #3504

Merged
merged 18 commits into from
May 25, 2021
Merged

Conversation

humivo
Copy link
Member

@humivo humivo commented May 24, 2021

Description: Change obsreport helpers for receiver to use the new pattern created in Collector. Specifically for k8sclusterreceiver, kubeletstatsreceiver, sapmreceiver.

Link to tracking Issue: Issue #3436

@humivo humivo requested a review from owais as a code owner May 24, 2021 21:26
@humivo humivo requested a review from a team May 24, 2021 21:26
Copy link
Member

@bogdandrutu bogdandrutu left a comment

Choose a reason for hiding this comment

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

Please rebase

receiver/sapmreceiver/trace_receiver.go Show resolved Hide resolved
@bogdandrutu
Copy link
Member

ok  	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver/subprocess	0.036s	coverage: 20.5% of statements
go tool cover -html=coverage.txt -o coverage.html
make[2]: Leaving directory '/home/circleci/project/receiver/jmxreceiver'
running make do-unit-tests-with-cover in ./receiver/k8sclusterreceiver
make[2]: Entering directory '/home/circleci/project/receiver/k8sclusterreceiver'
running go unit test ./... + coverage in /home/circleci/project/receiver/k8sclusterreceiver
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x228993c]

goroutine 324 [running]:
go.opentelemetry.io/collector/obsreport.(*Receiver).traceReceiveOp(0x0, 0x2cdb240, 0xc0004d81c0, 0x29e5099, 0x10, 0x0, 0x0, 0x0, 0xc0009006c0, 0xc000b00060)
	/home/circleci/go/pkg/mod/go.opentelemetry.io/collector@v0.27.1-0.20210524201935-86ea0a131fb2/obsreport/obsreport_receiver.go:388 +0xdc
go.opentelemetry.io/collector/obsreport.(*Receiver).StartMetricsReceiveOp(...)
	/home/circleci/go/pkg/mod/go.opentelemetry.io/collector@v0.27.1-0.20210524201935-86ea0a131fb2/obsreport/obsreport_receiver.go:301
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver.(*kubernetesReceiver).dispatchMetrics(0xc0001d4040, 0x2cdb240, 0xc0004d81c0)
	/home/circleci/project/receiver/k8sclusterreceiver/receiver.go:103 +0x1b9
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver.(*kubernetesReceiver).Start.func1(0xc0001d4040, 0x2cdb240, 0xc0004d81c0, 0x2cdb600, 0x3a38540)
	/home/circleci/project/receiver/k8sclusterreceiver/receiver.go:84 +0x377
created by github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver.(*kubernetesReceiver).Start
	/home/circleci/project/receiver/k8sclusterreceiver/receiver.go:58 +0x345
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver	1.228s
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/collection	0.064s	coverage: 85.6% of statements
?   	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/testutils	[no test files]
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/utils	0.042s	coverage: 50.0% of statements
FAIL
make[2]: *** [../../Makefile.Common:48: do-unit-tests-with-cover] Error 1
make[2]: Leaving directory '/home/circleci/project/receiver/k8sclusterreceiver'

@humivo
Copy link
Member Author

humivo commented May 25, 2021

ok  	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jmxreceiver/subprocess	0.036s	coverage: 20.5% of statements
go tool cover -html=coverage.txt -o coverage.html
make[2]: Leaving directory '/home/circleci/project/receiver/jmxreceiver'
running make do-unit-tests-with-cover in ./receiver/k8sclusterreceiver
make[2]: Entering directory '/home/circleci/project/receiver/k8sclusterreceiver'
running go unit test ./... + coverage in /home/circleci/project/receiver/k8sclusterreceiver
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x228993c]

goroutine 324 [running]:
go.opentelemetry.io/collector/obsreport.(*Receiver).traceReceiveOp(0x0, 0x2cdb240, 0xc0004d81c0, 0x29e5099, 0x10, 0x0, 0x0, 0x0, 0xc0009006c0, 0xc000b00060)
	/home/circleci/go/pkg/mod/go.opentelemetry.io/collector@v0.27.1-0.20210524201935-86ea0a131fb2/obsreport/obsreport_receiver.go:388 +0xdc
go.opentelemetry.io/collector/obsreport.(*Receiver).StartMetricsReceiveOp(...)
	/home/circleci/go/pkg/mod/go.opentelemetry.io/collector@v0.27.1-0.20210524201935-86ea0a131fb2/obsreport/obsreport_receiver.go:301
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver.(*kubernetesReceiver).dispatchMetrics(0xc0001d4040, 0x2cdb240, 0xc0004d81c0)
	/home/circleci/project/receiver/k8sclusterreceiver/receiver.go:103 +0x1b9
github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver.(*kubernetesReceiver).Start.func1(0xc0001d4040, 0x2cdb240, 0xc0004d81c0, 0x2cdb600, 0x3a38540)
	/home/circleci/project/receiver/k8sclusterreceiver/receiver.go:84 +0x377
created by github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver.(*kubernetesReceiver).Start
	/home/circleci/project/receiver/k8sclusterreceiver/receiver.go:58 +0x345
FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver	1.228s
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/collection	0.064s	coverage: 85.6% of statements
?   	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/testutils	[no test files]
ok  	github.com/open-telemetry/opentelemetry-collector-contrib/receiver/k8sclusterreceiver/utils	0.042s	coverage: 50.0% of statements
FAIL
make[2]: *** [../../Makefile.Common:48: do-unit-tests-with-cover] Error 1
make[2]: Leaving directory '/home/circleci/project/receiver/k8sclusterreceiver'

Looking into this right now! I'm not sure why there is an issue though.

@bogdandrutu
Copy link
Member

Please rebase :)

@humivo
Copy link
Member Author

humivo commented May 25, 2021

Please rebase :)

I was advised to avoid rebasing by @Aneurysm9. Is there any reason a rebase is needed?

@bogdandrutu bogdandrutu merged commit 97328e8 into open-telemetry:main May 25, 2021
alexperez52 referenced this pull request in open-o11y/opentelemetry-collector-contrib Aug 18, 2021
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants