This repository was archived by the owner on Feb 6, 2026. It is now read-only.
feat: auto-populate metadata of log entries at write()#803
Merged
minherz merged 4 commits intominherz/structured_loggingfrom Dec 22, 2021
Merged
feat: auto-populate metadata of log entries at write()#803minherz merged 4 commits intominherz/structured_loggingfrom
minherz merged 4 commits intominherz/structured_loggingfrom
Conversation
change visibility of constants in LoggingImpl and MonitoredResourceUtil to use in tests. resolve warning in BaseSystemTest by removing unused var.
losalex
suggested changes
Dec 21, 2021
Contributor
losalex
left a comment
There was a problem hiding this comment.
Overall looks good, just asking you to shorten a write function
| builder.setTrace(context.getTraceId()); | ||
| } | ||
| } | ||
| } |
Contributor
There was a problem hiding this comment.
This function becomes too bulky and hard to follow - perhaps you can export the part dealing with context into private function?
Contributor
Author
There was a problem hiding this comment.
I will look into it.
Contributor
Author
There was a problem hiding this comment.
the trace metadata formatting is moved to a stand-alone method
google-cloud-logging/src/main/java/com/google/cloud/logging/LoggingImpl.java
Show resolved
Hide resolved
losalex
approved these changes
Dec 22, 2021
move the trace metadata formatting to a standalone method. add comments. add unit tests to validate resource metadata prioritizing when passed as WriteOption. fix Context.Builder.setRequest() when passing null.
minherz
added a commit
that referenced
this pull request
Dec 30, 2021
Populate empty metadata fields of each log entry on write().
minherz
added a commit
that referenced
this pull request
Jan 4, 2022
Populate empty metadata fields of each log entry on write().
minherz
added a commit
that referenced
this pull request
Jan 5, 2022
Populate empty metadata fields of each log entry on write().
minherz
added a commit
that referenced
this pull request
Jan 7, 2022
…ogs redirection to stdout in JUL handler (#808) Aggregates the following work: - #821 - #812 - #807 - #803 - #798 Fixes #689, #691, #799 and #800 * 🦉 Updates from OwlBot See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements auto-population of metadata (resource info, http requests, trace and span ids, source location).
Respects auto-population LoggingOptions configuration and WriteOption flag.