Have armeria always add a fallback Service for not found requests?
See original GitHub issueI found in https://github.com/openzipkin/zipkin/pull/2348 that there is somewhat confusing behavior regarding ServerBuilder.decorator
- as it only decorates mapped services, requests that aren’t mapped and returned as NOT_FOUND
are not handled by the decorator. If the decorator is for metrics collection, and has logic for not found requests, it doesn’t work.
Does it make sense to have armeria always add a service at the end for not_found requests to make sure behavior is consistent with mapped requests?
Issue Analytics
- State:
- Created 5 years ago
- Comments:10
Top Results From Across the Web
Serving static files — Armeria documentation
Use FileService to serve static files under a certain directory. FileService supports GET and HEAD HTTP methods and will auto-fill Date , Last-Modified...
Read more >com.linecorp.armeria.client.Client java code examples | Tabnine
Sends a Request to a remote Endpoint. Note that this interface is not a user's entry point for sending a Request. It is...
Read more >Index (Armeria 0.69.0 API reference) - Javadoc.io
Adds the specified RequestLogListener so that it's notified when all of the specified RequestLogAvailability s are satisfied.
Read more >python - ImportError: No module named requests
Requests is not a built in module (does not come with the default python installation), so you will have to install it: OSX/Linux....
Read more >Circuit breakers for distributed services - LINE ENGINEERING
If no one has been keeping an eye on the entire network, ... Starting with version 0.13.0 of Armeria, it is possible to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
WRT custom status rendering, here, we could translate an
HttpStatusException
into anHttpResponse
using aFunction<HttpStatusException, HttpResponse>
.The 404-responding service could raise
HttpStatusException.of(404)
to take advantage of this feature.The proposal intends to provide a universal way to handle both 404 and
HttpStatusException
, but I found that 404 andHttpStatusException
are different; IfHttpStatusException
is raised, it means the service has been invoked already, so issuing another request will create an extra request log.So… let me drop the proposal and just make the following changes:
ServerBuilder
andVirtualHostBuilder
so that a 404-responding service is bound automatically atprefix:/
as the last service, if not duplicate.