- Introduced SQLAlchemy models for user management, project management, financial inputs, and pricing configuration. - Created navigation metadata tables for sidebar and top-level menus. - Cataloged enumerations used across ORM models and Pydantic schemas. - Documented Pydantic schemas for API request/response validation, including authentication, project, scenario, import, and export schemas. - Added monitoring and auditing tables for performance metrics and import/export logs. - Updated security documentation to reflect changes in data model references.
2.1 KiB
2.1 KiB
Monitoring and Auditing
This page documents the monitoring- and auditing-related tables that were previously embedded in 02_data_model.md. Separating them keeps operational telemetry isolated from the core project/scenario data model reference.
PerformanceMetric
Tracks API performance metrics used by the monitoring pipeline.
Table: performance_metrics
| Attribute | Type | Description |
|---|---|---|
| id | Integer (PK) | Primary key |
| timestamp | DateTime | Metric timestamp |
| metric_name | String | Metric name |
| value | Float | Metric value |
| labels | String | JSON string of labels |
| endpoint | String | API endpoint |
| method | String | HTTP method |
| status_code | Integer | HTTP status code |
| duration_seconds | Float | Request duration |
ImportExportLog
Audit log for import and export operations initiated by users.
Table: import_export_logs
| Attribute | Type | Description |
|---|---|---|
| id | Integer (PK) | Primary key |
| action | String(32) | Action type (preview, commit, export) |
| dataset | String(32) | Dataset type (projects, scenarios) |
| status | String(16) | Operation status |
| filename | String(255) | File name |
| row_count | Integer | Number of rows |
| detail | Text | Additional details |
| user_id | Integer (FK → users.id) | User foreign key |
| created_at | DateTime | Creation timestamp |
These tables power telemetry dashboards and audit trails but are not exposed via public API endpoints.