Skip to content

Provide a property for configuring the base path of the Actuator's endpoints when using WebFlux #22906

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

Closed
ferblaca opened this issue Aug 12, 2020 · 5 comments
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@ferblaca
Copy link

Spring Boot 2.3.2.RELEASE

The settings for customization of monitoring endpoints described at this link do not work for Webflux applications.

According to the following configuration:

spring:
  webflux:
    base-path: /demowebflux
management:
  server:
    port: 9081
    servlet:
      context-path: /management
  endpoints:
    web:
      base-path: /manage
server:
  port: 9080

should display the monitoring at "http://localhost:9081/management/manage" but does so at "http://localhost:9081/manage", seems to disregard the "management.server.servlet.context-path" property.

For this other configuration:

spring:
  webflux:
    base-path: /demowebflux
management:
  endpoints:
    web:
      base-path: /manage
server:
  port: 9080

works correctly the endpoint "http://localhost:9080/demowebflux/manage".

attached demo reproducing the problem.

demoWebflux.zip

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 12, 2020
@wilkinsona wilkinsona added type: documentation A documentation update and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 12, 2020
@wilkinsona wilkinsona added this to the 2.3.x milestone Aug 12, 2020
@wilkinsona wilkinsona added type: bug A general bug and removed type: documentation A documentation update labels Aug 12, 2020
@wilkinsona
Copy link
Member

wilkinsona commented Aug 12, 2020

Thanks for the report. spring.webflux.base-path is new in Spring Boot 2.3 and it looks like we forgot to provide an equivalent of management.server.servlet.context-path.

@wilkinsona wilkinsona added the for: team-attention An issue we'd like other members of the team to review label Aug 12, 2020
@wilkinsona
Copy link
Member

I wonder if we should provide a single property, something like management.server.base-path, that configures the servlet context path or the web flux base path depending on which web stack you're using. We could then deprecate management.server.servlet.context-path.

@ferblaca
Copy link
Author

Yes, I think that would be a good solution, both for servlet and webflux

@philwebb philwebb removed the for: team-attention An issue we'd like other members of the team to review label Aug 12, 2020
@philwebb philwebb modified the milestones: 2.3.x, 2.4.x Aug 12, 2020
@philwebb philwebb added type: enhancement A general enhancement and removed type: bug A general bug labels Aug 12, 2020
@ferblaca
Copy link
Author

Hi @philwebb!! the issue has changed from 'bug' to 'enhancement' and will be resolved for Spring Boot version 2.4.x, but the milestone 2.4.x has no release date.

Is it impossible for it to be included in 2.3.x? Sorry for the insistence, but this problem is blocking our deployment.

do you have an approximate date for the milestone 2.4.x?

@wilkinsona
Copy link
Member

Spring Boot 2.4.0 is scheduled for 12 November. The issue was changed from a bug to an enhancement as the team quite rightly pointed out to me that the problem is due to a missing feature rather than a faulty implementation.

@wilkinsona wilkinsona changed the title Monitoring endpoint customization does not work in Webflux applications Provide a property for configuring the base path of the Actuator's endpoints when using WebFlux Sep 25, 2020
@wilkinsona wilkinsona self-assigned this Oct 26, 2020
@wilkinsona wilkinsona modified the milestones: 2.4.x, 2.4.0-RC1 Oct 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants