@@ -6,9 +6,16 @@ export class PromClient {
6
6
private app : express . Application ;
7
7
public activeRepoIndexingJobs : Gauge < string > ;
8
8
public repoIndexingDuration : Histogram < string > ;
9
- public repoIndexingErrors : Counter < string > ;
10
- public repoIndexingFails : Counter < string > ;
11
- public repoIndexingSuccesses : Counter < string > ;
9
+ public repoIndexingErrorTotal : Counter < string > ;
10
+ public repoIndexingFailTotal : Counter < string > ;
11
+ public repoIndexingSuccessTotal : Counter < string > ;
12
+
13
+ public activeRepoGarbageCollectionJobs : Gauge < string > ;
14
+ public repoGarbageCollectionDuration : Histogram < string > ;
15
+ public repoGarbageCollectionErrorTotal : Counter < string > ;
16
+ public repoGarbageCollectionFailTotal : Counter < string > ;
17
+ public repoGarbageCollectionSuccessTotal : Counter < string > ;
18
+
12
19
public readonly PORT = 3060 ;
13
20
14
21
constructor ( ) {
@@ -28,26 +35,61 @@ export class PromClient {
28
35
} ) ;
29
36
this . registry . registerMetric ( this . repoIndexingDuration ) ;
30
37
31
- this . repoIndexingErrors = new Counter ( {
38
+ this . repoIndexingErrorTotal = new Counter ( {
32
39
name : 'repo_indexing_errors' ,
33
40
help : 'The number of repo indexing errors' ,
34
41
labelNames : [ 'repo' ] ,
35
42
} ) ;
36
- this . registry . registerMetric ( this . repoIndexingErrors ) ;
43
+ this . registry . registerMetric ( this . repoIndexingErrorTotal ) ;
37
44
38
- this . repoIndexingFails = new Counter ( {
45
+ this . repoIndexingFailTotal = new Counter ( {
39
46
name : 'repo_indexing_fails' ,
40
47
help : 'The number of repo indexing fails' ,
41
48
labelNames : [ 'repo' ] ,
42
49
} ) ;
43
- this . registry . registerMetric ( this . repoIndexingFails ) ;
50
+ this . registry . registerMetric ( this . repoIndexingFailTotal ) ;
44
51
45
- this . repoIndexingSuccesses = new Counter ( {
52
+ this . repoIndexingSuccessTotal = new Counter ( {
46
53
name : 'repo_indexing_successes' ,
47
54
help : 'The number of repo indexing successes' ,
48
55
labelNames : [ 'repo' ] ,
49
56
} ) ;
50
- this . registry . registerMetric ( this . repoIndexingSuccesses ) ;
57
+ this . registry . registerMetric ( this . repoIndexingSuccessTotal ) ;
58
+
59
+ this . activeRepoGarbageCollectionJobs = new Gauge ( {
60
+ name : 'active_repo_garbage_collection_jobs' ,
61
+ help : 'The number of repo garbage collection jobs in progress' ,
62
+ labelNames : [ 'repo' ] ,
63
+ } ) ;
64
+ this . registry . registerMetric ( this . activeRepoGarbageCollectionJobs ) ;
65
+
66
+ this . repoGarbageCollectionDuration = new Histogram ( {
67
+ name : 'repo_garbage_collection_duration' ,
68
+ help : 'The duration of repo garbage collection jobs' ,
69
+ labelNames : [ 'repo' ] ,
70
+ } ) ;
71
+ this . registry . registerMetric ( this . repoGarbageCollectionDuration ) ;
72
+
73
+ this . repoGarbageCollectionErrorTotal = new Counter ( {
74
+ name : 'repo_garbage_collection_errors' ,
75
+ help : 'The number of repo garbage collection errors' ,
76
+ labelNames : [ 'repo' ] ,
77
+ } ) ;
78
+ this . registry . registerMetric ( this . repoGarbageCollectionErrorTotal ) ;
79
+
80
+ this . repoGarbageCollectionFailTotal = new Counter ( {
81
+ name : 'repo_garbage_collection_fails' ,
82
+ help : 'The number of repo garbage collection fails' ,
83
+ labelNames : [ 'repo' ] ,
84
+ } ) ;
85
+ this . registry . registerMetric ( this . repoGarbageCollectionFailTotal ) ;
86
+
87
+ this . repoGarbageCollectionSuccessTotal = new Counter ( {
88
+ name : 'repo_garbage_collection_successes' ,
89
+ help : 'The number of repo garbage collection successes' ,
90
+ labelNames : [ 'repo' ] ,
91
+ } ) ;
92
+ this . registry . registerMetric ( this . repoGarbageCollectionSuccessTotal ) ;
51
93
52
94
client . collectDefaultMetrics ( {
53
95
register : this . registry ,
0 commit comments