From aaf7d39de74d96933a3dbed5c5636f70608e9a2d Mon Sep 17 00:00:00 2001 From: Katie Hockman Date: Thu, 1 Dec 2022 11:34:31 -0500 Subject: [PATCH] contrib: clarify use of UnaryInterceptor in grpc example (#1601) --- contrib/google.golang.org/grpc/example_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/google.golang.org/grpc/example_test.go b/contrib/google.golang.org/grpc/example_test.go index 4dec22e5db..e8c7860ad0 100644 --- a/contrib/google.golang.org/grpc/example_test.go +++ b/contrib/google.golang.org/grpc/example_test.go @@ -19,7 +19,9 @@ func Example_client() { si := grpctrace.StreamClientInterceptor(grpctrace.WithServiceName("my-grpc-client")) ui := grpctrace.UnaryClientInterceptor(grpctrace.WithServiceName("my-grpc-client")) - // Dial in using the created interceptor... + // Dial in using the created interceptor. + // Note: To use multiple UnaryInterceptors with grpc.Dial, you must use + // grpc.WithChainUnaryInterceptor instead (as of google.golang.org/grpc v1.51.0). conn, err := grpc.Dial("localhost:50051", grpc.WithInsecure(), grpc.WithStreamInterceptor(si), grpc.WithUnaryInterceptor(ui)) if err != nil {