-
Notifications
You must be signed in to change notification settings - Fork 5k
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
AutoGen logging using Azure Cosmos DB #2329
Conversation
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.
Thanks for the PR! A couple of things to add:
- Add handling for the cosmosdb logger in the factory method in
autogen/autogen/logger/logger_factory.py
Lines 11 to 12 in 5a96dc2
def get_logger(logger_type: str = "sqlite", config: Optional[Dict[str, Any]] = None) -> BaseLogger: if config is None: - In setup.py add a new extra_require entry for cosmosdb similar to redis:
Lines 49 to 50 in 5a96dc2
extras_require={ "test": [ - Add a unit test for the logger. @tonybaloney do you want to comment on how to add a mock test for cosmos db usage?
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.
Thank you for the PR.
To fix the pre-commit failure: run pre-commit run --all-files
,
to fix the type issues run mypy autogen/logger/cosmos_db_logger.py
.
Can you also add some unit test for cosmos db logger like Eric suggested above? Existing logging unit test is under test/test_logging.py
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2329 +/- ##
==========================================
- Coverage 33.11% 30.48% -2.64%
==========================================
Files 86 87 +1
Lines 9108 9340 +232
Branches 1938 2137 +199
==========================================
- Hits 3016 2847 -169
- Misses 5837 6158 +321
- Partials 255 335 +80
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Cannot revolve conflict. Continuing the work under PR 2760 |
Why are these changes needed?
Adding the connector to use Cosmos DB for logging
Related issue number
N/A
Checks