feat: improve event tracking and SDK robustness
- Add specific error tracking for rate-limited and oversized events in API response - Ensure runtime settings are applied on initial access in settings manager - Exclude /api/health from middleware protection - Update Python SDK to v2.2.0 with unified standalone implementation - Add auto_prune_days setting to database schema retrieval
This commit is contained in:
1 parent
0c2e49cd47
commit
043123dc21
12 files changed
+1018
-128
No files matched your search
+7
-1
@@ -203,7 +203,8 @@ async function syncSettingsFromDatabase() {
|
||||
await ensureDatabaseSchema();
|
||||
const res = await dbPool.query(
|
||||
`SELECT max_events_per_sec, max_payload_size_kb, batch_flush_threshold,
|
||||
batch_flush_interval_ms, file_rotation_mb, jwt_secret, enable_idempotency
|
||||
batch_flush_interval_ms, file_rotation_mb, jwt_secret, enable_idempotency,
|
||||
auto_prune_days
|
||||
FROM admin_settings
|
||||
WHERE id = 'default'`,
|
||||
);
|
||||
@@ -227,6 +228,11 @@ async function syncSettingsFromDatabase() {
|
||||
writer.setMaxFileSizeMb(nextRotationMb);
|
||||
}
|
||||
|
||||
const nextPruneDays = Number(row.auto_prune_days) || 30;
|
||||
if (nextPruneDays > 0) {
|
||||
writer.pruneExpiredPartitions(nextPruneDays);
|
||||
}
|
||||
|
||||
const nextIntervalMs = Math.max(
|
||||
100,
|
||||
Number(row.batch_flush_interval_ms) || 2000,
|
||||
|
||||
Reference in new issue
Block a user