fix: honor configured client timeouts when sending telemetry - #107
Open
Shubham-Padkonde wants to merge 1 commit into
Open
Shubham-Padkonde wants to merge 1 commit into
Shubham-Padkonde wants to merge 1 commit into
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configuring
MetricClient(key, timeout=5)currently does not limit subsequentsend()orsend_batch()calls: their defaulttimeout=Noneis 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 explicitNonestill disables it. Apply the same behavior toEventClient.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.