-
Notifications
You must be signed in to change notification settings - Fork 295
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
All http-client HEAD requests are marked as errors #2089
Comments
I just tried sending a |
The code that was triggering this was requests made by this library: https://github.com/tractr/redirect-chain/blob/master/index.js Perhaps something about how this code is handling the request is triggering an error in dd-trace? |
Can you provide a reproduction snippet using that library that would demonstrate the error? |
Sure |
Sorry my wife just gave birth. I will follow up with a reproducible example as soon as I can. |
Ok sorry for the delay @rochdev I put together a small demo that demonstrates the error: https://github.com/ballpit/dd-trace-test/blob/master/index.js Its just a bare bones web server that has one route: https://dd-trace-test.herokuapp.com/redirect-chain?get=https://t.co/Pq8kh5jZOY It takes a get query param, then uses HEAD requests to find the final destination if the URL has redirects, using the request-chain library. Even though the HEAD requests do not encounter errors, dd-trace marks them as errors with no other context as to why it thinks its an error: Any ideas? |
Expected behaviour
When making a HEAD request with the node http client, the dd-trace should properly detect and classify HEAD requests according to their success or failure.
Actual behaviour
In dd-trace 2.4.0, no HEAD requests are detected and in versions 2.4.1-2.8.0 all HEAD requests are detected, but classified as errors.
Steps to reproduce
Install dd-trace onto a node app and make HEAD requests with the http client where
requestOptions.method = 'HEAD'
.It seems related to these changes which fixed a similar issue for all other http methods. Perhaps since HEAD requests don't deal with a body, it was unaddressed?
http.request
spans as error #1953Environment
Package.json:
The text was updated successfully, but these errors were encountered: