feat(server): job metrics (#8255)

* metric repo

* add metric repo

* remove unused import

* formatting

* fix

* try disabling job metrics for e2e

* import otel in test module
This commit is contained in:
Mert 2024-03-24 23:02:04 -04:00 committed by GitHub
parent 1855aaea99
commit c58a70ac8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 83 additions and 6 deletions

View file

@ -0,0 +1,13 @@
import { MetricOptions } from '@opentelemetry/api';
export interface CustomMetricOptions extends MetricOptions {
enabled?: boolean;
}
export const IMetricRepository = 'IMetricRepository';
export interface IMetricRepository {
addToCounter(name: string, value: number, options?: CustomMetricOptions): void;
updateGauge(name: string, value: number, options?: CustomMetricOptions): void;
updateHistogram(name: string, value: number, options?: CustomMetricOptions): void;
}