Add "action" tag to /internal/allowed API
This allows us to re-use any other analytics that rely on the "action" tag having a value set.
This commit is contained in:
parent
58665b64f5
commit
b9698d2b45
2 changed files with 5 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
||||||
Please view this file on the master branch, on stable branches it's out of date.
|
Please view this file on the master branch, on stable branches it's out of date.
|
||||||
|
|
||||||
v 8.7.0 (unreleased)
|
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
|
- Method instrumentation now uses Module#prepend instead of aliasing methods
|
||||||
- Repository.clean_old_archives is now instrumented
|
- Repository.clean_old_archives is now instrumented
|
||||||
- Add support for environment variables on a job level in CI configuration file
|
- Add support for environment variables on a job level in CI configuration file
|
||||||
|
|
|
@ -23,9 +23,11 @@ module API
|
||||||
end
|
end
|
||||||
|
|
||||||
post "/allowed" do
|
post "/allowed" do
|
||||||
|
Gitlab::Metrics.tag_transaction('action', 'Grape#/internal/allowed')
|
||||||
|
|
||||||
status 200
|
status 200
|
||||||
|
|
||||||
actor =
|
actor =
|
||||||
if params[:key_id]
|
if params[:key_id]
|
||||||
Key.find_by(id: params[:key_id])
|
Key.find_by(id: params[:key_id])
|
||||||
elsif params[:user_id]
|
elsif params[:user_id]
|
||||||
|
@ -33,7 +35,7 @@ module API
|
||||||
end
|
end
|
||||||
|
|
||||||
project_path = params[:project]
|
project_path = params[:project]
|
||||||
|
|
||||||
# Check for *.wiki repositories.
|
# Check for *.wiki repositories.
|
||||||
# Strip out the .wiki from the pathname before finding the
|
# Strip out the .wiki from the pathname before finding the
|
||||||
# project. This applies the correct project permissions to
|
# project. This applies the correct project permissions to
|
||||||
|
|
Loading…
Reference in a new issue