[EXPORTER] Fix incorrect doc comment about SessionState::TimedOut in the Elasticsearch exporter - #4647
[EXPORTER] Fix incorrect doc comment about SessionState::TimedOut in the Elasticsearch exporter#4647om7057 wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4647 +/- ##
=======================================
Coverage 86.66% 86.66%
=======================================
Files 525 525
Lines 20481 20481
=======================================
Hits 17748 17748
Misses 2733 2733
🚀 New features to boost your workflow:
|
|
Thanks for the investigation — the diagnosis is right, but I don't think we can remove the enumerator. SessionState is in an installed public header and is the event contract for any HttpClient implementation, including the out-of-tree ones we explicitly support. Removing it breaks their build, so it would need a DEPRECATED entry and a deprecation cycle per docs/deprecation-process.md. Also, #4604 is still |
No HttpClient implementation in this repo ever dispatched TimedOut. The curl client maps CURLE_OPERATION_TIMEDOUT to SendFailed like any other transport error, so the four branches handling TimedOut in the Elasticsearch and OTLP HTTP exporters were unreachable, and the doc comment claiming a timeout arrives as a TimedOut event was incorrect. Removed the dead branches and fixed the comment instead of making TimedOut reachable, since that would change behavior for any code already handling a timeout via SendFailed today. Fixes open-telemetry#4604
Removing SessionState::TimedOut requires going through the project's formal deprecation process (docs/deprecation-process.md), since it is part of an installed public header and the event contract for any out-of-tree HttpClient implementation. Issue open-telemetry#4604 is also still needs-triage, not yet accepted for a specific direction. Reverted the enum removal and the four now-restored dead branches in the Elasticsearch and OTLP HTTP exporters. Kept only the doc comment fix on ResponseHandler::waitForResponse(), which was simply incorrect about a timeout arriving as a TimedOut event when it actually arrives as SendFailed, and needs no process to correct. Addresses review feedback from nikhilbhatia08.
11b61f0 to
b3151b9
Compare
|
@nikhilbhatia08 Understood and thanks. I have scoped this down to just the doc comment fix, which was simply wrong about the event and needs no process to correct. |
Fixes #4604 (doc comment only; the enum question needs SIG discussion, see below)
Changes
ResponseHandler::waitForResponse()'s doc comment in the Elasticsearch log exporter claims a request timeout (set viaSetTimeoutMs()) "arrives here as a TimedOut session event." That's incorrect: noHttpClientimplementation in this repo dispatchesSessionState::TimedOut. The curl client mapsCURLE_OPERATION_TIMEDOUTtoSendFailed, indistinguishable from any other transport failure, which the comment now says.This PR originally also removed the unreachable
TimedOutenumerator and its four dead branches (Elasticsearch and OTLP HTTP exporters). A reviewer correctly pointed out that's not something to do directly:SessionStateis part of an installed public header and the event contract for any out-of-treeHttpClientimplementation, so removing an enumerator needs to go throughdocs/deprecation-process.md(SIG discussion, a[DEPRECATION]issue, aDEPRECATEDentry, a full deprecation cycle before removal). Issue #4604 is also stillneeds-triage, so it hasn't been accepted for a specific direction yet.Scoped this PR down to just the doc comment fix, which needs no process to correct. Left the actual enum question (dispatch
TimedOutfor real vs. deprecate-and-remove it) for the SIG to decide on the issue.Ran the full test suite locally, all passing.
CHANGELOG.mdupdated for non-trivial changes