Skip to content

fix: honor configured client timeouts when sending telemetry - #107

Open
Shubham-Padkonde wants to merge 1 commit into
newrelic:mainfrom
Shubham-Padkonde:fix/respect-client-timeout
Open

Shubham-Padkonde wants to merge 1 commit into
newrelic:mainfrom
Shubham-Padkonde:fix/respect-client-timeout

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Configuring MetricClient(key, timeout=5) currently does not limit subsequent send() or send_batch() calls: their default timeout=None is forwarded to urllib3 and disables the pool's configured timeout.

Distinguish an omitted request timeout from an explicit None. Omitted values use the pool configuration; a number still overrides it, and explicit None still disables it. Apply the same behavior to EventClient.send_batch() and document it on the sending methods.

Added coverage across all four client types and both sending methods, checking separate connect/read defaults, explicit overrides, and explicit disabling. Eight cases fail before the fix.

Validation: 162 tests pass with urllib3 1.26.20 and with urllib3 2.x; Ruff lint and formatting pass. Eight existing tests that send to live New Relic endpoints were excluded because no service credentials were used.

@Shubham-Padkonde
Shubham-Padkonde requested a review from a team as a code owner October 4, 2026 07:02

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant