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
Fix race on Collector.Start() loosing error info #255
base: main
Are you sure you want to change the base?
Fix race on Collector.Start() loosing error info #255
Conversation
|
a34c27c
to
c5e9f1c
Compare
When the inner collector (go.opentelemetry.io/collector/service) Run() call fails (likely due to a bad config file) the lambda collector wrapper would likely loose the actual error information and report just the unexpected collector state (CLOSED) back to the caller. This PR makes the collector wrapper's Start() method race-free, so that the actual error information is not lost. Another improvement is related to the main() procedure - before this PR the main loop wouldn't handle situations when the inner collector exits before the SHUTDOWN event.
c5e9f1c
to
90898ef
Compare
@Aneurysm9 could you please help take a look at this? I remember last time we edited these files in #194 we were burned pretty bad before a release until we fixed in #207 😓 Please let me know what you think of this change! |
Kind reminder that this PR is still awaiting its review 😇 |
I think this PR will not cause the same issues that #194 did. It does not hang the initialization until the end of |
Thank you @Aneurysm9! I defer to you to merge if you think it looks good 🙂 |
Is this still a problem? This is a pretty old PR. I'm inclined to close it unless you want to revisit/rebase on main. |
@tylerbenson feel free to close it. I won't have time to check if the issue remains, and we don't use this code in prod now. |
When the inner collector (go.opentelemetry.io/collector/service) Run() call fails
(likely due to a bad config file) the lambda collector wrapper would
likely loose the actual error information and report just the unexpected
collector state (CLOSED) back to the caller. This PR makes the collector wrapper's
Start() method race-free, so that the actual error information is not
lost.
Another improvement is related to the main() procedure - before this PR the main loop
wouldn't handle situations when the inner collector exits before the
SHUTDOWN event.