Skip to content

Ordering of tracing "interceptors" #2923

@trask

Description

@trask

Discussed with @anuraaga in today's SIG meeting about #2894 (comment), and he convinced me that interceptors are different from "on response" callbacks, and deserve different treatment.

In summary:

  • interceptors are configured "globally", and are not a replacement for "on response" callbacks, which are used to implement call-site specific behavior
  • interceptors are part of the request/response "pipeline"
  • interceptors can mutate the response, so the response is not really "complete" until it passes back through the interceptors

So suggest the rule of thumb that we apply (as the default behavior), is for CLIENT spans to capture everything from the beginning of the request to once the response is completed (which includes passing through interceptors which are allowed to modify the response object).

We should review existing instrumentation that applies to "interceptors", e.g.

And we should add tests to verify this behavior, similar to the tests added for okhttp3 in #2894.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions