- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1k
 
Closed
Description
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.
- grpc client - looks like it needs to be updated (since grpc interceptors are run in reverse order):
Line 48 in 9637d29
interceptors.add(0, GrpcSingletons.CLIENT_INTERCEPTOR);  - aws-sdk 2.2: @anuraaga I don't see how to control ordering of these since they are added via SPI?
 - aws-sdk-1.11, okhttp-2.2, okhttp-3.0, jaxws-2.0-cxf-3.0, netty
 
And we should add tests to verify this behavior, similar to the tests added for okhttp3 in #2894.
Metadata
Metadata
Assignees
Labels
No labels