Skip to content

Commit

Permalink
lower HTTP timeout for telemetry worker
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Jun 25, 2024
1 parent d501969 commit 5b49795
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/datadog/core/telemetry/http/adapters/net.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class Net
:timeout,
:ssl

DEFAULT_TIMEOUT = 30
DEFAULT_TIMEOUT = 2

def initialize(hostname:, port: nil, timeout: DEFAULT_TIMEOUT, ssl: true)
@hostname = hostname
Expand Down
2 changes: 2 additions & 0 deletions lib/datadog/core/telemetry/worker.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def stop(force_stop = false, timeout = @shutdown_timeout)
end

def enqueue(event)
return if !enabled? || forked?

buffer.push(event)
end

Expand Down
2 changes: 1 addition & 1 deletion sig/datadog/core/telemetry/http/adapters/net.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module Datadog

attr_reader ssl: bool

DEFAULT_TIMEOUT: 30
DEFAULT_TIMEOUT: 2

def initialize: (hostname: String, ?port: Integer?, ?timeout: Float | Integer, ?ssl: bool?) -> void

Expand Down

0 comments on commit 5b49795

Please sign in to comment.