Add Error API for pusher (#1075)

Signed-off-by: kun <oiooj@qq.com>
This commit is contained in:
Curith 2022-06-30 23:00:36 +08:00 committed by GitHub
parent 4ad265f1b4
commit 810fcb46ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -168,6 +168,11 @@ func (p *Pusher) Collector(c prometheus.Collector) *Pusher {
return p
}
// Error returns the error that was encountered.
func (p *Pusher) Error() error {
return p.error
}
// Grouping adds a label pair to the grouping key of the Pusher, replacing any
// previously added label pair with the same label name. Note that setting any
// labels in the grouping key that are already contained in the metrics to push