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

servletEnabled not working when using dropwizard-core:4.0.3 and metrics-jakarta.servlets:4.2.21 #8748

Open
rorytorneymf opened this issue May 9, 2024 · 0 comments

Comments

@rorytorneymf
Copy link

Setting:

admin:
  healthChecks:
    servletEnabled: false

as per the instructions here:

https://www.dropwizard.io/en/release-4.0.x/manual/configuration.html#health-checks

results in the healthcheck-enabled attribute getting set:

handler.getServletContext().setAttribute(HealthCheckServlet.HEALTH_CHECK_REGISTRY, healthChecks);

However, the AdminServlet is checking for an initParamater rather than an attribute:

https://github.com/dropwizard/metrics/blob/v4.2.21/metrics-servlets/src/main/java/com/codahale/metrics/servlets/AdminServlet.java#L115

image

Also, am I right in thinking that, even if the above works, servletEnabled: false only affects the links shown, and the actual servlet/endpoint is still enabled and can still be accessed?

Many thanks

Versions:

dropwizard-core:4.0.3
metrics-jakarta.servlets:4.2.21

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

No branches or pull requests

1 participant