Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib: clarify use of UnaryInterceptor in grpc example #1601

Merged
merged 4 commits into from Dec 1, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion contrib/google.golang.org/grpc/example_test.go
Expand Up @@ -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: grpc.Dial does not support multiple UnaryInterceptor options directly.
// If this is needed, use grpc.WithChainUnaryInterceptor instead.
katiehockman marked this conversation as resolved.
Show resolved Hide resolved
conn, err := grpc.Dial("localhost:50051", grpc.WithInsecure(),
grpc.WithStreamInterceptor(si), grpc.WithUnaryInterceptor(ui))
if err != nil {
Expand Down