Skip to content

Commit

Permalink
ignore error with LabelNames queries too
Browse files Browse the repository at this point in the history
  • Loading branch information
Antonin Ferrand authored and jacksontj committed Jul 16, 2021
1 parent 0fcb1a1 commit 94363d6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/promclient/ignore_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ type IgnoreErrorAPI struct {
API
}

// LabelNames returns all the unique label names present in the block in sorted order.
func (n *IgnoreErrorAPI) LabelNames(ctx context.Context) ([]string, v1.Warnings, error) {
v, w, _ := n.API.LabelNames(ctx)
return v, w, nil
}

// LabelValues performs a query for the values of the given label.
func (n *IgnoreErrorAPI) LabelValues(ctx context.Context, label string) (model.LabelValues, v1.Warnings, error) {
v, w, _ := n.API.LabelValues(ctx, label)
Expand Down

0 comments on commit 94363d6

Please sign in to comment.