@@ -89,7 +89,7 @@ func NewCollector() Collector {
89
89
Issues : prometheus .NewDesc (
90
90
namespace + "issues" ,
91
91
"Number of Issues" ,
92
- nil , nil ,
92
+ [] string { "state" } , nil ,
93
93
),
94
94
IssuesByLabel : prometheus .NewDesc (
95
95
namespace + "issues_by_label" ,
@@ -103,12 +103,12 @@ func NewCollector() Collector {
103
103
),
104
104
IssuesOpen : prometheus .NewDesc (
105
105
namespace + "issues_open" ,
106
- "Number of open Issues" ,
106
+ "DEPRECATED: Use Issues with state: open " ,
107
107
nil , nil ,
108
108
),
109
109
IssuesClosed : prometheus .NewDesc (
110
110
namespace + "issues_closed" ,
111
- "Number of closed Issues" ,
111
+ "DEPRECATED: Use Issues with state: closed " ,
112
112
nil , nil ,
113
113
),
114
114
Labels : prometheus .NewDesc (
@@ -272,8 +272,14 @@ func (c Collector) Collect(ch chan<- prometheus.Metric) {
272
272
ch <- prometheus .MustNewConstMetric (
273
273
c .Issues ,
274
274
prometheus .GaugeValue ,
275
- float64 (stats .Counter .Issue ),
275
+ float64 (stats .Counter .IssueOpen ), "open" ,
276
+ )
277
+ ch <- prometheus .MustNewConstMetric (
278
+ c .Issues ,
279
+ prometheus .GaugeValue ,
280
+ float64 (stats .Counter .IssueClosed ), "closed" ,
276
281
)
282
+
277
283
for _ , il := range stats .Counter .IssueByLabel {
278
284
ch <- prometheus .MustNewConstMetric (
279
285
c .IssuesByLabel ,
0 commit comments