fix:trace graceful stop,pre loss trace (#2358)
This commit is contained in:
@@ -23,6 +23,7 @@ func TestOpenTracingInterceptor(t *testing.T) {
|
||||
Batcher: "jaeger",
|
||||
Sampler: 1.0,
|
||||
})
|
||||
defer trace.StopAgent()
|
||||
|
||||
cc := new(grpc.ClientConn)
|
||||
ctx := metadata.NewOutgoingContext(context.Background(), metadata.MD{})
|
||||
|
||||
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/zeromicro/go-zero/core/proc"
|
||||
"github.com/zeromicro/go-zero/core/stat"
|
||||
"github.com/zeromicro/go-zero/zrpc/internal/serverinterceptors"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/health/grpc_health_v1"
|
||||
)
|
||||
|
||||
@@ -32,6 +32,8 @@ func TestUnaryOpenTracingInterceptor_Enabled(t *testing.T) {
|
||||
Batcher: "jaeger",
|
||||
Sampler: 1.0,
|
||||
})
|
||||
defer trace.StopAgent()
|
||||
|
||||
_, err := UnaryTracingInterceptor(context.Background(), nil, &grpc.UnaryServerInfo{
|
||||
FullMethod: "/package.TestService.GetUser",
|
||||
}, func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
|
||||
Reference in New Issue
Block a user