Skip to content

Commit

Permalink
Update checkout.md & product-catalog.md (#3639)
Browse files Browse the repository at this point in the history
Co-authored-by: Phillip Carter <[email protected]>
  • Loading branch information
yuki0920 and cartermp authored Dec 2, 2023
1 parent 75471b4 commit 92d9a8b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions content/en/docs/demo/services/checkout.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
)
```

Expand All @@ -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()),
)
}
```
Expand Down
6 changes: 2 additions & 4 deletions content/en/docs/demo/services/product-catalog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
)
```

Expand All @@ -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()),
)
}
```
Expand Down

0 comments on commit 92d9a8b

Please sign in to comment.