generated from TrueCloudLab/basic
tracing: Fix typo #21
2 changed files with 3 additions and 3 deletions
|
@ -82,7 +82,7 @@ func main() {
|
||||||
cc, err := grpc.NewClient(":7000",
|
cc, err := grpc.NewClient(":7000",
|
||||||
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
grpc.WithTransportCredentials(insecure.NewCredentials()),
|
||||||
grpc.WithChainUnaryInterceptor(
|
grpc.WithChainUnaryInterceptor(
|
||||||
tracing_grpc.NewUnaryClientInteceptor(),
|
tracing_grpc.NewUnaryClientInterceptor(),
|
||||||
verifyClientTraceID,
|
verifyClientTraceID,
|
||||||
),
|
),
|
||||||
grpc.WithChainStreamInterceptor(
|
grpc.WithChainStreamInterceptor(
|
||||||
|
|
|
@ -15,8 +15,8 @@ import (
|
||||||
"google.golang.org/grpc/status"
|
"google.golang.org/grpc/status"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NewUnaryClientInteceptor creates new gRPC unary interceptor to save gRPC client traces.
|
// NewUnaryClientInterceptor creates new gRPC unary interceptor to save gRPC client traces.
|
||||||
func NewUnaryClientInteceptor() grpc.UnaryClientInterceptor {
|
func NewUnaryClientInterceptor() grpc.UnaryClientInterceptor {
|
||||||
return func(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
return func(ctx context.Context, method string, req, reply any, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
||||||
ctx, span := startClientSpan(ctx, cc, method)
|
ctx, span := startClientSpan(ctx, cc, method)
|
||||||
defer span.End()
|
defer span.End()
|
||||||
|
|
Loading…
Add table
Reference in a new issue