From bbd38b9c87b83a0fa35ce6fb3836b61b13ca4c94 Mon Sep 17 00:00:00 2001 From: yuki0920 Date: Sat, 2 Dec 2023 23:32:48 +0900 Subject: [PATCH] Update checkout.md & product-catalog.md I updated these docs to reflect the source code modifications. See: https://github.com/open-telemetry/opentelemetry-demo/pull/1284 --- content/en/docs/demo/services/checkout.md | 6 ++---- content/en/docs/demo/services/product-catalog.md | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/content/en/docs/demo/services/checkout.md b/content/en/docs/demo/services/checkout.md index 587b8f44663..1c7dad3be28 100644 --- a/content/en/docs/demo/services/checkout.md +++ b/content/en/docs/demo/services/checkout.md @@ -56,8 +56,7 @@ as part of the gRPC server creation. ```go var srv = grpc.NewServer( - grpc.UnaryInterceptor(otelgrpc.UnaryServerInterceptor()), - grpc.StreamInterceptor(otelgrpc.StreamServerInterceptor()), + grpc.StatsHandler(otelgrpc.NewServerHandler()), ) ``` @@ -68,8 +67,7 @@ by wrapping the gRPC client with instrumentation func createClient(ctx context.Context, svcAddr string) (*grpc.ClientConn, error) { return grpc.DialContext(ctx, svcAddr, grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()), - grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor()), + grpc.WithStatsHandler(otelgrpc.NewClientHandler()), ) } ``` diff --git a/content/en/docs/demo/services/product-catalog.md b/content/en/docs/demo/services/product-catalog.md index ad562dd0164..b56286e74b6 100644 --- a/content/en/docs/demo/services/product-catalog.md +++ b/content/en/docs/demo/services/product-catalog.md @@ -57,8 +57,7 @@ as part of the gRPC server creation. ```go srv := grpc.NewServer( - grpc.UnaryInterceptor(otelgrpc.UnaryServerInterceptor()), - grpc.StreamInterceptor(otelgrpc.StreamServerInterceptor()), + grpc.StatsHandler(otelgrpc.NewServerHandler()), ) ``` @@ -69,8 +68,7 @@ wrapping the gRPC client with instrumentation. func createClient(ctx context.Context, svcAddr string) (*grpc.ClientConn, error) { return grpc.DialContext(ctx, svcAddr, grpc.WithTransportCredentials(insecure.NewCredentials()), - grpc.WithUnaryInterceptor(otelgrpc.UnaryClientInterceptor()), - grpc.WithStreamInterceptor(otelgrpc.StreamClientInterceptor()), + grpc.WithStatsHandler(otelgrpc.NewClientHandler()), ) } ```