summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2016-04-18 16:21:04 +0000
committerRobert Speicher <robert@gitlab.com>2016-04-18 16:21:04 +0000
commitea615534ca3e153784b30b7c5611c752b4eb47e6 (patch)
tree0857e4cbdc3e9dab7da290acd097c535831fe304
parent58665b64f5bd8795571876587ea3a19253532286 (diff)
parentb9698d2b4512cca4687579aafba6a4403cbc6067 (diff)
downloadgitlab-ce-ea615534ca3e153784b30b7c5611c752b4eb47e6.tar.gz
Merge branch 'tag-grape-allowed' into 'master'
Add "action" tag to /internal/allowed API See merge request !3791
-rw-r--r--CHANGELOG1
-rw-r--r--lib/api/internal.rb6
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 350be45627f..9a6f1bbfef5 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
Please view this file on the master branch, on stable branches it's out of date.
v 8.7.0 (unreleased)
+ - Transactions for /internal/allowed now have an "action" tag set
- Method instrumentation now uses Module#prepend instead of aliasing methods
- Repository.clean_old_archives is now instrumented
- Add support for environment variables on a job level in CI configuration file
diff --git a/lib/api/internal.rb b/lib/api/internal.rb
index 2200208b946..8cfa1f1556b 100644
--- a/lib/api/internal.rb
+++ b/lib/api/internal.rb
@@ -23,9 +23,11 @@ module API
end
post "/allowed" do
+ Gitlab::Metrics.tag_transaction('action', 'Grape#/internal/allowed')
+
status 200
- actor =
+ actor =
if params[:key_id]
Key.find_by(id: params[:key_id])
elsif params[:user_id]
@@ -33,7 +35,7 @@ module API
end
project_path = params[:project]
-
+
# Check for *.wiki repositories.
# Strip out the .wiki from the pathname before finding the
# project. This applies the correct project permissions to