Skip to content

Commit

Permalink
no longer pass unnecessary logger
Browse files Browse the repository at this point in the history
  • Loading branch information
bashar-515 committed Jan 8, 2025
1 parent 409834b commit 4c2e07b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions rpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func NewServer(logger utils.ZapCompatibleLogger, opts ...ServerOption) (Server,
grpcUnaryServerInterceptor(logger),
unaryServerCodeInterceptor(),
)
unaryInterceptors = append(unaryInterceptors, UnaryServerTracingInterceptor(logger))
unaryInterceptors = append(unaryInterceptors, UnaryServerTracingInterceptor())
unaryAuthIntPos := -1
if !sOpts.unauthenticated {
unaryInterceptors = append(unaryInterceptors, server.authUnaryInterceptor)
Expand Down Expand Up @@ -371,7 +371,7 @@ func NewServer(logger utils.ZapCompatibleLogger, opts ...ServerOption) (Server,
grpcStreamServerInterceptor(logger),
streamServerCodeInterceptor(),
)
streamInterceptors = append(streamInterceptors, StreamServerTracingInterceptor(logger))
streamInterceptors = append(streamInterceptors, StreamServerTracingInterceptor())
streamAuthIntPos := -1
if !sOpts.unauthenticated {
streamInterceptors = append(streamInterceptors, server.authStreamInterceptor)
Expand Down
4 changes: 2 additions & 2 deletions rpc/server_interceptors.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

// UnaryServerTracingInterceptor starts a new Span if Span metadata exists in the context.
func UnaryServerTracingInterceptor(logger utils.ZapCompatibleLogger) grpc.UnaryServerInterceptor {
func UnaryServerTracingInterceptor() grpc.UnaryServerInterceptor {
return func(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
if remoteSpanContext, err := remoteSpanContextFromContext(ctx); err == nil {
var span *trace.Span
Expand All @@ -45,7 +45,7 @@ func UnaryServerTracingInterceptor(logger utils.ZapCompatibleLogger) grpc.UnaryS
}

// StreamServerTracingInterceptor starts a new Span if Span metadata exists in the context.
func StreamServerTracingInterceptor(logger utils.ZapCompatibleLogger) grpc.StreamServerInterceptor {
func StreamServerTracingInterceptor() grpc.StreamServerInterceptor {
return func(srv interface{}, stream grpc.ServerStream, info *grpc.StreamServerInfo, handler grpc.StreamHandler) error {
if remoteSpanContext, err := remoteSpanContextFromContext(stream.Context()); err == nil {
newCtx, span := trace.StartSpanWithRemoteParent(stream.Context(), "server_root", remoteSpanContext)
Expand Down

0 comments on commit 4c2e07b

Please sign in to comment.