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

Add support for Disk Scraper Metrics #4

Conversation

ishleenk17
Copy link

Adds metrics for the Disk Scraper.

Link to tracking Issue:
https://github.com/elastic/opentelemetry-dev/issues/181

timestamp := dp.Timestamp()
value := dp.IntValue()

switch direction.Str() {
Copy link
Owner

@tommyers-elastic tommyers-elastic Apr 22, 2024

Choose a reason for hiding this comment

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

L26-34 can be simplified to just addDiskIntMetric(metrics, resource, dataset, metric.Name(), device, direction.Str(), dp.Timestamp(), dp.IntValue())

Copy link
Author

Choose a reason for hiding this comment

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

Done!


metricsToAdd := map[string]string{
"system.disk.operation_time": "system.diskio.%s.time",
"system.disk.io_time": "system.disk.%s.time",
Copy link
Owner

Choose a reason for hiding this comment

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

is this meant to be diskio?

Copy link
Author

Choose a reason for hiding this comment

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

Yes, thanks

@ishleenk17 ishleenk17 marked this pull request as ready for review April 23, 2024 05:38
@ishleenk17
Copy link
Author

The code for disk scraper is now present here.

@ishleenk17 ishleenk17 closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants