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/elasticsearch] Implement scraping logic #7174

Merged

Conversation

BinaryFissionGames
Copy link
Contributor

@BinaryFissionGames BinaryFissionGames commented Jan 14, 2022

Description:

  • Implemented scraping logic.
  • Removed some unavailable JVM metrics (Elasticsearch does not expose all the metrics that the JMX receiver collects).
  • Updated config with some new options.
    • Add support for specifying nodes to scrape.
    • Add support for skipping scraping cluster-level metrics.
    • Add support for generated MetricSettings, allowing individual metrics to be enabled/disabled.

Testing:

  • Unit tests for scraping logic (using golden metrics serialized to disk).
  • Updated advanced config test to include new config options.
  • Manually tested to ensure metrics were being received against Elasticsearch 7.15.2

Documentation:

  • Updated documentation with new config options.

@BinaryFissionGames BinaryFissionGames marked this pull request as ready for review January 14, 2022 13:58
receiver/elasticsearchreceiver/scraper.go Show resolved Hide resolved
receiver/elasticsearchreceiver/go.mod Outdated Show resolved Hide resolved
receiver/elasticsearchreceiver/scraper.go Outdated Show resolved Hide resolved

r.metricsBuilder.RecordJvmThreadsCountDataPoint(r.now, info.JVMInfo.JVMThreadInfo.Count)

r.metricsBuilder.EmitNodeMetrics(ilms.Metrics())
Copy link
Member

Choose a reason for hiding this comment

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

Great to see so much done in such few lines. Thanks @dmitryax!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seriously, the new MetricBuilder stuff is really well done!

receiver/elasticsearchreceiver/scraper_test.go Outdated Show resolved Hide resolved
receiver/elasticsearchreceiver/scraper_test.go Outdated Show resolved Hide resolved
Copy link
Member

@djaglowski djaglowski left a comment

Choose a reason for hiding this comment

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

mdatagen was bumped recently, so you'll need to rebase once more, but this looks good to me.

@BinaryFissionGames
Copy link
Contributor Author

@djaglowski Rebased; The mysql integration test failures are unrelated, not sure what's going on there.

@BinaryFissionGames BinaryFissionGames force-pushed the elasticsearchreceiver-scraping-logic branch from 37ba18d to 07b7292 Compare January 17, 2022 18:05
@djaglowski
Copy link
Member

@BinaryFissionGames Will you rebase once more? The mysql integration test has been temporarily disabled due to instability.

@djaglowski djaglowski added the ready to merge Code review completed; ready to merge by maintainers label Jan 17, 2022
@jpkrohling jpkrohling merged commit 72c3535 into open-telemetry:main Jan 17, 2022
animetauren pushed a commit to animetauren/opentelemetry-collector-contrib that referenced this pull request Apr 4, 2023
Adds the receiver component as its own module.

Fixes open-telemetry#7174

---------

Signed-off-by: Alex Boten <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready to merge Code review completed; ready to merge by maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants