mirror of
https://github.com/cmur2/dyndnsd.git
synced 2024-12-21 14:54:22 +01:00
gems: update rack-tracer to version 0.8.0
Since rack-tracer now supports OpenTracing.active_span we should start using it as well and therefore do not need spanmanager gem anymore. See: Update rack-tracer to version 0.8.0 (#16)
This commit is contained in:
parent
4f3e591f13
commit
bd7c786c9c
@ -24,8 +24,7 @@ Gem::Specification.new do |s|
|
|||||||
s.add_runtime_dependency 'json'
|
s.add_runtime_dependency 'json'
|
||||||
s.add_runtime_dependency 'metriks'
|
s.add_runtime_dependency 'metriks'
|
||||||
s.add_runtime_dependency 'opentracing', '~> 0.4.0'
|
s.add_runtime_dependency 'opentracing', '~> 0.4.0'
|
||||||
s.add_runtime_dependency 'rack-tracer', '~> 0.6.0'
|
s.add_runtime_dependency 'rack-tracer', '~> 0.8.0'
|
||||||
s.add_runtime_dependency 'spanmanager', '~> 0.3.0'
|
|
||||||
s.add_runtime_dependency 'jaeger-client', '~> 0.6.0'
|
s.add_runtime_dependency 'jaeger-client', '~> 0.6.0'
|
||||||
|
|
||||||
s.add_development_dependency 'bundler'
|
s.add_development_dependency 'bundler'
|
||||||
|
@ -10,7 +10,6 @@ require 'metriks'
|
|||||||
require 'metriks/reporter/graphite'
|
require 'metriks/reporter/graphite'
|
||||||
require 'opentracing'
|
require 'opentracing'
|
||||||
require 'rack/tracer'
|
require 'rack/tracer'
|
||||||
require 'spanmanager'
|
|
||||||
|
|
||||||
require 'dyndnsd/generator/bind'
|
require 'dyndnsd/generator/bind'
|
||||||
require 'dyndnsd/updater/command_with_bind_zone'
|
require 'dyndnsd/updater/command_with_bind_zone'
|
||||||
@ -266,8 +265,6 @@ module Dyndnsd
|
|||||||
host: host, port: port, service_name: service_name, flush_interval: 1
|
host: host, port: port, service_name: service_name, flush_interval: 1
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
# always use SpanManager
|
|
||||||
OpenTracing.global_tracer = SpanManager::Tracer.new(OpenTracing.global_tracer)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private_class_method def self.setup_rack(config)
|
private_class_method def self.setup_rack(config)
|
||||||
|
@ -28,13 +28,14 @@ module Dyndnsd
|
|||||||
end
|
end
|
||||||
|
|
||||||
def self.span(operation, &block)
|
def self.span(operation, &block)
|
||||||
span = OpenTracing.start_span(operation)
|
scope = OpenTracing.start_active_span(operation)
|
||||||
|
span = scope.span
|
||||||
span.set_tag('component', 'dyndnsd')
|
span.set_tag('component', 'dyndnsd')
|
||||||
span.set_tag('span.kind', 'server')
|
span.set_tag('span.kind', 'server')
|
||||||
begin
|
begin
|
||||||
block.call(span)
|
block.call(span)
|
||||||
ensure
|
ensure
|
||||||
span.finish
|
scope.close
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user