Skip to content

Commit

Permalink
feat(connect_callee.go): add Dapr App ID header to gRPC client option…
Browse files Browse the repository at this point in the history
…s to identify callee service

The Dapr App ID header is added to the gRPC client options to identify the callee service. This is done by calling the `AddDaprAppIDHeader` function from the `connectUtils` package with the `cfg.Callee.ServiceName` parameter.
  • Loading branch information
shumkovdenis committed May 16, 2023
1 parent 2a4f4fc commit c993336
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion connect_callee.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ func NewConnectCallee(cfg Config) *connectCallee {
client := exampleConnect.NewIntegrationServiceClient(
connectUtils.NewInsecureClient(),
fmt.Sprintf("http://localhost:%d", cfg.Dapr.GRPCPort),
connectUtils.WithClientOptions(),
connectUtils.WithClientOptions(
connectUtils.AddDaprAppIDHeader(cfg.Callee.ServiceName),
),
// connect.WithGRPC(),
// connect.WithInterceptors(
// helpers.NewAppInterceptor("remote"),
Expand Down

0 comments on commit c993336

Please sign in to comment.