-
Notifications
You must be signed in to change notification settings - Fork 1.1k
logging: reduce message size #1721
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
Conversation
no change in behavior
Changes Unknown when pulling f9f862c on pongad:logging-label into ** on GoogleCloudPlatform:master**. |
Overall this looks good to me. Re your points:
|
I think "native level" is hard to figure out. "request level" is better, but still potentially confusing. How about "default level"? |
I think the problem with "default level" is that it is too similar to "level", which is a property of the Handler object. Maybe "default request level", but it still sounds like this setting has semantic meaning, rather than being just a performance optimization. |
maybe "common request level". |
Answers inline
Maybe we should just call it
You made a good point that since it's purely optimization, it might not need one. We could document the
Doing this raises a question I don't have a good answer to yet. I think we should do is:
Later
|
SGTM. Even once we can change do 1 and 2, we may not want to give users that knob until we are sure they want it. I think the tracking issue you suggest is a good idea. Re googleapis/gax-java#194 I am working on that change - will close out that PR and open a new one once it is ready for review. |
This PR turns the hard coded config string into a map and a rendering function. This doesn't do anything straightaway, but will simplify #1721 .
also improve tests
Changes Unknown when pulling c6139d6 on pongad:logging-label into ** on GoogleCloudPlatform:master**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - handle my comments as you see fit.
@@ -67,6 +68,12 @@ | |||
* {@code java.log}). | |||
* <li>{@code com.google.cloud.logging.LoggingHandler.level} specifies the default level for the | |||
* handler (defaults to {@code Level.INFO}). | |||
* <p> This configuration also sets the "base severity level". | |||
* Logs with the same severity with the base could be more efficiently sent to Stackdriver. | |||
* The base severity defaults to the level of of handler or {@code Level.FINEST} |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -67,6 +68,12 @@ | |||
* {@code java.log}). | |||
* <li>{@code com.google.cloud.logging.LoggingHandler.level} specifies the default level for the | |||
* handler (defaults to {@code Level.INFO}). | |||
* <p> This configuration also sets the "base severity level". |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@@ -149,8 +147,15 @@ | |||
.put("resourceType", "testResourceType") | |||
.put("synchronicity", "SYNC") | |||
.build(); | |||
private static final ImmutableMap<String, String> NATIVE_SEVERITY_MAP = |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM |
@garrettjonesgoogle I replied to your comment. Wanted to make sure it's good with you before merging. PTAL. |
Changes Unknown when pulling 72316dc on pongad:logging-label into ** on GoogleCloudPlatform:master**. |
LGTM |
ship it |
I'll hold until CI pass just to make sure :) |
Changes Unknown when pulling d8d2ca0 on pongad:logging-label into ** on GoogleCloudPlatform:master**. |
Changes Unknown when pulling 744391d on pongad:logging-label into ** on GoogleCloudPlatform:master**. |
This commit is based on top of #1720 . Once we merge that, I'll rebase to make this PR easier to review.
This PR fixes #1712 , using the method suggested in the issue.
To un-WIP this PR (in rough dependency-order):
Think of a better name for "native level"Native level and setLevel works from the same config. When we know what to call the former, give it its own config.Maybe we need a config class? It can be pre-populated with the property values but let users override.
@garrettjonesgoogle @michaelbausor What do you think of 1 and 3?