lib/httpx/adapters/datadog.rb in httpx-1.1.3 vs lib/httpx/adapters/datadog.rb in httpx-1.1.4

- old
+ new

@@ -124,11 +124,11 @@ option :service_name, default: "httpx" option :distributed_tracing, default: true 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| o.type :bool o.env "DD_TRACE_HTTPX_ENABLED" o.default true end @@ -180,15 +180,15 @@ end end 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| o.type :proc o.default_proc(&DEFAULT_ERROR_HANDLER) 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| o.type :proc o.experimental_default_proc(&DEFAULT_ERROR_HANDLER) end else