Fix comments

[skip ci]
This commit is contained in:
Tyler Benson 2020-03-06 09:24:50 -08:00
parent 2e86ca2141
commit 206fbb944c
2 changed files with 4 additions and 3 deletions

View File

@ -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 {

View File

@ -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!"))