Skip to content

Commit 3bf8bca

Browse files
wenxuwan文徐
andauthored
feat: add NewVariableContext for StreamInterceptorFilter (#1055)
* add NewVariableContext for StreamInterceptorFilter * fix go lint --------- Co-authored-by: 文徐 <[email protected]>
1 parent 4c666d8 commit 3bf8bca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

diagnostics/grpc_tracing.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88

99
"google.golang.org/grpc"
1010
"mosn.io/mosn/pkg/trace"
11+
"mosn.io/pkg/variable"
1112

1213
ltrace "mosn.io/layotto/components/trace"
1314
lgrpc "mosn.io/layotto/diagnostics/grpc"
@@ -50,6 +51,7 @@ func StreamInterceptorFilter(srv interface{}, ss grpc.ServerStream, info *grpc.S
5051
// get tracer
5152
tracer := trace.Tracer(protocol.Layotto)
5253
ctx := ss.Context()
54+
ctx = variable.NewVariableContext(ctx)
5355
// start a span
5456
span := tracer.Start(ctx, &lgrpc.RequestInfo{
5557
FullMethod: info.FullMethod,

0 commit comments

Comments
 (0)