Added health metrics for application load and database load (#2257)

* Added health metrics for application load

* Added health metrics for application load

* Fix unit tests

* Added more metrics

* Added few comments

* Added DatabaseLoad Scenario and address comments

* Fix unit tests

* fix unit tests

* Fix unit tests

* fix unit tests

* fix the mock

* Fix unit tests
This commit is contained in:
sunghyunkang1111
2025-12-09 14:14:35 -06:00
committed by GitHub
parent 8c0e6da377
commit 5b7d1a74af
19 changed files with 701 additions and 2 deletions

16
src/Metrics/Constants.ts Normal file
View File

@@ -0,0 +1,16 @@
import { ApiType } from "Common/Constants";
import { Platform } from "ConfigContext";
// Metric scenarios represent lifecycle checkpoints we measure.
export enum MetricScenario {
ApplicationLoad = "ApplicationLoad",
DatabaseLoad = "DatabaseLoad",
}
// Generic metric emission event describing scenario outcome.
export interface MetricEvent {
readonly platform: Platform;
readonly api: ApiType;
readonly scenario: MetricScenario;
readonly healthy: boolean;
}