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

[baseserver] Add grpc logging interceptors #9583

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

easyCZ
Copy link
Member

@easyCZ easyCZ commented Apr 27, 2022

Description

Adds default logging interceptors to gRPC baseserver. The format or verbosity is not final, but this gives us something out of the box.

Related Issue(s)

How to test

cd components/public-api-server && go test -v ./...

...
=== RUN   TestPublicAPIServer_v1_PrebuildService
time="2022-04-27T11:37:06Z" level=info msg="Serving http on [::]:42347" protocol=http
time="2022-04-27T11:37:06Z" level=info msg="Serving gRPC on [::]:44745" protocol=grpc
time="2022-04-27T11:37:07Z" level=error msg="finished unary call with code Unimplemented" error="rpc error: code = Unimplemented desc = method GetPrebuild not implemented" grpc.code=Unimplemented grpc.method=GetPrebuild grpc.service=gitpod.v1.PrebuildsService grpc.start_time="2022-04-27T11:37:07Z" grpc.time_ms=0.036 span.kind=server system=grpc
time="2022-04-27T11:37:07Z" level=error msg="finished unary call with code Unimplemented" error="rpc error: code = Unimplemented desc = method GetRunningPrebuild not implemented" grpc.code=Unimplemented grpc.method=GetRunningPrebuild grpc.service=gitpod.v1.PrebuildsService grpc.start_time="2022-04-27T11:37:07Z" grpc.time_ms=0.014 span.kind=server system=grpc
time="2022-04-27T11:37:07Z" level=error msg="finished streaming call with code Unimplemented" error="rpc error: code = Unimplemented desc = method ListenToPrebuildStatus not implemented" grpc.code=Unimplemented grpc.method=ListenToPrebuildStatus grpc.service=gitpod.v1.PrebuildsService grpc.start_time="2022-04-27T11:37:07Z" grpc.time_ms=0.019 span.kind=server system=grpc
time="2022-04-27T11:37:07Z" level=error msg="finished streaming call with code Unimplemented" error="rpc error: code = Unimplemented desc = method ListenToPrebuildLogs not implemented" grpc.code=Unimplemented grpc.method=ListenToPrebuildLogs grpc.service=gitpod.v1.PrebuildsService grpc.start_time="2022-04-27T11:37:07Z" grpc.time_ms=0.036 span.kind=server system=grpc
time="2022-04-27T11:37:07Z" level=info msg="Received graceful shutdown request."
time="2022-04-27T11:37:07Z" level=info msg="GRPC server terminated."
time="2022-04-27T11:37:07Z" level=info msg="HTTP server terminated."
--- PASS: TestPublicAPIServer_v1_PrebuildService (0.10s)
...

Release Notes

NONE

Documentation

NONE

@easyCZ easyCZ requested a review from a team April 27, 2022 11:38
@github-actions github-actions bot added the team: webapp Issue belongs to the WebApp team label Apr 27, 2022
@easyCZ easyCZ force-pushed the mp/baseserver-grpc-log branch from 5f23c8a to 749bf2a Compare April 27, 2022 11:40
@easyCZ easyCZ force-pushed the mp/baseserver-grpc-log branch from 749bf2a to 3146b08 Compare April 27, 2022 12:32
@laushinka laushinka self-assigned this Apr 27, 2022
@laushinka
Copy link
Contributor

Test passed

@roboquat roboquat merged commit e09c699 into main Apr 27, 2022
@roboquat roboquat deleted the mp/baseserver-grpc-log branch April 27, 2022 12:46
@roboquat roboquat added deployed: webapp Meta team change is running in production deployed Change is completely running in production labels Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deployed: webapp Meta team change is running in production deployed Change is completely running in production release-note-none size/M team: webapp Issue belongs to the WebApp team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants