-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Mongo version never collected #27441
Labels
Comments
gsanchezgavier
added
bug
Something isn't working
needs triage
New item requiring triage
labels
Oct 5, 2023
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I checked the PR, I agree this is a bug. A code owner has also commented on the PR, so I'm removing |
djaglowski
pushed a commit
that referenced
this issue
Oct 6, 2023
**Description:** <Describe what has changed.> - Improve the unit-test to catch similar errors in the future. - Fix mongodb version collection. **Link to tracking Issue:** <Issue number if applicable> #27441 **Testing:** <Describe what testing was performed and which tests were added.> Added the expectation assert for the Mock. This is the log output from running the tests in the first catching the bug ``` --- FAIL: TestScraperScrape (0.00s) --- FAIL: TestScraperScrape/Failed_to_fetch_database_names (0.00s) pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316: FAIL: GetVersion(string) at: [pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:146 pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:292] pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316: PASS: ListDatabaseNames(string,string,string) pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316: FAIL: 1 out of 2 expectation(s) were met. The code you are testing needs to make 1 more call(s). at: [pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316] ``` **Documentation:** <Describe the documentation added.>
Fixed by #27442, thanks @gsanchezgavier! |
jmsnll
pushed a commit
to jmsnll/opentelemetry-collector-contrib
that referenced
this issue
Nov 12, 2023
**Description:** <Describe what has changed.> - Improve the unit-test to catch similar errors in the future. - Fix mongodb version collection. **Link to tracking Issue:** <Issue number if applicable> open-telemetry#27441 **Testing:** <Describe what testing was performed and which tests were added.> Added the expectation assert for the Mock. This is the log output from running the tests in the first catching the bug ``` --- FAIL: TestScraperScrape (0.00s) --- FAIL: TestScraperScrape/Failed_to_fetch_database_names (0.00s) pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316: FAIL: GetVersion(string) at: [pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:146 pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:292] pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316: PASS: ListDatabaseNames(string,string,string) pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316: FAIL: 1 out of 2 expectation(s) were met. The code you are testing needs to make 1 more call(s). at: [pathTo/opentelemetry-collector-contrib/receiver/mongodbreceiver/scraper_test.go:316] ``` **Documentation:** <Describe the documentation added.>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Component(s)
receiver/mongodb
What happened?
Description
After this bugfix #23860 version is never collected.
Steps to Reproduce
Configure the receiver to scrape a v4.4 mongo instance.
Expected Result
This metric not being collected because of the mongo version
Actual Result
Error logged
Collector version
v0.86.0
Environment information
Environment
mongodb v4.4
OpenTelemetry Collector configuration
Log output
No response
Additional context
I'm submitting the fix PR
The text was updated successfully, but these errors were encountered: