-
Notifications
You must be signed in to change notification settings - Fork 945
Open
Labels
Description
Now that we've removed support for old runtimes, we can use the new diagnostics channels to instrument node core http libraries.
Known issues
http.client.request.start - event.request is not writeable
Because the event is emitted after the request is already in flight, we cannot modify the headers. This means we cannot add the required tracing headers for context propagation. We will still need to rely on patching the http and https modules for at least this purpose unless the http channel implementations change.
If nodejs adds something similar to undici's undici:request:create, this issue may be solved and we may be able to remove all manual monkeypatching from the instrumentation. In this case, we may even be able to remove {require|import}-in-the-middle.
Context Management
See #4319 (comment) below
chiawendt