elastic / elastic/integrations
[Logstash]: Add configurable HTTP timeout for integration URL requests
- Dominant language
- Handlebars
- Stars
- 333
- Forks
- 647
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 225
Description
### Integration Name
Logstash [packages/logstash]
### Dataset Name
_No response_
### Integration Version
2.11.1
### Agent Version
9.4.2
### OS Version and Architecture
Red Hat Enterprise Linux 9 (x86_64)
### User Goal
Allow users to configure HTTP timeout settings when the Logstash integration makes HTTP requests to integration URLs. Currently, there's no way to customize timeout values, which can cause issues when:
- Connecting to slow or latency-prone APIs
- Working in environments with restrictive network conditions
- Handling large payloads that require longer processing time
### Existing Features
The current implementation appears to use default timeout values without exposing configuration options to users. This limits flexibility for different deployment scenarios and network conditions.
### What did you see?
Without configurable timeout settings, users experience request failures when APIs respond slower than the default timeout:
logstash.plugins: failed evaluation: failed eval: ERROR: :1:4: Get "http://:9600/_node/stats?graph=true&vertices=true": net/http: request canceled (Client.Timeout exceeded while awaiting headers) | get(state.url + "/stats?graph=true&vertices=true").as(resp, bytes(resp.Body).decode_json().as(body, | ...^
This results in:
- Inability to optimize timeout values for specific use cases
- Potential data loss or integration failures in unstable network environments
- Integration health degradation due to repeated timeout errors
### Anything else?
This feature would improve the robustness of the Logstash integration by allowing users to:
- Customize timeout thresholds per their requirements
- Handle various network conditions and API response times
- Reduce integration failures due to timeout issues
Contributor guide
Research direction
Start in packages/logstash by locating the integration's HTTP request entry points and the code that supplies the current timeout defaults. Confirm which configuration surface should expose the settings and add coverage showing the configured values are used for requests.
Written by the indexing model from the issue text.
Assessment
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100