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

Configurable prometheus path via config #2082

Closed

Conversation

tobbbles
Copy link

This PR resolves #2081.

@@ -105,13 +106,15 @@ private void configurePrometheusAdapter(Map<String, ?> configs) {
"%s config is required by Prometheus metric sampler", PROMETHEUS_SERVER_ENDPOINT_CONFIG));
}

final String path = (String) configs.get(PROMETHEUS_SERVER_PATH_CONFIG);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just curious won't this cause NPE if PROMETHEUS_SERVER_PATH_CONFIG is not set?

Copy link
Author

Choose a reason for hiding this comment

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

In theory, yes, but this is set a few lines up: https://github.com/linkedin/cruise-control/pull/2082/files/aeb29411e60ab15884c0f7696cc639ef81d00246#diff-d114eb44a5084d7894e3ddc1b1e00f52466bfd49f8c3b40383b8863534683c0fR55 and follows the existing pattern used for the Prometheus server endpoint.

@mhratson
Copy link
Contributor

mhratson commented Feb 8, 2024

#2120 may be a better solution for this issue.
Feel free to reopen if you disagree…

@mhratson mhratson closed this Feb 8, 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
Development

Successfully merging this pull request may close these issues.

Configurable Prometheus path
3 participants