feat 链路追踪
This commit is contained in:
@@ -2,6 +2,7 @@ package resolver
|
||||
|
||||
import (
|
||||
"git.hlsq.asia/mmorpg/service-common/log"
|
||||
"go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc"
|
||||
"google.golang.org/grpc"
|
||||
"google.golang.org/grpc/credentials/insecure"
|
||||
"google.golang.org/grpc/keepalive"
|
||||
@@ -12,6 +13,7 @@ func NewGrpcConnection(target string) (*grpc.ClientConn, error) {
|
||||
cc, err := grpc.NewClient(
|
||||
target,
|
||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||
grpc.WithStatsHandler(otelgrpc.NewClientHandler()),
|
||||
grpc.WithDefaultServiceConfig(`{"loadBalancingConfig": [{"round_robin": {}}]}`),
|
||||
grpc.WithKeepaliveParams(
|
||||
keepalive.ClientParameters{
|
||||
|
||||
Reference in New Issue
Block a user