-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Labels
Description
Related to #3140.
Here's one proposal:
Most web frameworks have a concept of routing and handlers.
Handler spans have a couple of purposes:
- They represent the portion of a request that is spent in an application handler (as opposed to time spent in the web framework)
- They help users map requests easily to application code (while server span names are based on url paths, the handler span names are based on application class name / method name)
Note: If user code returns a "promise" of some kind (e.g. Future, Mono) the handler span should end when the promise completes.
I think this is mostly consistent with how we implement handler spans, with a couple of questions so far:
-
If a route is not found (and no application handler is invoked), should we capture a handler span? (currently in some cases we do and in some cases we don't)
-
The current webflux handler span maps to
ServerWebExchange.handle(), which is pretty much the entire request-response lifecycle (including routing), it would be nice if this can be scoped down a bit