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: enrich logs #6206

Merged
merged 1 commit into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jina/clients/base/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ async def send_message(self, url, request: 'Request'):
handle_response_status(r_status, r_str, url)
return r_status, r_str
except (ValueError, ConnectionError, BadClient, aiohttp.ClientError, aiohttp.ClientConnectionError) as err:
self.logger.debug(f'Got an error: {err} sending POST to {url} in attempt {attempt}/{self.max_attempts}')
self.logger.debug(f'Got an error of type {type(err)}: {err} sending POST to {url} in attempt {attempt}/{self.max_attempts}')
await retry.wait_or_raise_err(
attempt=attempt,
err=err,
Expand All @@ -191,7 +191,7 @@ async def send_message(self, url, request: 'Request'):
)
except Exception as exc:
self.logger.debug(
f'Got a non-retried error: {exc} sending POST to {url}')
f'Got a non-retried error of type {type(exc)}: {exc} sending POST to {url}')
raise exc

async def send_streaming_message(self, url, doc: 'Document', on: str):
Expand Down
2 changes: 1 addition & 1 deletion jina/serve/stream/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ async def stream(
except (
Exception
) as err: # HTTP and WS need different treatment further up the stack
self.logger.error(f'Error while getting responses from deployments: {err}')
self.logger.error(f'Error while getting responses from deployments {type(err)}: {err}')
raise err

async def _stream_requests(
Expand Down
Loading