FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: auto-populate metadata of log entries at write() by minherz · Pull Request #803 · googleapis/java-logging · GitHub

This repository was archived by the owner on Feb 6, 2026. It is now read-only.
/ java-logging Public archive

feat: auto-populate metadata of log entries at write() - #803

Merged
minherz merged 4 commits into
minherz/structured_loggingfrom
minherz/691
Dec 22, 2021
Merged

feat: auto-populate metadata of log entries at write()#803
minherz merged 4 commits into
minherz/structured_loggingfrom
minherz/691

Conversation

minherz commented Dec 21, 2021

Copy link
Copy Markdown
Contributor

Implements auto-population of metadata (resource info, http requests, trace and span ids, source location).
Respects auto-population LoggingOptions configuration and WriteOption flag.

change visibility of constants in LoggingImpl and MonitoredResourceUtil to use in tests.
resolve warning in BaseSystemTest by removing unused var.
minherz requested a review from losalex December 21, 2021 14:26
minherz self-assigned this Dec 21, 2021
minherz requested review from a team December 21, 2021 14:26
product-auto-label Bot added size: m Pull request size is medium. api: logging Issues related to the googleapis/java-logging API. labels Dec 21, 2021

losalex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Overall looks good, just asking you to shorten a write function

builder.setTrace(context.getTraceId());
}
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This function becomes too bulky and hard to follow - perhaps you can export the part dealing with context into private function?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I will look into it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks

minherz Dec 22, 2021
edited
Loading

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

the trace metadata formatting is moved to a stand-alone method

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 merged commit cfa3db5 into minherz/structured_logging Dec 22, 2021
minherz deleted the minherz/691 branch December 22, 2021 13:26
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.

Labels

api: logging Issues related to the googleapis/java-logging API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL