-
Notifications
You must be signed in to change notification settings - Fork 8
Add gRPC connection factory with load balancing #502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🚨 Bugbot Trial ExpiredYour team's Bugbot trial has expired. Please contact your team administrator to turn on the paid plan to continue using Bugbot. A team admin can activate the plan in the Cursor dashboard. |
🚨 Bugbot Trial ExpiredYour team's Bugbot trial has expired. Please contact your team administrator to turn on the paid plan to continue using Bugbot. A team admin can activate the plan in the Cursor dashboard. |
…bility and lifecycle management
- Replaces usage of the custom kitlog logger with Go's slog throughout the codebase, including gormx, grpcx, httpx, normalize, and statusx packages. - Refactors errornotifierx to remove logger injection, introduces a new slog-based LogNotifier, and updates Airbrake notifier handling. - Removes legacy logx and grpcx logger implementations, adds new slogx and grpcx/logging helpers, and updates related tests and configs. - Updates go.mod and go.sum for dependency changes.
🚨 Bugbot Trial ExpiredYour team's Bugbot trial has expired. Please contact your team administrator to turn on the paid plan to continue using Bugbot. A team admin can activate the plan in the Cursor dashboard. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a comprehensive migration from kit logging to standard Go slog, introduces gRPC utilities for connection management with load balancing, and refactors test data protobuf definitions to use versioned packages.
- Migrates from
github.com/theplant/appkit/logto Go's standardlog/slogthroughout the codebase - Adds new gRPC utilities for server setup, client connections with load balancing support, and logging interceptors
- Introduces versioned protobuf test data with proper package organization
- Updates error notification system to use slog and removes logger dependencies
Reviewed Changes
Copilot reviewed 26 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| statusx/vproto.go | Migrates from kit logging to slog for error handling |
| statusx/validate_test.go | Updates test imports to use versioned testdata package |
| statusx/testdata/proto/testdata/v1/input.proto | Restructures proto package to versioned format |
| statusx/http.go | Replaces kit logging with slog for HTTP error writing |
| statusx/gen/testdata/v1/input.pb.validate.go | Generated code for versioned proto validation |
| statusx/gen/testdata/v1/input.pb.go | Generated code for versioned proto definitions |
| statusx/buf.yaml | Adds testdata/proto to buf configuration |
| statusx/buf.gen.yaml | Includes testdata/proto in generation inputs |
| slogx/slog.go | New package providing structured logging configuration |
| normalize/grpc.go | Migrates gRPC normalization from kit logging to slog |
| netx/dial.go | New package for network listener factory utilities |
| httpx/server.go | Refactors HTTP server setup with slog and netx integration |
| healthz/grpc_test.go | Updates test parameter type from interface{} to any |
| grpcx/server.go | New gRPC server factory with lifecycle management |
| grpcx/logging.go | New gRPC logging interceptors using slog |
| grpcx/logger.go | Removes old kit logging-based gRPC logger |
| grpcx/conn.go | New gRPC connection factory with load balancing support |
| grpcx/config.go | Configuration struct for gRPC server setup |
| grpcx/bufconn.go | Utilities for in-memory gRPC connections for testing |
| gormx/tracing.go | Makes logger injection optional for GORM tracing |
| gormx/database.go | Migrates database setup from kit logging to slog |
| go.mod | Updates inject dependency and adds OpenTelemetry trace dependency |
| errornotifierx/slog.go | New slog-based error notifier implementation |
| errornotifierx/errornotifier.go | Refactors error notification to remove logger dependency |
| errornotifierx/config_test.go | Updates tests to remove logger requirements |
| errornotifierx/airbrake.go | Simplifies Airbrake notifier interface |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
No description provided.