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/mongodbatlas] Adds additional disk & process metrics #36694

Merged
merged 4 commits into from
Dec 13, 2024

Conversation

StefanKurek
Copy link
Contributor

Description

Adds additional disk and process metrics to flesh out available monitoring metrics from the API. No new API calls were needed as we were already getting this data already.

Link to tracking issue

Fixes #36525

Testing

New tests generated and ran.

Documentation

New documentation generated.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think the content of this file is what you intended?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schmikei nope, forgot to push up those changes!. should be good now though

@@ -8,7 +8,7 @@
| Issues | [![Open issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aopen%20label%3Areceiver%2Fmongodbatlas%20&label=open&color=orange&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aopen+is%3Aissue+label%3Areceiver%2Fmongodbatlas) [![Closed issues](https://img.shields.io/github/issues-search/open-telemetry/opentelemetry-collector-contrib?query=is%3Aissue%20is%3Aclosed%20label%3Areceiver%2Fmongodbatlas%20&label=closed&color=blue&logo=opentelemetry)](https://github.com/open-telemetry/opentelemetry-collector-contrib/issues?q=is%3Aclosed+is%3Aissue+label%3Areceiver%2Fmongodbatlas) |
| [Code Owners](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/CONTRIBUTING.md#becoming-a-code-owner) | [@schmikei](https://www.github.com/schmikei) \| Seeking more code owners! |

[beta]: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta
[beta]: https://github.com/open-telemetry/opentelemetry-collector#beta
Copy link
Contributor

Choose a reason for hiding this comment

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

Not super familiar but just following this link right now does not take me to appropriate beta description located here: https://github.com/open-telemetry/opentelemetry-collector/blob/main/docs/component-stability.md#beta

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schmikei hmm, I don't think I changed this manually (just had it generated...). But I can double check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah...mdatagen makes the change you see here...

switch meas.Name {
case "DISK_PARTITION_THROUGHPUT_READ":
fallthrough
case "DISK_PARTITION_THROUGHPUT_WRITE":
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
case "DISK_PARTITION_THROUGHPUT_WRITE":
case "DISK_PARTITION_THROUGHPUT_WRITE", "DISK_PARTITION_THROUGHPUT_READ":

Would it not be simpler to not relying on the fallthrough? I at least think it reads a tad bit better

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schmikei can you tell I haven't been writing go consistently in awhile...Looks like a good change to me!


// Combine data point values with matching timestamps
for j, totalMeas := range dptTotalMeas.DataPoints {
if totalMeas.Timestamp != meas.DataPoints[j].Timestamp ||
Copy link
Contributor

Choose a reason for hiding this comment

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

Will probably need to test to make sure matching timestamps is sufficent enough to combine datapoints. I may have to poke around the API to make sure that is a valid assumption at this step.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@schmikei I have done some manual spot checking and it has looked good so far (multiple datapoints coming through in a single collection, and the totals being created properly).

Outside of that I'll leave it up to you. I can rip this out if need be, as ultimately it was a "nice to have" although hopefully it doesn't come to it.

@StefanKurek StefanKurek force-pushed the feat/update-mongodbatlas branch 3 times, most recently from d27bbb9 to 034b24f Compare December 6, 2024 22:49
@StefanKurek StefanKurek force-pushed the feat/update-mongodbatlas branch from 034b24f to ace3750 Compare December 9, 2024 16:40
@schmikei
Copy link
Contributor

@djaglowski as a codeowner I've tested this change and I think it should be good to merge at this point

@djaglowski djaglowski merged commit d72bbd2 into open-telemetry:main Dec 13, 2024
160 checks passed
@github-actions github-actions bot added this to the next release milestone Dec 13, 2024
sbylica-splunk pushed a commit to sbylica-splunk/opentelemetry-collector-contrib that referenced this pull request Dec 17, 2024
…telemetry#36694)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds additional disk and process metrics to flesh out available
monitoring metrics from the API. No new API calls were needed as we were
already getting this data already.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#36525

<!--Describe what testing was performed and which tests were added.-->
#### Testing
New tests generated and ran.

<!--Describe the documentation added.-->
#### Documentation
New documentation generated.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: schmikei <[email protected]>
mterhar pushed a commit to mterhar/opentelemetry-collector-contrib that referenced this pull request Dec 19, 2024
…telemetry#36694)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
Adds additional disk and process metrics to flesh out available
monitoring metrics from the API. No new API calls were needed as we were
already getting this data already.

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
Fixes open-telemetry#36525

<!--Describe what testing was performed and which tests were added.-->
#### Testing
New tests generated and ran.

<!--Describe the documentation added.-->
#### Documentation
New documentation generated.

<!--Please delete paragraphs that you did not use before submitting.-->

---------

Co-authored-by: schmikei <[email protected]>
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.

[receiver/mongodbatlas] Add additional collected metrics
4 participants