|author||Dan Jacques <email@example.com>||Mon Dec 04 21:10:45 2017|
|committer||Commit Bot <firstname.lastname@example.org>||Tue Dec 05 00:28:04 2017|
[impl/cloud] request management and logging Add a middleware-friendly function to manage scoped requests. This will install request information into the Context on invocation and terminate request handling on completion. Add a finalizing log. After discussion with Stackdriver Logging UI, it seems that there is nothing magical about the request log entry other than the Trace ID association. Consqeuently, we now (when configured properly) emit a custom top-level log (defualt "gae.request") with severity and associated metadata to track the HTTP request and its lifecycle. This can be used as an alternative to the "nginx" logs that are currently being used for grouping. In support of this, we introduce a scoped request wrapper, which sets up a common request handling environment, executes a request handler, and emits request-related monitoring information on completion. Usage of this API is optional, but enables top-level aggregate severity logs and other runtime metrics to be emitted as logs. Future iterations may also expand on this to create/destroy request resources. Configure the logger to tee to STDERR in addition to Stackdriver, in case the Stackdriver client isn't working. Add Insert ID generation (based off Trace ID) to log messages to prevent duplicates on resend. Change-Id: I7fe67394c18662ce257865599c812e022696f272 Reviewed-on: https://chromium-review.googlesource.com/805362 Commit-Queue: Daniel Jacques <email@example.com> Reviewed-by: Robbie Iannucci <firstname.lastname@example.org>
designed for testing and extensibility
(but generally it should be pretty stableish).
go get -u go.chromium.org/gae/...
See the godocs.
mastercontains the latest code.
user.nameare configured in
go get -u github.com/maruel/pre-commit-go/cmd/... && pcg
Run the following to setup the code review tool and create your first review:
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git $HOME/src/depot_tools export PATH="$PATH:$HOME/src/depot_tools" cd $GOROOT/github.com/luci/gae git new-branch work # or `git checkout -b work origin/master` if you like typing more. # hack hack git commit -a -m "This is awesome\nRemail@example.com" # This will ask for your Google Account credentials. git cl upload -s # Wait for LGTM over email. # Check Commit Queue checkbox in Rietveld codereview site. # See it tested and landed automatically.
git cl help and
git cl help <cmd> for more details.