feat: add privacy-preserving telemetry and error aggregation

- Update smoke-test.mjs to output structured summary with logs
- Update telemetry-aggregator.mjs to collect from unit, smoke, and load tests
- Update run-unit-tests.mjs to log output to artifacts/test_unit.log
- Ensure PII sanitization in telemetry reports
This commit is contained in:
google-labs-jules[bot] committed 2026-01-26 06:48:14 +00:00
1 parent 87c494c1f3
commit edbd66df52
3 files changed
+92 -6

No files matched your search

+6 -2
View File
@@ -38,7 +38,7 @@ import http from 'http';
const ARTIFACTS_DIR = 'artifacts';
const LOG_FILE = path.join(ARTIFACTS_DIR, `smoke-${new Date().toISOString().split('T')[0].replace(/-/g, '')}.log`);
const REPORT_FILE = path.join(ARTIFACTS_DIR, 'smoke-report.json');
const REPORT_FILE = path.join(ARTIFACTS_DIR, `smoke-summary-${new Date().toISOString().replace(/[:.]/g, '-')}.json`);
const UI_SCREENSHOT = path.join(ARTIFACTS_DIR, 'smoke-ui.png');
if (!fs.existsSync(ARTIFACTS_DIR)) {
@@ -285,12 +285,16 @@ async function runSmokeTest() {
} catch (error) {
log(`Smoke Test Failed: ${error.stack}`, 'ERROR');
summary.status = "FAIL";
summary.status = "failure";
summary.error = error.message;
exitCode = 1;
} finally {
// --- Write Report ---
try {
if (fs.existsSync(LOG_FILE)) {
const logs = fs.readFileSync(LOG_FILE, 'utf8').split('\n').filter(Boolean);
summary.logs = logs;
}
fs.writeFileSync(REPORT_FILE, JSON.stringify(summary, null, 2));
log(`Summary written to ${REPORT_FILE}`);
} catch (e) {