Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] - Ensure detector HTTP clients share the same timeout set at runtime #3946

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

ahrav
Copy link
Collaborator

@ahrav ahrav commented Feb 26, 2025

Description:

This PR updates the way we handle the user-supplied detectorTimeout so that it also applies to the underlying HTTP clients used by the detectors. Previously, we only set the timeout on the per-detector context, but the actual HTTP client for detectors still used a default timeout value. Now, when the CLI flag detector-timeout is set, we call a function to override the DetectorHttpClientWithLocalAddresses and DetectorHttpClientWithNoLocalAddresses timeouts.
This ensures consistency between the detector code’s context timeout and the HTTP client’s timeout.

I also updated the default timeout to match the previous detectionTimeout value and modified the detectionTimeout variable to use the same DefaultResponseTimeout from our detectors package.

Checklist:

  • Tests passing (make test-community)?
  • Lint passing (make lint this requires golangci-lint)?

@ahrav ahrav marked this pull request as ready for review February 26, 2025 23:27
@ahrav ahrav requested review from a team as code owners February 26, 2025 23:27
@ahrav ahrav merged commit 7dc056a into main Feb 27, 2025
11 of 12 checks passed
@ahrav ahrav deleted the bug-detector-http-client-timeout branch February 27, 2025 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants