(exporterhelper): Add exporterhelper timeout policy support
Description
Second half of https://github.com/open-telemetry/opentelemetry-collector/issues/11183.
Existing behavior is unchanged which is to sustain the short timeout, let it succeed if possible.
Alternative behaviors:
- "ignore": Ignore the short timeout, use the configured timeout
- "abort": Abort the request, since there is a chance the client will abort before we return.
Note: depends on #11387, has to be rebased. See also draft/discussion in https://github.com/open-telemetry/opentelemetry-collector/pull/11198.
Link to tracking issue
Fixes #11183
Testing
New tests for 3 policy variations and that default is unchanged.
Documentation
✅
This is a complete PR, so I am opening it for review.
However, I've added a new package config/configtimeout and it appears to break things if I try to add a new package and use it in the same PR (or same release). Therefore, I'm looking for feedback on the PR while in parallel, I'll send the new configtimeout package as a stand-alone PR.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
I am working on an RFC for this.