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): added marshalling methods for proto fields in structuredLogEntry #8979

Merged
merged 4 commits into from
Nov 13, 2023

Conversation

gkevinzheng
Copy link
Contributor

Fixes #7785 while still maintaining camelCase keys when marshalling proto objects.

@gkevinzheng gkevinzheng requested review from a team as code owners November 6, 2023 18:18
@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 6, 2023
TraceSampled bool `json:"logging.googleapis.com/trace_sampled,omitempty"`
Message json.RawMessage `json:"message"`
Severity string `json:"severity,omitempty"`
HTTPRequest *structuredLogEntryHTTPRequest `json:"httpRequest,omitempty"`
Copy link
Contributor

Choose a reason for hiding this comment

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

Since datatype of HTTPRequest is being changed, this can be a breaking change if the user is able to access this field. I see that structuredLogEntry type itself is unexported. So, it is highly unlikely but please recheck the rest of the logging code to ensure the same.

Copy link
Contributor

@daniel-sanche daniel-sanche left a comment

Choose a reason for hiding this comment

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

LGTM

@gkevinzheng gkevinzheng merged commit aa385f9 into googleapis:main Nov 13, 2023
9 checks passed
@gkevinzheng gkevinzheng deleted the logging-json-marshal-fix branch November 13, 2023 21:15
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: aoid json.marshall for proto objects
3 participants