Skip to content

Commit

Permalink
DEBUG-3533 increase UDS transport timeout to 30 seconds (#4411)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-datadog authored Feb 20, 2025
1 parent 9ac1f2c commit 62d691e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/datadog/core/configuration/ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module HTTP
module UnixSocket
ADAPTER = :unix
DEFAULT_PATH = '/var/run/datadog/apm.socket'
DEFAULT_TIMEOUT_SECONDS = 1
DEFAULT_TIMEOUT_SECONDS = 30
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/datadog/core/transport/http/adapters/unix_socket.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def url

# Re-implements Net:HTTP with underlying Unix socket
class HTTP < ::Net::HTTP
DEFAULT_TIMEOUT = 1
DEFAULT_TIMEOUT = 30

attr_reader \
:filepath, # DEV(1.0): Rename to `uds_path`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
let(:uds_path) { '/var/run/datadog/apm.socket' }
let(:hostname) { nil }
let(:port) { nil }
let(:timeout_seconds) { 1 }
let(:timeout_seconds) { 30 }

it 'configures the agent to connect to unix:///var/run/datadog/apm.socket' do
expect(resolver).to have_attributes(
Expand Down Expand Up @@ -677,7 +677,7 @@

context 'when the uri scheme is unix' do
let(:environment) { { 'DD_TRACE_AGENT_URL' => 'unix:///path/to/apm.socket' } }
let(:timeout_seconds) { 1 }
let(:timeout_seconds) { 30 }

it 'contacts the agent via a unix domain socket' do
expect(resolver).to have_attributes(
Expand Down Expand Up @@ -712,7 +712,7 @@
describe 'uds_path' do
let(:hostname) { nil }
let(:port) { nil }
let(:timeout_seconds) { 1 }
let(:timeout_seconds) { 30 }
let(:adapter) { :unix }

context 'when a custom path is specified via code using "agent.uds_path ="' do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
it do
is_expected.to have_attributes(
uds_path: uds_path,
timeout: 1
timeout: 30,
)
end
end
Expand Down

0 comments on commit 62d691e

Please sign in to comment.