Commit 7ec468df authored by Robert Speicher's avatar Robert Speicher

Merge branch 'an/ap_log_gitaly_calls' into 'master'

Add gitaly_calls to API structured logs

See merge request gitlab-org/gitlab-ce!21496
parents 304f43c2 a62a65b8
---
title: Add gitaly_calls attribute to API logs
merge_request: 21496
author:
type: other
......@@ -16,7 +16,8 @@ module 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
......
# 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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment