Skip to content

Commit

Permalink
Update checkout.md & product-catalog.md
Browse files Browse the repository at this point in the history
I updated these docs to reflect the source code modifications.
See: open-telemetry/opentelemetry-demo#1284
  • Loading branch information
yuki0920 committed Dec 2, 2023
1 parent 9cef37b commit bbd38b9
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 bbd38b9

Please sign in to comment.