Skip to content

Commit

Permalink
debug log
Browse files Browse the repository at this point in the history
  • Loading branch information
dudo committed Jan 2, 2025
1 parent 4b9239d commit ae32c10
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/telemetry/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"time"

"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
)
Expand Down Expand Up @@ -34,6 +35,10 @@ func LoggingInterceptor(ctx context.Context, req interface{}, info *grpc.UnarySe
slog.Error("Failed to marshal Protobuf message", fields...)
}
}

// Log the incoming context
md, _ := metadata.FromIncomingContext(ctx)
slog.Debug("Incoming gRPC context", "metadata", md)
}

// Process the request
Expand Down

0 comments on commit ae32c10

Please sign in to comment.