Add telemetry diagnostics route
This commit is contained in:
@@ -11,6 +11,7 @@ export const PUBLIC_KEY = "a".repeat(64);
|
||||
|
||||
export interface TestEnvOptions {
|
||||
auditEvents?: ElyAnalyticsDataPoint[];
|
||||
diagnosticEvents?: ElyAnalyticsDataPoint[];
|
||||
d1?: RecordedD1Database;
|
||||
kvEntries?: [string, string][];
|
||||
kvReads?: string[];
|
||||
@@ -68,6 +69,13 @@ export function testEnv(options: TestEnvOptions): Env {
|
||||
}
|
||||
},
|
||||
},
|
||||
ELY_DIAGNOSTICS: {
|
||||
writeDataPoint(event?: ElyAnalyticsDataPoint): void {
|
||||
if (event !== undefined) {
|
||||
options.diagnosticEvents?.push(event);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user