You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the handlers for some Helidon-provided endpoints (e.g., metrics and OpenAPI) do their work synchronously, using the same thread on which the request arrived via Netty. The documentation should make this clear and strongly discourage developers from including long-running code of their own via hooks that can be invoked by those handlers.
For example, a user-provided metric's code to format the metrics as JSON or Prometheus will be invoked as Helidon responds to the /metrics endpoint. Similarly, users can provide their own code that participates in building the in-memory OpenAPI model.
By contrast, the handler for the health endpoint prepares the response asynchronously.
It seems unnecessary to convert the other endpoint handlers to also respond asynchronously, as it would be unusual for user code invoked by those handlers to be long-running. But at the least the doc should warns users about this and steer them away from writing long-running code in these places.
The text was updated successfully, but these errors were encountered:
Environment Details
Problem Description
Currently, the handlers for some Helidon-provided endpoints (e.g., metrics and OpenAPI) do their work synchronously, using the same thread on which the request arrived via Netty. The documentation should make this clear and strongly discourage developers from including long-running code of their own via hooks that can be invoked by those handlers.
For example, a user-provided metric's code to format the metrics as JSON or Prometheus will be invoked as Helidon responds to the
/metrics
endpoint. Similarly, users can provide their own code that participates in building the in-memory OpenAPI model.By contrast, the handler for the health endpoint prepares the response asynchronously.
It seems unnecessary to convert the other endpoint handlers to also respond asynchronously, as it would be unusual for user code invoked by those handlers to be long-running. But at the least the doc should warns users about this and steer them away from writing long-running code in these places.
The text was updated successfully, but these errors were encountered: