parent
2e86ca2141
commit
206fbb944c
|
@ -14,6 +14,10 @@ import net.bytebuddy.description.method.MethodDescription;
|
|||
import net.bytebuddy.description.type.TypeDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
|
||||
/**
|
||||
* The InProcessTransport calls the client response in process, so we have to disable async
|
||||
* propagation to allow spans to complete and be reported properly.
|
||||
*/
|
||||
@AutoService(Instrumenter.class)
|
||||
public class InProcessServerStreamInstrumentation extends Instrumenter.Default {
|
||||
|
||||
|
|
|
@ -35,7 +35,6 @@ class GrpcStreamingTest extends AgentTestRunner {
|
|||
|
||||
(1..msgCount).each {
|
||||
if ((testTracer.scopeManager().active() as ContinuableScope).isAsyncPropagating()) {
|
||||
// The InProcessTransport calls the client response in process, so we have to disable async propagation.
|
||||
observer.onNext(value)
|
||||
} else {
|
||||
observer.onError(new IllegalStateException("not async propagating!"))
|
||||
|
@ -46,7 +45,6 @@ class GrpcStreamingTest extends AgentTestRunner {
|
|||
@Override
|
||||
void onError(Throwable t) {
|
||||
if ((testTracer.scopeManager().active() as ContinuableScope).isAsyncPropagating()) {
|
||||
// The InProcessTransport calls the client response in process, so we have to disable async propagation.
|
||||
error.set(t)
|
||||
observer.onError(t)
|
||||
} else {
|
||||
|
@ -57,7 +55,6 @@ class GrpcStreamingTest extends AgentTestRunner {
|
|||
@Override
|
||||
void onCompleted() {
|
||||
if ((testTracer.scopeManager().active() as ContinuableScope).isAsyncPropagating()) {
|
||||
// The InProcessTransport calls the client response in process, so we have to disable async propagation.
|
||||
observer.onCompleted()
|
||||
} else {
|
||||
observer.onError(new IllegalStateException("not async propagating!"))
|
||||
|
|
Loading…
Reference in New Issue