Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
a62a65b8
Commit
a62a65b8
authored
Sep 04, 2018
by
Andrew Newdigate
Committed by
Robert Speicher
Sep 04, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add gitaly_calls to API structured logs
parent
304f43c2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
changelogs/unreleased/an-ap_log_gitaly_calls.yml
changelogs/unreleased/an-ap_log_gitaly_calls.yml
+5
-0
lib/api/api.rb
lib/api/api.rb
+2
-1
lib/gitlab/grape_logging/loggers/perf_logger.rb
lib/gitlab/grape_logging/loggers/perf_logger.rb
+14
-0
No files found.
changelogs/unreleased/an-ap_log_gitaly_calls.yml
0 → 100644
View file @
a62a65b8
---
title
:
Add gitaly_calls attribute to API logs
merge_request
:
21496
author
:
type
:
other
lib/api/api.rb
View file @
a62a65b8
...
@@ -16,7 +16,8 @@ module API
...
@@ -16,7 +16,8 @@ module API
GrapeLogging
::
Loggers
::
FilterParameters
.
new
,
GrapeLogging
::
Loggers
::
FilterParameters
.
new
,
GrapeLogging
::
Loggers
::
ClientEnv
.
new
,
GrapeLogging
::
Loggers
::
ClientEnv
.
new
,
Gitlab
::
GrapeLogging
::
Loggers
::
UserLogger
.
new
,
Gitlab
::
GrapeLogging
::
Loggers
::
UserLogger
.
new
,
Gitlab
::
GrapeLogging
::
Loggers
::
QueueDurationLogger
.
new
Gitlab
::
GrapeLogging
::
Loggers
::
QueueDurationLogger
.
new
,
Gitlab
::
GrapeLogging
::
Loggers
::
PerfLogger
.
new
]
]
allow_access_with_scope
:api
allow_access_with_scope
:api
...
...
lib/gitlab/grape_logging/loggers/perf_logger.rb
0 → 100644
View file @
a62a65b8
# frozen_string_literal: true
# This module adds additional performance metrics to the grape logger
module
Gitlab
module
GrapeLogging
module
Loggers
class
PerfLogger
<
::
GrapeLogging
::
Loggers
::
Base
def
parameters
(
_
,
_
)
{
gitaly_calls:
Gitlab
::
GitalyClient
.
get_request_count
}
end
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment