mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2026-04-21 05:50:26 +01:00
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:
16
src/Metrics/Constants.ts
Normal file
16
src/Metrics/Constants.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user