Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
cbbac15f0599
Commit
efaccbbf
authored
Sep 04, 2018
by
Andrew Newdigate
Committed by
Robert Speicher
Sep 04, 2018
Browse files
Add gitaly_calls to API structured logs
parent
6a09845b3bff
Changes
3
Hide whitespace changes
Inline
Side-by-side
changelogs/unreleased/an-ap_log_gitaly_calls.yml
0 → 100644
View file @
cbbac15f
---
title
:
Add gitaly_calls attribute to API logs
merge_request
:
21496
author
:
type
:
other
lib/api/api.rb
View file @
cbbac15f
...
...
@@ -16,7 +16,8 @@ class API < Grape::API
GrapeLogging
::
Loggers
::
FilterParameters
.
new
,
GrapeLogging
::
Loggers
::
ClientEnv
.
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
...
...
lib/gitlab/grape_logging/loggers/perf_logger.rb
0 → 100644
View file @
cbbac15f
# 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