mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00: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:
parent
1855aaea99
commit
c58a70ac8f
7 changed files with 83 additions and 6 deletions
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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue