feat(apm): add otel apm

This commit is contained in:
Sinh 2024-05-17 09:36:07 +07:00
parent dbfbba6426
commit 5e7d6743a1
1 changed files with 2 additions and 2 deletions

4
apm.go
View File

@ -91,8 +91,8 @@ func GRPCServerHandlerOpt() grpc.ServerOption {
return grpc.StatsHandler(otelgrpc.NewServerHandler()) return grpc.StatsHandler(otelgrpc.NewServerHandler())
} }
func GRPCClientHandlerOpt() grpc.ServerOption { func GRPCClientHandlerOpt() grpc.DialOption {
return grpc.StatsHandler(otelgrpc.NewClientHandler()) return grpc.WithStatsHandler(otelgrpc.NewClientHandler())
} }
func TraceStart(ctx context.Context, name string) (context.Context, trace.Span) { func TraceStart(ctx context.Context, name string) (context.Context, trace.Span) {