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

fix: instrument timing for slow requests #7217

Closed
wants to merge 43 commits into from

Conversation

Bento007
Copy link
Contributor

@Bento007 Bento007 commented Jun 20, 2024

Reason for Change

Changes

  • Add a class to measure how long a group of code takes and output to logs
  • Add request info to the response log. This makes it easier to track what endpoint cause an error.

Testing steps

  • Verified timing logs are printed.
  • verified the request info was in the response log.

Copy link
Contributor

Deployment Summary

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.86%. Comparing base (aa6815e) to head (d7b0505).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7217      +/-   ##
==========================================
+ Coverage   92.84%   92.86%   +0.01%     
==========================================
  Files         192      192              
  Lines       16340    16376      +36     
==========================================
+ Hits        15171    15207      +36     
  Misses       1169     1169              
Flag Coverage Δ
unittests 92.86% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@nayib-jose-gloria nayib-jose-gloria left a comment

Choose a reason for hiding this comment

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

we should look into using datadog tracing for this long-term, but short-term this seems reasonable

@Bento007
Copy link
Contributor Author

Bento007 commented Jul 8, 2024

I wonder if we can do this already with datadog

@Bento007
Copy link
Contributor Author

Bento007 commented Jul 8, 2024

I wonder if we can do this already with datadog

It looks like it can.

I'd rather not add the overhead in this case.

@Bento007 Bento007 closed this Jul 8, 2024
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.

3 participants