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

Add debug logging interceptor for RPC logs #3496

Merged
merged 3 commits into from
Nov 25, 2024
Merged

Conversation

doriable
Copy link
Member

This adds an interceptor for RPC-level debug logs that were lost
when the tracing instrumentation was removed (#3374).

Fixes #3484

Copy link
Contributor

github-actions bot commented Nov 25, 2024

The latest Buf updates on your PR. Results from workflow Buf CI / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedNov 25, 2024, 10:35 PM

@doriable
Copy link
Member Author

Tested by using the same example from the issue, example of new logs:

$ buf push --debug
DEBUG   buffetch termination found      {"curDirPath": "Users/dkeung/src/playground/a", "path": "Users/dkeung/src/playground/a"}
DEBUG   buffetch termination found      {"curDirPath": ".", "path": "."}
DEBUG   targeting workspace based on v2 buf.yaml        {"subDirPath": "."}
DEBUG   github.com/bufbuild/buf/private/buf/bufworkspace.(*workspaceProvider).getWorkspaceForBucketBufYAMLV2    {"duration": "40.375µs"}
DEBUG   github.com/bufbuild/buf/private/buf/bufctl.(*controller).getWorkspaceForSourceRef       {"duration": "989.833µs"}
DEBUG   module data store dir read write bucket {"moduleFullName": "buf.build/googleapis/googleapis", "commitID": "c0913f24652a4cfc95f77d97443a5005", "dirPath": "b5/buf.build/googleapis/googleapis/c0913f24652a4cfc95f77d97443a5005"}
DEBUG   module data store get module.yaml       {"moduleFullName": "buf.build/googleapis/googleapis", "commitID": "c0913f24652a4cfc95f77d97443a5005", "found": false, "error": "stat b5/buf.build/googleapis/googleapis/c0913f24652a4cfc95f77d97443a5005/module.yaml: file does not exist"}
DEBUG   buf.registry.module.v1.GraphService/GetGraph    {"duration": "129.280166ms", "status": "code_0", "net.peer.name": "buf.build", "rpc.system": "connect", "message.sent.uncompressed_size": 36, "message.received.uncompressed_size": 225}
DEBUG   buf.registry.module.v1.DownloadService/Download {"duration": "85.85175ms", "status": "code_0", "net.peer.name": "buf.build", "rpc.system": "connect", "message.sent.uncompressed_size": 38, "message.received.uncompressed_size": 232432}
DEBUG   buf.registry.module.v1.ModuleService/GetModules {"duration": "53.29575ms", "status": "code_0", "net.peer.name": "buf.build", "rpc.system": "connect", "message.sent.uncompressed_size": 36, "message.received.uncompressed_size": 120}
DEBUG   module data store dir read write bucket {"moduleFullName": "buf.build/googleapis/googleapis", "commitID": "c0913f24652a4cfc95f77d97443a5005", "dirPath": "b5/buf.build/googleapis/googleapis/c0913f24652a4cfc95f77d97443a5005"}
DEBUG   module data store put read check module.yaml    {"moduleFullName": "buf.build/googleapis/googleapis", "commitID": "c0913f24652a4cfc95f77d97443a5005", "found": false, "error": "stat b5/buf.build/googleapis/googleapis/c0913f24652a4cfc95f77d97443a5005/module.yaml: file does not exist"}
DEBUG   module data store put check module.yaml {"moduleFullName": "buf.build/googleapis/googleapis", "commitID": "c0913f24652a4cfc95f77d97443a5005", "found": false, "error": "stat b5/buf.build/googleapis/googleapis/c0913f24652a4cfc95f77d97443a5005/module.yaml: file does not exist"}
DEBUG   module data store dir read write bucket {"moduleFullName": "buf.build/googleapis/googleapis", "commitID": "c0913f24652a4cfc95f77d97443a5005", "dirPath": "b5/buf.build/googleapis/googleapis/c0913f24652a4cfc95f77d97443a5005"}
DEBUG   module data store get module.yaml       {"moduleFullName": "buf.build/googleapis/googleapis", "commitID": "c0913f24652a4cfc95f77d97443a5005", "found": true}
DEBUG   github.com/bufbuild/buf/private/bufpkg/bufimage.BuildImage      {"duration": "301.368ms"}
DEBUG   buf.registry.module.v1.ModuleService/GetModules {"duration": "482.24475ms", "status": "code_0", "net.peer.name": "buf.build", "rpc.system": "connect", "message.sent.uncompressed_size": 18, "message.received.uncompressed_size": 114}
DEBUG   buf.registry.module.v1.UploadService/Upload     {"duration": "414.175833ms", "status": "code_0", "net.peer.name": "buf.build", "rpc.system": "connect", "message.sent.uncompressed_size": 144, "message.received.uncompressed_size": 223}

@doriable doriable merged commit 1d8835c into main Nov 25, 2024
10 checks passed
@doriable doriable deleted the 3484-debug-log-interceptor branch November 25, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Debug logs no longer provide all RPC information
2 participants