Add SQLite database persistence for telemetry data with MikroORM integration #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements optional database persistence for telemetry data using SQLite and MikroORM, addressing the need for persistent storage of telemetry values and schema information.
Key Features
Opt-in Database Configuration
The telemetry persistence is completely optional and maintains full backward compatibility. Users can enable it by configuring the dev resource:
Schema Persistence
The implementation saves and persists the complete introspector schema to the database. This enables runner instances to connect to an existing database and be fully self-sufficient - the GraphQL server can read the schema directly from the database without needing custom schema definitions.
Complete Telemetry Storage
All telemetry data types are persisted with full feature parity:
MikroORM Integration
Uses the latest MikroORM v5.9.8 with proper entity definitions, automatic schema generation, and efficient querying. The database layer includes:
API Compatibility
All existing GraphQL queries work identically regardless of storage backend. The Live interface remains unchanged, ensuring existing code continues to work without modifications.
Technical Implementation
Testing
Comprehensive test suite covering:
Documentation
Updated README with:
The implementation allows applications to scale beyond memory limits while preserving all existing functionality and maintaining the same developer experience.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.