Skip to content

Commit

Permalink
feat: add request id as part of EchoResponse (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
alicejli committed Feb 8, 2024
1 parent 330a3a2 commit fe3c90e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions schema/google/showcase/v1beta1/echo.proto
Expand Up @@ -224,6 +224,9 @@ message EchoResponse {

// The severity specified in the request.
Severity severity = 2;

// The request ID specified or autopopulated in the request.
string request_id = 3;
}

// The request message used for the EchoErrorDetails method.
Expand Down
2 changes: 1 addition & 1 deletion server/services/echo_service.go
Expand Up @@ -51,7 +51,7 @@ func (s *echoServerImpl) Echo(ctx context.Context, in *pb.EchoRequest) (*pb.Echo
}
echoHeaders(ctx)
echoTrailers(ctx)
return &pb.EchoResponse{Content: in.GetContent(), Severity: in.GetSeverity()}, nil
return &pb.EchoResponse{Content: in.GetContent(), Severity: in.GetSeverity(), RequestId: in.GetRequestId()}, nil
}

func (s *echoServerImpl) EchoErrorDetails(ctx context.Context, in *pb.EchoErrorDetailsRequest) (*pb.EchoErrorDetailsResponse, error) {
Expand Down

0 comments on commit fe3c90e

Please sign in to comment.