-
Notifications
You must be signed in to change notification settings - Fork 52
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
Report statusCode and uri accurately for POSTs #57 #58
Conversation
Fixes issue yaorg#57 by listening on the `res.on('finish')` instead of req.on('end')` event. Due to some quirk with express bodyParsers, `req.route` and `res.statusCode` were undefined in the req.on('end') event.
428b37e
to
3bd6cfb
Compare
Added a reproducing integration test and updated the unit test, so now the fix's PR is in good shape. |
Is there anyway to update the example at https://yaorg.github.io/node-measured/packages/measured-signalfx-reporter/tutorial-SignalFx%20Express%20Full%20End%20to%20End%20Example.html to mention that this middleware must precede bodyParser middleware? This was another bug that was hard to discover for me 😆 |
Yeah it's in the tutorial folder at the root of the project.
On Sat, Feb 2, 2019 at 8:40 AM avolfson ***@***.***> wrote:
Is there anyway to update the example at
https://yaorg.github.io/node-measured/packages/measured-signalfx-reporter/tutorial-SignalFx%20Express%20Full%20End%20to%20End%20Example.html
to mention that this middleware must *precede* bodyParser middleware?
This was another bug that was hard to discover for me 😆
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#58 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AArcLkmX4-qgV7S27zi3cCM74IcWxmTlks5vJb-QgaJpZM4aZZls>
.
--
Justin Field
fieldju@gmail.com
LinkedIn <https://www.linkedin.com/in/fieldju> | @fieldju
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With a listener on the
req.on('end')
event,req.route
andres.statusCode
are undefined. Switching tores.on('finish')
makes these values available.#57