-
Notifications
You must be signed in to change notification settings - Fork 0
Logs middleware #116
base: main
Are you sure you want to change the base?
Logs middleware #116
Conversation
Codecov Report
@@ Coverage Diff @@
## main #116 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 9 +1
Lines 273 356 +83
Branches 48 65 +17
=========================================
+ Hits 273 356 +83
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. |
|
|
||
| @pytest.fixture(autouse=True) | ||
| def patch_log_server_url(monkeypatch): | ||
| monkeypatch.setenv('LOGS_SERVER_URL', 'http://logs.com') |
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.
que se quiere probar aquí?
| async def dispatch( | ||
| self, request: Request, call_next: RequestResponseEndpoint | ||
| ) -> Response: | ||
| if not os.environ.get('LOGS_SERVER_URL', ''): |
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.
porque se manda a llamar dentro de la función y no como una variable global?
pachCode
left a comment
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.
Algunas observaciones
implements a middleware that sends requests information to a log ingestion server (Logstash)