Skip to content
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

What is a "handler span"? #3144

Open
trask opened this issue May 31, 2021 · 2 comments
Open

What is a "handler span"? #3144

trask opened this issue May 31, 2021 · 2 comments

Comments

@trask
Copy link
Member

trask commented May 31, 2021

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

@anuraaga
Copy link
Contributor

Another question is whether we should have these without adding something to the spec.

@iNikem
Copy link
Contributor

iNikem commented May 31, 2021

I don't think we are ready and should introduce one more concept to our instrumentations. I mean, we (as Otel community as a whole) have not yet solved the problem with (nested) CLIENT spans. Should we open one more can of worms before we close that one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants