mirror of
https://github.com/HoneyryderChuck/httpx.git
synced 2025-10-08 00:02:42 -04:00
datadog: use Gem::Version for comparisons
This commit is contained in:
parent
02c1917004
commit
b0e1e2e837
@ -126,7 +126,7 @@ module Datadog::Tracing
|
|||||||
option :distributed_tracing, default: true
|
option :distributed_tracing, default: true
|
||||||
option :split_by_domain, default: false
|
option :split_by_domain, default: false
|
||||||
|
|
||||||
if DDTrace::VERSION::STRING >= "1.13.0"
|
if Gem::Version.new(DDTrace::VERSION::STRING) >= Gem::Version.new("1.13.0")
|
||||||
option :enabled do |o|
|
option :enabled do |o|
|
||||||
o.type :bool
|
o.type :bool
|
||||||
o.env "DD_TRACE_HTTPX_ENABLED"
|
o.env "DD_TRACE_HTTPX_ENABLED"
|
||||||
@ -182,12 +182,12 @@ module Datadog::Tracing
|
|||||||
|
|
||||||
option :distributed_tracing, default: true
|
option :distributed_tracing, default: true
|
||||||
|
|
||||||
if DDTrace::VERSION::STRING >= "1.15.0"
|
if Gem::Version.new(DDTrace::VERSION::STRING) >= Gem::Version.new("1.15.0")
|
||||||
option :error_handler do |o|
|
option :error_handler do |o|
|
||||||
o.type :proc
|
o.type :proc
|
||||||
o.default_proc(&DEFAULT_ERROR_HANDLER)
|
o.default_proc(&DEFAULT_ERROR_HANDLER)
|
||||||
end
|
end
|
||||||
elsif DDTrace::VERSION::STRING >= "1.13.0"
|
elsif Gem::Version.new(DDTrace::VERSION::STRING) >= Gem::Version.new("1.13.0")
|
||||||
option :error_handler do |o|
|
option :error_handler do |o|
|
||||||
o.type :proc
|
o.type :proc
|
||||||
o.experimental_default_proc(&DEFAULT_ERROR_HANDLER)
|
o.experimental_default_proc(&DEFAULT_ERROR_HANDLER)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user