Commit 3956e7bb authored by Andrew Newdigate's avatar Andrew Newdigate Committed by Nick Thomas

Add cache tracing and Redis tracing

This change adds Distributed Tracing support for two new types of events

1. Redis Calls
1. ActiveSupport (Rails) Caching Operations

The intention is to help application developers and infrastructure
SREs to understand the pressure that caching operations can have on
the application when running at scale.

The Redis and Caching spans can be viewed in the Jaeger UI by clicking
the "Trace" link in the performance bar when running on GDK.
parent f7f3b3c3
...@@ -283,7 +283,7 @@ gem 'sentry-raven', '~> 2.9' ...@@ -283,7 +283,7 @@ gem 'sentry-raven', '~> 2.9'
gem 'premailer-rails', '~> 1.9.7' gem 'premailer-rails', '~> 1.9.7'
# LabKit: Tracing and Correlation # LabKit: Tracing and Correlation
gem 'gitlab-labkit', '~> 0.4.2' gem 'gitlab-labkit', '~> 0.5'
# I18n # I18n
gem 'ruby_parser', '~> 3.8', require: false gem 'ruby_parser', '~> 3.8', require: false
......
...@@ -311,12 +311,13 @@ GEM ...@@ -311,12 +311,13 @@ GEM
gitaly (1.58.0) gitaly (1.58.0)
grpc (~> 1.0) grpc (~> 1.0)
github-markup (1.7.0) github-markup (1.7.0)
gitlab-labkit (0.4.2) gitlab-labkit (0.5.2)
actionpack (~> 5) actionpack (~> 5)
activesupport (~> 5) activesupport (~> 5)
grpc (~> 1.19) grpc (~> 1.19)
jaeger-client (~> 0.10) jaeger-client (~> 0.10)
opentracing (~> 0.4) opentracing (~> 0.4)
redis (> 3.0.0, < 5.0.0)
gitlab-markup (1.7.0) gitlab-markup (1.7.0)
gitlab-sidekiq-fetcher (0.5.1) gitlab-sidekiq-fetcher (0.5.1)
sidekiq (~> 5) sidekiq (~> 5)
...@@ -712,7 +713,7 @@ GEM ...@@ -712,7 +713,7 @@ GEM
rails-dom-testing (2.0.3) rails-dom-testing (2.0.3)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
nokogiri (>= 1.6) nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4) rails-html-sanitizer (1.2.0)
loofah (~> 2.2, >= 2.2.2) loofah (~> 2.2, >= 2.2.2)
rails-i18n (5.1.1) rails-i18n (5.1.1)
i18n (>= 0.7, < 2) i18n (>= 0.7, < 2)
...@@ -1100,7 +1101,7 @@ DEPENDENCIES ...@@ -1100,7 +1101,7 @@ DEPENDENCIES
gettext_i18n_rails_js (~> 1.3) gettext_i18n_rails_js (~> 1.3)
gitaly (~> 1.58.0) gitaly (~> 1.58.0)
github-markup (~> 1.7.0) github-markup (~> 1.7.0)
gitlab-labkit (~> 0.4.2) gitlab-labkit (~> 0.5)
gitlab-markup (~> 1.7.0) gitlab-markup (~> 1.7.0)
gitlab-sidekiq-fetcher (= 0.5.1) gitlab-sidekiq-fetcher (= 0.5.1)
gitlab-styles (~> 2.7) gitlab-styles (~> 2.7)
......
---
title: Add Redis interceptor tracing
merge_request: 30238
author:
type: other
...@@ -21,9 +21,13 @@ if Labkit::Tracing.enabled? ...@@ -21,9 +21,13 @@ if Labkit::Tracing.enabled?
end end
end end
# Instrument Redis
Labkit::Tracing::Redis.instrument
# Instrument Rails # Instrument Rails
Labkit::Tracing::Rails::ActiveRecordSubscriber.instrument Labkit::Tracing::Rails::ActiveRecordSubscriber.instrument
Labkit::Tracing::Rails::ActionViewSubscriber.instrument Labkit::Tracing::Rails::ActionViewSubscriber.instrument
Labkit::Tracing::Rails::ActiveSupportSubscriber.instrument
# In multi-processed clustered architectures (puma, unicorn) don't # In multi-processed clustered architectures (puma, unicorn) don't
# start tracing until the worker processes are spawned. This works # start tracing until the worker processes are spawned. This works
......
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