chore: add unit tests (#1615)
* test: add more tests * test: add more tests
This commit is contained in:
@@ -41,12 +41,12 @@ func UnaryTracingInterceptor(ctx context.Context, req interface{}, info *grpc.Un
|
||||
}
|
||||
|
||||
// StreamTracingInterceptor returns a grpc.StreamServerInterceptor for opentelemetry.
|
||||
func StreamTracingInterceptor(srv interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo,
|
||||
func StreamTracingInterceptor(svr interface{}, ss grpc.ServerStream, info *grpc.StreamServerInfo,
|
||||
handler grpc.StreamHandler) error {
|
||||
ctx, span := startSpan(ss.Context(), info.FullMethod)
|
||||
defer span.End()
|
||||
|
||||
if err := handler(srv, wrapServerStream(ctx, ss)); err != nil {
|
||||
if err := handler(svr, wrapServerStream(ctx, ss)); err != nil {
|
||||
s, ok := status.FromError(err)
|
||||
if ok {
|
||||
span.SetStatus(codes.Error, s.Message())
|
||||
|
||||
Reference in New Issue
Block a user