mirror of
https://github.com/immich-app/immich.git
synced 2025-12-19 09:13:14 +03:00
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:
13
server/src/interfaces/metric.interface.ts
Normal file
13
server/src/interfaces/metric.interface.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user