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 request/response debug logging #2266

Draft
wants to merge 4 commits into
base: initialize-logging
Choose a base branch
from

Conversation

parthea
Copy link
Contributor

@parthea parthea commented Nov 29, 2024

This PR was built on top of #2265

Example debug logs

{"timestamp": "2024-11-29 12:30:05,731", "severity": "DEBUG", "name": "google.showcase_v1beta1.services.echo.client", "message": "Created client `google.showcase_v1beta1.EchoClient`.", "serviceName": "google.showcase.v1beta1.Echo", "universeDomain": "googleapis.com", "credentialType": "google.oauth2.credentials.Credentials", "credentialInfo": {"credential_source": "REDACTED", "credential_type": "user credentials"}}

{"timestamp": "2024-11-29 12:30:07,220", "severity": "DEBUG", "name": "google.showcase_v1beta1.services.echo.client", "message": "Sending request via google.showcase_v1beta1.EchoClient.echo", "rpcName": "Echo", "serviceName": "google.showcase.v1beta1.Echo", "request": "{\n  \"content\": \"The hail in Wales falls mainly on the snails.\",\n  \"requestId\": \"some_value\",\n  \"otherRequestId\": \"\",\n  \"severity\": 0,\n  \"header\": \"\",\n  \"otherHeader\": \"\"\n}", "retryAttempt": 1, "metadata": "{'some-key-bin': b'some_value', 'x-goog-api-version': 'v1_20240408'}"}

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Nov 29, 2024
@parthea parthea changed the title Add debug log when sending request Add request/response debug logging Nov 29, 2024
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant