Skip to content
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

Deprecation warning in Node.js 12 #1073

Closed
watson opened this issue May 19, 2019 · 1 comment
Closed

Deprecation warning in Node.js 12 #1073

watson opened this issue May 19, 2019 · 1 comment
Labels
agent-nodejs Make available for APM Agents project planning.

Comments

@watson
Copy link
Member

watson commented May 19, 2019

We need access to the host of an outgoing HTTP request and the easiest way to get this is from the Host header on the request object (req._headers.host).

Since the release of Node.js 12, the _headers property has been marked as deprecated (though it still works fine).

This results in Node.js printing:

(node:8970) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

The deprecation happened in nodejs/node#24167 and as far as I can see, there's currently no workaround. I propose that we make a PR to Node.js to add a public way to retrieve the host.

@trentm
Copy link
Member

trentm commented Feb 2, 2023

This was resolved in #1417

@trentm trentm closed this as completed Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-nodejs Make available for APM Agents project planning.
Projects
None yet
Development

No branches or pull requests

2 participants