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

added a request time logging middleware #2361

Merged

Conversation

DraKen0009
Copy link
Contributor

Proposed Changes

  • Added a request time logging middleware
  • created a custom logger for it to keep logs cleaner

Associated Issue

Sample picture

image

@coronasafe/care-backend-maintainers @coronasafe/care-backend-admins

@DraKen0009 DraKen0009 requested a review from a team as a code owner August 16, 2024 18:24
care/middleware/time_logging_middleware.py Outdated Show resolved Hide resolved

def __call__(self, request):
request.start_time = time.time()

Copy link
Member

Choose a reason for hiding this comment

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

Remove empty lines

care/middleware/time_logging_middleware.py Outdated Show resolved Hide resolved
@DraKen0009
Copy link
Contributor Author

@vigneshhari please take a look at the changes and let me know if any changes are required.

config/settings/base.py Outdated Show resolved Hide resolved
care/middleware/time_logging_middleware.py Outdated Show resolved Hide resolved
@DraKen0009
Copy link
Contributor Author

@sainak updated , please check and let me know of any changes required

@rithviknishad
Copy link
Member

@sainak bump

config/settings/base.py Outdated Show resolved Hide resolved
@vigneshhari vigneshhari merged commit d3a0162 into ohcnetwork:develop Sep 22, 2024
2 checks passed
Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.19%. Comparing base (22a91f9) to head (abdf5ce).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2361   +/-   ##
========================================
  Coverage    65.19%   65.19%           
========================================
  Files          242      242           
  Lines        13866    13866           
  Branches      1925     1925           
========================================
  Hits          9040     9040           
  Misses        4448     4448           
  Partials       378      378           

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

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.

Middleware to log request times
4 participants