Skip to content

Add a note on slow /metrics endpoint #206

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

Merged

Conversation

jayme-github
Copy link
Contributor

Sorry, I did not realize that I created this PR for the wrong repo.

fixes #175

README.md Outdated
@@ -21,6 +21,8 @@ To bind the java agent to a specific IP change the port number to `host:port`.

See `./run_sample_httpserver.sh` for a sample script that runs the httpserver against itself.

Please note that the `/metrics` endpoint is expected to be slow (~10 seconds) and might exceed Prometheus default scrape timeout of 10 seconds.
Copy link
Contributor

Choose a reason for hiding this comment

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

That really depends on what you're monitoring

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. My interpretation of your reply to #175 was that ~10 seconds are expected. Would you be okay with it when I just remove (~10 seconds)?

Copy link
Contributor

Choose a reason for hiding this comment

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

10+ seconds is expected for Cassandra, but other things can be fast. I'd word it as a possibility rather than a certainty, and indicate that this is due to the nature of JMX.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What about:

Please note that due to the nature of JMX the /metrics endpoint might exceed Prometheus default scrape timeout of 10 seconds.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds perfect

@brian-brazil brian-brazil merged commit 0f8c25f into prometheus:master Nov 14, 2019
@brian-brazil
Copy link
Contributor

Thanks!

@finkr
Copy link
Contributor

finkr commented Nov 27, 2019

JMX is not particularly efficient (quote Brian Brazil)

However, using whitelistObjectNames, It is often possible to dramatically speed-up things (dropped from 15 seconds to 0.9s. in my use case).
See -> #284

Wouldn't it be worth to add this fact to README?

qinghui-xu pushed a commit to qinghui-xu/jmx_exporter that referenced this pull request Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metrics endpoint is slow
3 participants