-
Notifications
You must be signed in to change notification settings - Fork 821
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
context-async-hooks throws unhandled exception with follow-redirects 1.13.3 dependency #2068
Comments
Not sure if this changes anything but looking into your dependencies it seems you mix incompatible versions of API and SDK/Instrumentations (see compatibility matrix). Update: It doesn't change anything. |
I think this is a problem in follow-redirects. I created follow-redirects/follow-redirects#159. |
Not much feedback so far. Is there a way we can work around it for now? |
@AKWolff037 what makes you think this is an issue with the context-async-hooks package? Is it just because you see it in the stack traces? I think this is more likely an issue with the http instrumentation. |
The issue is almost certainly caused by the follow-redirects update, but it's also causing an unhandled exception to be thrown from opentelemetry which crashes the application - and goes against the spec. The best fix is for follow-redirects to get updated again, but if a dependency update can cause opentelemetry to crash the application then that's a major concern that should probably be handled on the opentelemetry side - imo. |
I wasn't arguing that it was an issue with opentelemetry. I was wondering what pointed you specifically at the context async hooks package rather than a different opentelemetry package. |
Ah. Yeah basically only the stack trace :) |
I think the problem is in Actual there are two problems:
A fix should be simple and I can create a PR later. If someone else is faster feel free to start. Please note that this will only fix the crash here which is caused by not removing the "error" event. But it will uncover another issue that span is never ended - because this happens in close event which will be removed then by follow-redirects. |
Never ending span is not ideal, but is better than crash. I think non-ending spans will not leak memory so we should be ok there too. |
Please answer these questions before submitting a bug report.
What version of OpenTelemetry are you using?
0.18.2
What version of Node are you using?
12.18.4
Please provide the code you used to setup the OpenTelemetry SDK
The same result with everything commented out before
const axios
What did you do?
If possible, provide a recipe for reproducing the error.
Update dependency graph to use
follow-redirects
version1.13.3
instead of earlier versions.What did you expect to see?
The same behavior as when
follow-redirects
version1.13.1
was installed.What did you see instead?
The tracer threw an uncaught exception.
Additional context
Add any other context about the problem here.
It appears it was caused by this change, which was made to the follow-redirects module in order stop potential memory leaks with failed calls. follow-redirects/follow-redirects#152
All dependencies installed for above test/reproduction script:
The text was updated successfully, but these errors were encountered: