-
Notifications
You must be signed in to change notification settings - Fork 78
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
Missing diagnostics channel http.client.request.error
#635
Comments
I don't think it's intentional. There was simply noone to take the time to implement all these events. |
Thank you for your reply. I'll spend some time understanding what would be the appropriate process to propose this, in the meanwhile I'd be interested - if possible - to hear how other APM vendors are approaching the problem of instrumenting http requests with ESM. I'm familiar with loader-based approaches like |
http is a built in module and not ESM so besides ESM customization hooks it should be also possible to use old style monkey patching. |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
This seems to have landed in nodejs/node#54054 - we can close for now. |
Hi, I am not sure if this is the right forum to ask this question, but I since Node.js
diagnostics_channel
seems to fall under this working group I got here.As of today, according to the Node.js docs there are two HTTP built-in channels for client events:
http.client.request.start
andhttp.client.response.finish
.Looking at the Node.js http module implementation, and after some tests it appears that there might be a gap in the events.
Subscribers can get notified when a request starts and when a response arrives, but there seems to not be a channel to subscribe for when the request fails (i.e. in the event of a
ECONNREFUSED
).I am experimenting with tracing requests made with the
http
andhttps
modules without having to patch the modules directly (which would require a loader with ESM) and without this type of channel/event if the request is going to fail any span created onhttp.client.request.start
will remain orphaned & opened.The
fetch
module has similar channels, but also has a undici:request:error channel that can be used for this.Is the lack of this channel for the built-in HTTP events intentional? Am I misinterpreting entirely why these channels are there in the first place?
The text was updated successfully, but these errors were encountered: