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

[receiver/mongodbreceiver]: Add metric version & storage engine check before recording metrics #13155

Closed
JonathanWamsley opened this issue Aug 9, 2022 · 3 comments
Assignees
Labels
bug Something isn't working ci-cd CI, CD, testing, build issues priority:p2 Medium receiver/mongodb

Comments

@JonathanWamsley
Copy link
Contributor

Describe the bug
Partial errors are being recorded in integration tests when they don't have to be. Before metrics are recorded, the mongodb version and storage engine should be checked instead of emitting a partial error.

Steps to reproduce
Run integration test and check for partial errors before scrape returns.
At the end of scrape, running an integration test like 5.0 I would expect no partial errors.

	errs := &scrapererror.ScrapeErrors{}
	s.collectMetrics(ctx, errs)
	if errorsCombined := errs.Combine(); errorsCombined != nil {
		panic(fmt.Sprintf("Error Amount:%#v\nErrors: %#v", errorsCombined, errorsCombined.Error()))
	}
	return s.mb.Emit(), errs.Combine()

What did you expect to see?
Expect no partial errors when running integration tests.

What did you see instead?
For mongodb integration test 5

Error Amount:scrapererror.PartialScrapeError{error:(*multierr.multiError)(0xc0000b4420), Failed:4}
Errors: "could not find key for metric; could not find key for metric; could not find key for metric; could not find key for metric"

What version did you use?
on main, mongodb version 2.6, 3, 4 and 5

Additional context
These partial errors got passed silently and were fixed recently from #13109 . These partial errors will stop reporting with the correct version and storage engine checks which will be documented in the readme.

@JonathanWamsley JonathanWamsley added the bug Something isn't working label Aug 9, 2022
@JonathanWamsley
Copy link
Contributor Author

I'll be working on this issue.

@mx-psi mx-psi added receiver/mongodb ci-cd CI, CD, testing, build issues labels Aug 11, 2022
@github-actions
Copy link
Contributor

Pinging code owners: @djaglowski @schmikei. See Adding Labels via Comments if you do not have permissions to add labels yourself.

@JonathanWamsley
Copy link
Contributor Author

resolved with #13329

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ci-cd CI, CD, testing, build issues priority:p2 Medium receiver/mongodb
Projects
None yet
Development

No branches or pull requests

3 participants