Skip to content

Commit

Permalink
Add Error API for pusher
Browse files Browse the repository at this point in the history
Signed-off-by: kun <oiooj@qq.com>
  • Loading branch information
oiooj committed Jun 30, 2022
1 parent 4ad265f commit db307ec
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions prometheus/push/push.go
Expand Up @@ -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
Expand Down

0 comments on commit db307ec

Please sign in to comment.