[ARVADOS] updated: af71c836665dc299bebbbfee66919b80a5d79077
Git user
git at public.curoverse.com
Fri Aug 19 09:06:11 EDT 2016
Summary of changes:
services/api/app/models/arvados_model.rb | 17 ++++++++++++-----
services/api/app/models/collection.rb | 4 ++++
2 files changed, 16 insertions(+), 5 deletions(-)
discards e087fc478cf6f5a1d378da554df37ce55ac38e29 (commit)
discards eaa231c626dbb6cd21a667412d79baef2d0c5885 (commit)
discards 9163e7861100767492e56708b6c7d170091581a4 (commit)
via af71c836665dc299bebbbfee66919b80a5d79077 (commit)
via 3a35cabab78642483901f6556e1739f5e1e24e46 (commit)
via f5ccd93839e565f1cdc97552ff3f782dea820cc3 (commit)
via d4bb1f8a3c68288f45d2c1fa618c333825fcc8d0 (commit)
via aabc7a74ca16c8d72872988354e5e6d32be4fb00 (commit)
via 4da106ba69c8574366887a32c9e699f9b7410499 (commit)
via 02c34d4ceba8fc2b4b7ea64e22f7530f2dca60ef (commit)
via f824f854b26dbf5e6c1d10dc3eb4689349dd71fe (commit)
via f90267f98880d40c3038391561c5435e531b0722 (commit)
via 2bcd1451cbcad6e96610f0ddfe14a19f8dd4a3ba (commit)
via 1ca3acc34896c8f1325925cb017c70bb23eac704 (commit)
This update added new revisions after undoing existing revisions. That is
to say, the old revision is not a strict subset of the new revision. This
situation occurs when you --force push a change and generate a repository
containing something like this:
* -- * -- B -- O -- O -- O (e087fc478cf6f5a1d378da554df37ce55ac38e29)
\
N -- N -- N (af71c836665dc299bebbbfee66919b80a5d79077)
When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit af71c836665dc299bebbbfee66919b80a5d79077
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Aug 18 16:47:19 2016 -0400
9818: Log params when small, first 1K of json-encoded params when big.
diff --git a/apps/workbench/config/initializers/lograge.rb b/apps/workbench/config/initializers/lograge.rb
index a41384b..24252c8 100644
--- a/apps/workbench/config/initializers/lograge.rb
+++ b/apps/workbench/config/initializers/lograge.rb
@@ -1,4 +1,14 @@
ArvadosWorkbench::Application.configure do
config.lograge.enabled = true
config.lograge.formatter = Lograge::Formatters::Logstash.new
+ config.lograge.custom_options = lambda do |event|
+ exceptions = %w(controller action format id)
+ params = event.payload[:params].except(*exceptions)
+ params_s = Oj.dump(params)
+ if params_s.length > 1000
+ { params_truncated: params_s[0..1000] + "[...]" }
+ else
+ { params: params }
+ end
+ end
end
diff --git a/services/api/config/initializers/lograge.rb b/services/api/config/initializers/lograge.rb
index 50e2e23..e5bd200 100644
--- a/services/api/config/initializers/lograge.rb
+++ b/services/api/config/initializers/lograge.rb
@@ -1,4 +1,14 @@
Server::Application.configure do
config.lograge.enabled = true
config.lograge.formatter = Lograge::Formatters::Logstash.new
+ config.lograge.custom_options = lambda do |event|
+ exceptions = %w(controller action format id)
+ params = event.payload[:params].except(*exceptions)
+ params_s = Oj.dump(params)
+ if params_s.length > 1000
+ { params_truncated: params_s[0..1000] + "[...]" }
+ else
+ { params: params }
+ end
+ end
end
commit 3a35cabab78642483901f6556e1739f5e1e24e46
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Aug 18 15:18:45 2016 -0400
9818: Use lograge/logstash for Workbench request logs.
diff --git a/apps/workbench/Gemfile b/apps/workbench/Gemfile
index e35cc83..db569c9 100644
--- a/apps/workbench/Gemfile
+++ b/apps/workbench/Gemfile
@@ -93,3 +93,6 @@ gem "deep_merge", :require => 'deep_merge/rails_compat'
gem 'morrisjs-rails'
gem 'raphael-rails'
+
+gem 'lograge'
+gem 'logstash-event'
diff --git a/apps/workbench/Gemfile.lock b/apps/workbench/Gemfile.lock
index 2618e47..03bbbce 100644
--- a/apps/workbench/Gemfile.lock
+++ b/apps/workbench/Gemfile.lock
@@ -142,6 +142,11 @@ GEM
logging (2.1.0)
little-plugger (~> 1.1)
multi_json (~> 1.10)
+ lograge (0.3.6)
+ actionpack (>= 3)
+ activesupport (>= 3)
+ railties (>= 3)
+ logstash-event (1.2.02)
mail (2.6.3)
mime-types (>= 1.16, < 3)
memoist (0.14.0)
@@ -284,6 +289,8 @@ DEPENDENCIES
jquery-rails
less
less-rails
+ lograge
+ logstash-event
minitest (>= 5.0.0)
mocha
morrisjs-rails
@@ -309,3 +316,6 @@ DEPENDENCIES
therubyracer
uglifier (>= 1.0.3)
wiselinks
+
+BUNDLED WITH
+ 1.12.1
diff --git a/apps/workbench/config/initializers/lograge.rb b/apps/workbench/config/initializers/lograge.rb
new file mode 100644
index 0000000..a41384b
--- /dev/null
+++ b/apps/workbench/config/initializers/lograge.rb
@@ -0,0 +1,4 @@
+ArvadosWorkbench::Application.configure do
+ config.lograge.enabled = true
+ config.lograge.formatter = Lograge::Formatters::Logstash.new
+end
commit f5ccd93839e565f1cdc97552ff3f782dea820cc3
Author: Tom Clegg <tom at curoverse.com>
Date: Thu Aug 18 15:12:03 2016 -0400
9818: Use lograge to log API requests in logstash format.
Example log line:
{"method":"GET","path":"/arvados/v1/keep_services/accessible","format":"html","controller":"arvados/v1/keep_services","action":"accessible","status":200,"duration":11.07,"view":0.36,"db":2.63,"@timestamp":"2016-08-18T19:04:17Z","@version":"1","message":"[200] GET /arvados/v1/keep_services/accessible (arvados/v1/keep_services#accessible)"}
diff --git a/services/api/Gemfile b/services/api/Gemfile
index 4d03da3..5134fc4 100644
--- a/services/api/Gemfile
+++ b/services/api/Gemfile
@@ -81,3 +81,5 @@ gem 'pg_power'
gem 'puma'
gem 'sshkey'
gem 'safe_yaml'
+gem 'lograge'
+gem 'logstash-event'
diff --git a/services/api/Gemfile.lock b/services/api/Gemfile.lock
index 77e876e..391a26c 100644
--- a/services/api/Gemfile.lock
+++ b/services/api/Gemfile.lock
@@ -112,6 +112,11 @@ GEM
launchy (2.4.3)
addressable (~> 2.3)
libv8 (3.16.14.3)
+ lograge (0.3.6)
+ actionpack (>= 3)
+ activesupport (>= 3)
+ railties (>= 3)
+ logstash-event (1.2.02)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
@@ -237,6 +242,8 @@ DEPENDENCIES
factory_girl_rails
faye-websocket
jquery-rails
+ lograge
+ logstash-event
mocha
multi_json
oj
@@ -259,3 +266,6 @@ DEPENDENCIES
therubyracer
trollop
uglifier (>= 1.0.3)
+
+BUNDLED WITH
+ 1.12.1
diff --git a/services/api/config/initializers/lograge.rb b/services/api/config/initializers/lograge.rb
new file mode 100644
index 0000000..50e2e23
--- /dev/null
+++ b/services/api/config/initializers/lograge.rb
@@ -0,0 +1,4 @@
+Server::Application.configure do
+ config.lograge.enabled = true
+ config.lograge.formatter = Lograge::Formatters::Logstash.new
+end
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list