Skip to content

Conversation

@michaelyaakoby
Copy link
Member

When http-traces is capturing a request and response, the timeTaken
field should be millis between the time the request was received and the
time the response was sent.

Both fastapi_pyctuator and flask_pyctuator used the microseconds
of the timedelta between the request time and the response time.
Unfortunately, this only returns the microseconds part of the time
delta. Instead, should calculate the difference between the two
timestamps.

Fix #13

When http-traces is capturing a request and response, the `timeTaken`
field should be millis between the time the request was received and the
time the response was sent.

Both `fastapi_pyctuator` and `flask_pyctuator` used the `microseconds`
of the `timedelta` between the request time and the response time.
Unfortunately, this only returns the microseconds part of the time
delta. Instead, should calculate the difference between the two
timestamps.

Fix #13
@michaelyaakoby michaelyaakoby force-pushed the michael/#13-wrong-request-timing branch from 9448509 to 62df9c7 Compare June 22, 2020 20:44
Copy link

@inbal2l inbal2l left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for noticing the bug,
and for the fix of course.

Copy link
Member

@MatanRubin MatanRubin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@MatanRubin MatanRubin merged commit 2e74f0d into master Jun 23, 2020
@MatanRubin MatanRubin deleted the michael/#13-wrong-request-timing branch June 23, 2020 08:54
@michaelyaakoby
Copy link
Member Author

michaelyaakoby commented Jun 23, 2020

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP Traces timing is incorrect

4 participants