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

Add logging driver for Google Cloud Logging #18766

Merged
merged 2 commits into from
Mar 2, 2016
Merged

Conversation

mikedanese
Copy link
Contributor

@mikedanese
Copy link
Contributor Author

@vdemeester how do i get a design review on this patch set?

@thaJeztah
Copy link
Member

@mikedanese apologies for the delay, I'll see if there's a maintainer to review soon, but that may be next week due to New Year, and some maintainers having some days off for the holidays and new year.

@mikedanese
Copy link
Contributor Author

Thanks @thaJeztah, no worries.

@mikedanese
Copy link
Contributor Author

@thaJeztah Is anyone able to review this yet?

@mikedanese
Copy link
Contributor Author

@thaJeztah @vdemeester is there any recommendation on how I can move this forward?

@icecrime
Copy link
Contributor

That's a lot of dependencies.. ;-)

LGTM, WDYT @LK4D4?

@thaJeztah thaJeztah added this to the 1.11.0 milestone Jan 26, 2016
@icecrime
Copy link
Contributor

icecrime commented Feb 2, 2016

Ping @LK4D4 @vdemeester!

@mikedanese mikedanese force-pushed the gcplogs branch 2 times, most recently from d0ec6a1 to 49e1c7d Compare February 2, 2016 20:30
}

// we start dropping logs at 10,000 log lines per second.
c.Overflow = func(_ *logging.Client, _ logging.Entry) error {
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't fully understand what does it mean. Do we log errors only once in 1000 dropped messages? What comment means?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The logger "overflows" at a rate of 10,000 logs per second (but could be configured higher or lower) and this overflow func is called. I'm looking for a way to surface the error to the user. Currently it logs an error once every 1000 messages. If i log every message it spams /var/log/docker.log. I could log at most once every 5 seconds or I could ignore these logs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@LK4D4 Would you prefer I change this to work someway else?

Copy link
Contributor

Choose a reason for hiding this comment

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

No, it's ok, but better to put your answer in comment.

@mikedanese
Copy link
Contributor Author

@icecrime @LK4D4 I've updated the comment.

@@ -207,6 +208,7 @@ __docker_get_log_options() {
syslog_options=("syslog-address" "syslog-tls-ca-cert" "syslog-tls-cert" "syslog-tls-key" "syslog-tls-skip-verify" "syslog-facility" "tag")
splunk_options=("env" "labels" "splunk-caname" "splunk-capath" "splunk-index" "splunk-insecureskipverify" "splunk-source" "splunk-sourcetype" "splunk-token" "splunk-url" "tag")

[[ $log_driver = (gcplogs|all) ]] && _describe -t gcplogs-options "gcplogs options" gcplogs_options "$@" && ret=0
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: same here alphabetical order

@mikedanese
Copy link
Contributor Author

Thanks for the review @thaJeztah @albers @sdurrheimer. I've append a commit that addresses the comments.

@albers
Copy link
Member

albers commented Feb 23, 2016

The log-cmd option seems to be driver specific, so maybe it should be renamed to gcp-log-cmd.

@albers
Copy link
Member

albers commented Feb 23, 2016

bash completion is perfect, thanks very much! LGTM (IANAM)

@thaJeztah
Copy link
Member

The log-cmd option seems to be driver specific, so maybe it should be renamed to tcp-log-cmd.

Good suggestion if it's specific to this driver

I'll check the docs later

The added dependencies are:
* golang.org/x/oauth2
* google.golang.org/api
* google.golang.org/cloud

Signed-off-by: Mike Danese <mikedanese@google.com>
@mikedanese
Copy link
Contributor Author

The log-cmd option seems to be driver specific, so maybe it should be renamed to tcp-log-cmd.

Done.

@thaJeztah
Copy link
Member

Thanks @mikedanese, last couple of nits, but we're almost there

@thaJeztah
Copy link
Member

ping @mikedanese can you update your PR?

Signed-off-by: Mike Danese <mikedanese@google.com>
@calavera
Copy link
Contributor

calavera commented Mar 1, 2016

@thaJeztah docs update LGTM, can you take a look?

@thaJeztah
Copy link
Member

Thanks @mikedanese sorry missed you updated the PR

tested the docs and LGTM!

@thaJeztah
Copy link
Member

restarted windowsTP4

@mikedanese
Copy link
Contributor Author

@thaJeztah Just sent it out this morning. I was going to wait for ci to go green before pinging you :) Thanks for the review!

@thaJeztah
Copy link
Member

Oh, it's green now, merging!

thaJeztah added a commit that referenced this pull request Mar 2, 2016
Add logging driver for Google Cloud Logging
@thaJeztah thaJeztah merged commit 3c4d093 into moby:master Mar 2, 2016
@mikedanese mikedanese deleted the gcplogs branch March 2, 2016 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet