-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[pkg/stanza] Windows input operator logs noisy error while collecting successfully #35520
[pkg/stanza] Windows input operator logs noisy error while collecting successfully #35520
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Please take a look @pjanotti
2e5bfc7
to
7a2d1c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not from this change, but, this seems to leak the remote session handle, since closing the subscription doesn't closes it. That said I think this happened because the way the code is structured: this would have been avoided if the remote session handle was also part of the subscription.
7a2d1c1
to
d62ab10
Compare
@pjanotti Thanks for your feedback. I updated the return for that function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kuiperda LGTM - if you can't start working soon on the remote session handle leak, could you, please, create a issue so we don't forget about it?
@pjanotti I'll make the issue but likely will not have time to work on it. |
… successfully (open-telemetry#35520) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> If `Input::read` returns 0, the operator will attempt to open the subscription again. This happens after a resubscribe *or* whenever there are no event logs to read, which is often. As a result, this error gets logged constantly: ``` "Failed to re-open subscription for remote server"..."error: subscription handle is already open" ``` To fix this, the handle should only attempt to re-open when the resubscribe happens. This is a followup to open-telemetry#35175 which fixed that resubscribe issue for the user that raised it, but they have also been confused by this error being logged. **Link to tracking Issue:** <Issue number if applicable> **N/A** **Testing:** <Describe what testing was performed and which tests were added.> Manually verified log collection is successful before and after remote host reconnects, and that the noisy error is silenced except during resubscribe, where it is relevant. **Documentation:** <Describe the documentation added.> **N/A**
… successfully (open-telemetry#35520) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> If `Input::read` returns 0, the operator will attempt to open the subscription again. This happens after a resubscribe *or* whenever there are no event logs to read, which is often. As a result, this error gets logged constantly: ``` "Failed to re-open subscription for remote server"..."error: subscription handle is already open" ``` To fix this, the handle should only attempt to re-open when the resubscribe happens. This is a followup to open-telemetry#35175 which fixed that resubscribe issue for the user that raised it, but they have also been confused by this error being logged. **Link to tracking Issue:** <Issue number if applicable> **N/A** **Testing:** <Describe what testing was performed and which tests were added.> Manually verified log collection is successful before and after remote host reconnects, and that the noisy error is silenced except during resubscribe, where it is relevant. **Documentation:** <Describe the documentation added.> **N/A**
Description:
If
Input::read
returns 0, the operator will attempt to open the subscription again. This happens after a resubscribe or whenever there are no event logs to read, which is often. As a result, this error gets logged constantly:To fix this, the handle should only attempt to re-open when the resubscribe happens.
This is a followup to #35175 which fixed that resubscribe issue for the user that raised it, but they have also been confused by this error being logged.
Link to tracking Issue: N/A
Testing: Manually verified log collection is successful before and after remote host reconnects, and that the noisy error is silenced except during resubscribe, where it is relevant.
Documentation: N/A