-
Notifications
You must be signed in to change notification settings - Fork 115
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
[MSSQL] Add logs #2527
[MSSQL] Add logs #2527
Conversation
buildkite test this |
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.
Few nits, but mostly looks good.
connectors/sources/mssql.py
Outdated
msg = ( | ||
"Fetching all tables as the configuration field 'tables' is set to '*'" | ||
if not is_filtering | ||
else "Fetching all tables as the advanced sync rules are enabled." | ||
) |
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.
msg = ( | |
"Fetching all tables as the configuration field 'tables' is set to '*'" | |
if not is_filtering | |
else "Fetching all tables as the advanced sync rules are enabled." | |
) | |
msg = "Fetching all tables" |
@@ -496,6 +512,7 @@ def row2doc(self, row, doc_id, table, timestamp): | |||
return row | |||
|
|||
async def get_primary_key(self, tables): | |||
self._logger.debug(f"Extracting primary keys for tables: {tables}") |
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.
Lets log what we find as primary keys, too
return primary_keys | ||
|
||
async def get_table_last_update_time(self, table): | ||
self._logger.debug(f"Fetching last updated time for table: {table}") |
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.
Let's log what time we found, too
Copying from another PR - that's applicable to all SQL connectors: The most useful connector logs are - which queries were actually executed by the connectors. Can you add debug logs that state which exact queries were executed? A good addition to it would be to also debug log the number of records returned by the query. |
buildkite test this |
Co-authored-by: Artem Shelkovnikov <artem.shelkovnikov@elastic.co>
buildkite test this |
@moxarth-elastic I'll be taking over this and some other PRs reviewed by me to finish the work |
💔 Failed to create backport PR(s)The backport operation could not be completed due to the following error: The backport PRs will be merged automatically after passing CI. To backport manually run: |
Part Of #2299
Adding more logs in MSSQL connector.
Log File: https://drive.google.com/file/d/1Rnm-tMY-ECYv1JZpj3oP9SvMljZZRxjZ/view?usp=drive_link
Checklists
Pre-Review Checklist
config.yml.example
)v7.13.2
,v7.14.0
,v8.0.0
)