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

fix(logging): fix stdout log http request format #7083

Merged
merged 8 commits into from Nov 22, 2022
Merged

Conversation

daniel-sanche
Copy link
Contributor

@daniel-sanche daniel-sanche commented Nov 18, 2022

We had a bug when using standard out logs with http request objects, where the http objects were being output using snake_case names instead of mixedCase. This caused the GCP Logging parser to not detect the objects as http_request types, and dump the data in the main JSON payload instead.

After this fix, these logs should appropriately parse http request objects, and put the data in the httpRequest metadata field as expected.

Related environment test changes: googleapis/env-tests-logging#95

Fixes: #6391

@daniel-sanche daniel-sanche requested review from a team as code owners November 18, 2022 20:13
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: logging Issues related to the Cloud Logging API. labels Nov 18, 2022
Copy link
Contributor

@losalex losalex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - please also run this E2E in GCP to make sure it works as expected

@daniel-sanche daniel-sanche enabled auto-merge (squash) November 22, 2022 18:40
@daniel-sanche daniel-sanche merged commit 2894e66 into main Nov 22, 2022
@daniel-sanche daniel-sanche deleted the go-logging-http branch November 22, 2022 18:51
@nwadams
Copy link

nwadams commented Nov 22, 2022

@daniel-sanche thanks for fixing this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: logging Issues related to the Cloud Logging API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

logging: httpRequest RedirectAsJSON camel vs snake casing
3 participants