Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Newdigate <andrew@gitlab.com>2019-01-18 13:43:33 +0300
committerAndrew Newdigate <andrew@gitlab.com>2019-01-18 14:05:15 +0300
commit625bdc5ade890fb1fa67180602fdeab3acfb7962 (patch)
tree86f128100ba3d28062e39c3d50b837cc2471d8f8 /lib/gitlab
parent35c3cb7c480e812d3c6dcd8f8e2eb6c6a2da83b1 (diff)
Avoid overwriting default jaeger values with nil
During the review process for adding opentracing factories, a bug was introduced which caused Jaeger to initialize an invalid tracer. The bug was due to use sending nil through as a kwarg when the Jaeger initializer used a non-nil default value. This is fairly insidious as, the tracer looks like a tracer, but, when methods are invoked, it throws `NoMethodError` errors. To ensure that this issue does not happen in future, the tests have been changed to ensure that the tracer works as expected. This could avoid problems in future when upgrading to newer versions of Jaeger.
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/tracing/jaeger_factory.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/tracing/jaeger_factory.rb b/lib/gitlab/tracing/jaeger_factory.rb
index 0726f6b67f4..2682007302a 100644
--- a/lib/gitlab/tracing/jaeger_factory.rb
+++ b/lib/gitlab/tracing/jaeger_factory.rb
@@ -22,7 +22,7 @@ module Gitlab
service_name: service_name,
sampler: get_sampler(options[:sampler], options[:sampler_param]),
reporter: get_reporter(service_name, options[:http_endpoint], options[:udp_endpoint])
- }
+ }.compact
extra_params = options.except(:sampler, :sampler_param, :http_endpoint, :udp_endpoint, :strict_parsing, :debug) # rubocop: disable CodeReuse/ActiveRecord
if extra_params.present?