Ddtrace Ruby gem on upgrade from Ruby 2.5.8 to 2.6.6

I’m working on upgrading the Ruby version from 2.5 to 2.6 on a somewhat legacy application. We have a deploy pipeline setup through gitlab that deploys to kubernetes. I’m running into a weird error that seems to be happening at the ruby level and not within the rails framework but figured I’d get solid advice here.

The main issue seems to be around trying TCP connections to other services, datadog (through the ddtrace gem) being the one popping up as of now and a very similar error happening with AWS connections. The similarity in the errors is:

undefined method `<=' for 1024..65535:Range Did you mean?  <=>

I’ve pasted the relevant snippets from the k8s pod logs below. I appreciate any help and suggestions into where to look and what to try in advance.

E, [2021-06-29T18:22:14.438315 #1] ERROR -- ddtrace: [ddtrace] (/app/vendor/bundle/ruby/2.6.0/gems/ddtrace-0.50.0/lib/ddtrace/transport/http/client.rb:35:in `rescue in send_request') Internal error during HTTP transport request. Cause: Failed to open TCP connection to {dd_host_url}:8126 (undefined method `<=' for 1024..65535:Range
Did you mean?  <=>) Location: /usr/local/lib/ruby/2.6.0/net/http.rb:949:in `rescue in block in connect'

[1] * Listening on http://0.0.0.0:3000
[1] ! WARNING: Detected 3 Thread(s) started in app boot:
[1] ! #<Thread:0x00007fafb759a5d8@/app/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:299 sleep> - /app/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:301:in `sleep'
[1] ! #<Thread:0x00007fafadf70d78@/app/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:299 sleep> - /app/vendor/bundle/ruby/2.6.0/gems/activerecord-5.2.6/lib/active_record/connection_adapters/abstract/connection_pool.rb:301:in `sleep'
[1] ! #<Thread:0x00007fafaa9343e0@Datadog::Workers::AsyncTransport@/app/vendor/bundle/ruby/2.6.0/gems/ddtrace-0.50.0/lib/ddtrace/workers.rb:73 sleep> - /app/vendor/bundle/ruby/2.6.0/gems/ddtrace-0.50.0/lib/ddtrace/workers.rb:116:in `sleep'
[1] Use Ctrl-C to stop
[1] - Worker 0 (PID: 35) booted in 0.01s, phase: 0
[1] - Worker 1 (PID: 42) booted in 0.0s, phase: 0
{"level":"ERROR","timestamp":"2021-06-29T18:23:31+00:00","application":"Community","environment":"production","message":"[f752a10a-09a0-47a8-9c2d-6e96e081b877] Failure in PriorityRedirector.matches? (0x3fd7d4314d7c) \nRecorded at /app/app/models/redirector.rb:104:in `rescue in matches?'\nin routes\nNoMethodError:undefined method `\u003c=' for 1024..65535:Range\nDid you mean?  \u003c=\u003e\napp/models/priority_redirector.rb:8:in `all_rules'\napp/models/redirector.rb:72:in `matching_path'\napp/models/redirector.rb:102:in `matches?'\nlib/spiceworks/reject_browser_prefetch.rb:34:in `call'\nlib/error_monitor.rb:16:in `call'"}
{"level":"ERROR","timestamp":"2021-06-29T18:23:31+00:00","application":"app_name","environment":"production","message":"[f752a10a-09a0-47a8-9c2d-6e96e081b877] Failure in Cms::Page.matches? (0x3fd7dabbbc54) \nRecorded at /app/engines/cms/app/models/cms/page.rb:518:in `rescue in matches?'\nin routes\nNoMethodError:undefined method `\u003c=' for 1024..65535:Range\nDid you mean?  \u003c=\u003e\nengines/cms/app/models/cms/page.rb:506:in `published_routes'\nengines/cms/app/models/cms/page.rb:516:in `matches?'\nlib/service/reject_browser_prefetch.rb:34:in `call'\nlib/error_monitor.rb:16:in `call'"}
{"level":"FATAL","timestamp":"2021-06-29T18:23:31+00:00","application":"app_name","environment":"production","message":"[f752a10a-09a0-47a8-9c2d-6e96e081b877]   "}
{"level":"FATAL","timestamp":"2021-06-29T18:23:31+00:00","application":"app_name","environment":"production","message":"[f752a10a-09a0-47a8-9c2d-6e96e081b877] NoMethodError (Failed to open TCP connection to aws.sqs.endpoint:443 (undefined method `\u003c=' for 1024..65535:Range\nDid you mean?  \u003c=\u003e)):"}
{"level":"FATAL","timestamp":"2021-06-29T18:23:31+00:00","application":"app_name","environment":"production","message":"[f752a10a-09a0-47a8-9c2d-6e96e081b877]   "}
{"level":"FATAL","timestamp":"2021-06-29T18:23:31+00:00","application":"app_name","environment":"production","message":"[f752a10a-09a0-47a8-9c2d-6e96e081b877] lib/mail_service/aws_sqs_connection.rb:40:in `get_queue_url'\n[f752a10a-09a0-47a8-9c2d-6e96e081b877] lib/mail_service/aws_sqs_connection.rb:32:in `connected?'\n[f752a10a-09a0-47a8-9c2d-6e96e081b877] app/controllers/health_controller.rb:23:in `index'\n[f752a10a-09a0-47a8-9c2d-6e96e081b877] lib/service/reject_browser_prefetch.rb:34:in `call'\n[f752a10a-09a0-47a8-9c2d-6e96e081b877] lib/error_monitor.rb:16:in `call'"}