Skip to content

Add public getUndertow method to UndertowWebServer #39839

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
isaacirvin opened this issue Mar 5, 2024 · 6 comments
Closed

Add public getUndertow method to UndertowWebServer #39839

isaacirvin opened this issue Mar 5, 2024 · 6 comments
Labels
status: superseded An issue that has been superseded by another

Comments

@isaacirvin
Copy link

My team is currently evaluating the embedded Undertow within Spring Boot. One concern that has come up which is that it does not appear as though Undertow exposes its internal metrics (active connections, active requests, etc.) via the MeterRegistry.

Additionally, the UndertowWebServer class does not expose the underlying Undertow server object in the same way that TomcatWebServer and JettyWebServer expose their underlying server objects.

What we'd like to have is either Spring support for Undertow internal metrics from the ConnectorStatistics (similar to the TomcatMetricsBinder and AbstractJettyMetricsBinder) or at least have the Undertow object exposed via the UndertowWebServer class so that we could expose those metrics ourselves.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 5, 2024
@wilkinsona
Copy link
Member

We don't have any metrics support for Undertow as there's no Micrometer integration. That's been discussed in micrometer-metrics/micrometer#1227. It's now waiting for some traction with the Undertow maintainers (https://issues.redhat.com/browse/UNDERTOW-2294 and https://groups.google.com/g/undertow-dev/c/4H_qXOlqTw0?pli=1) which can often be quite hard to get. You may want to keep this responsiveness in mind when considering your choice of embedded web server.

I'm not sure that we'd want to make the Undertow instance accessible through UndertowWebServer as it's lifecycle is more complex than either Tomcat or Jetty such that has to be mutable and will be null until the server's been started. I'll discuss it with the rest of the team and see what they think.

@wilkinsona wilkinsona added the for: team-meeting An issue we'd like to discuss as a team to make progress label Mar 5, 2024
@isaacirvin
Copy link
Author

Thanks for the response and candor @wilkinsona! I'm definitely interested in hearing what the team thinks.

As far as the responsiveness goes from Undertow maintainers is there a sense of how long requests like this usually take to have implemented on the Undertow side?

@wilkinsona
Copy link
Member

As far as the responsiveness goes from Undertow maintainers is there a sense of how long requests like this usually take to have implemented on the Undertow side?

I think it's best if you draw your own conclusions there. You can look at the project's issue tracker and Google group to inform your view.

@philwebb
Copy link
Member

philwebb commented Mar 6, 2024

We're going to add getUndertow() to UndertowWebServer but we'll document that it will be null until the server has been started. As such, it will be best to use something like the WebServerInitializedEvent to access it (so you don't get null).

Issue #3016 could improve things in the future and mean that we can make getUndertow() behave in a similar way to getTomcat() on TomcatWebServer.

@philwebb philwebb added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged for: team-meeting An issue we'd like to discuss as a team to make progress labels Mar 6, 2024
@philwebb philwebb added this to the 3.3.x milestone Mar 6, 2024
@philwebb philwebb changed the title Support for Undertow server metrics Add public getUndertow method to UndertowWebServer Mar 6, 2024
@isaacirvin
Copy link
Author

Thanks so much @philwebb! That will be incredibly helpful!

wanger26 added a commit to wanger26/spring-boot that referenced this issue Mar 12, 2024
- getUndertow() to UndertowWebServer will be null until the server has been started. Issue spring-projects#3016 would enable getUndertow() to behave in a similar way to getTomcat() on TomcatWebServer.

spring-projects#39839

Signed-off-by: Jakob Wanger <[email protected]>
wanger26 added a commit to wanger26/spring-boot that referenced this issue Mar 13, 2024
- getUndertow() to UndertowWebServer will be null until the server has been started. Issue spring-projects#3016 would enable getUndertow() to behave in a similar way to getTomcat() on TomcatWebServer.

spring-projects#39839

Signed-off-by: Jakob Wanger <[email protected]>
@mhalbritter
Copy link
Contributor

Superseded by #39916.

@mhalbritter mhalbritter added status: superseded An issue that has been superseded by another and removed type: enhancement A general enhancement labels Mar 13, 2024
@mhalbritter mhalbritter removed this from the 3.3.x milestone Mar 13, 2024
@mhalbritter mhalbritter closed this as not planned Won't fix, can't repro, duplicate, stale Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another
Projects
None yet
Development

No branches or pull requests

5 participants