feat: add EventLoggerService with JSONL and SQL writers#187
feat: add EventLoggerService with JSONL and SQL writers#187nv-alicheng merged 4 commits intomainfrom
Conversation
- Move record.py from async_utils/transport to core/ - Add PromptData, TextModelOutput, ErrorData types with msgspec Struct - Deprecate str as response_output type in favor of TextModelOutput - Add msgspec struct performance flags (gc=False, array_like=True) - Fix threading safety issues in http_client, sample handler, recorder - Update all imports across the codebase - Bump default worker init timeout to 60s
|
MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅ |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a robust event logging system designed to capture and persist events from ZMQ. It provides flexible storage options, allowing events to be written to either JSONL files or various SQL databases through SQLAlchemy. This enhancement significantly improves the system's ability to monitor and analyze runtime behavior by centralizing event capture and offering adaptable data storage solutions. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces an EventLoggerService with JSONL and SQL writers, enhancing the system's event logging capabilities. It includes a new service subscribing to ZMQ events, file and database writers, and updates to dependencies. The code appears well-structured and includes unit tests. However, there are areas where error handling and resource management can be improved to ensure robustness and prevent potential issues.
The SGLang adapter now returns TextModelOutput, not raw str. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- New EventLoggerService subscribing to ZMQ events - JSONLWriter for file-based event logging - SQLWriter via SQLAlchemy for DB compatibility - Writer base class with async context manager protocol - ZMQ context: add socket_dir parameter for configurable IPC paths - Add sqlalchemy dependency
a1d6ba4 to
b51f11b
Compare
What does this PR do?
Type of change
Related issues
Testing
Checklist