Explain about Describe function
baohuy1204 opened this issue · 0 comments
baohuy1204 commented
Can you explain me why we need to call "e.up.Describe(ch)" and "ch <- clusterNodeUpTime" in this function:
func (e Exporter) Describe(ch chan<- *prometheus.Desc) {
e.up.Describe(ch)
ch <- clusterNodeUpTime
}
I've tested with these lines commented but it still works:
func (e Exporter) Describe(ch chan<- *prometheus.Desc) {
// e.up.Describe(ch)
// ch <- clusterNodeUpTime
}
the same for:
func (e Exporter) Describe(ch chan<- *prometheus.Desc) {
e.up.Describe(ch)
// ch <- clusterNodeUpTime
}
Thanks,