Skip to content

Commit

Permalink
Fix logcli.
Browse files Browse the repository at this point in the history
Signed-off-by: Tom Wilkie <[email protected]>
  • Loading branch information
tomwilkie committed May 8, 2019
1 parent e73024d commit c71a9b0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/logcli/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

"github.com/fatih/color"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/promql"

"github.com/grafana/loki/pkg/iter"
"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/loki/pkg/parser"
)

func doQuery() {
Expand Down Expand Up @@ -92,7 +92,7 @@ func padLabel(ls labels.Labels, maxLabelsLen int) string {
}

func mustParseLabels(labels string) labels.Labels {
ls, err := parser.Labels(labels)
ls, err := promql.ParseMetric(labels)
if err != nil {
log.Fatalf("Failed to parse labels: %+v", err)
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/promtail/promtail_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (
"testing"
"time"

"github.com/prometheus/prometheus/promql"

"github.com/cortexproject/cortex/pkg/util"
"github.com/cortexproject/cortex/pkg/util/flagext"
"github.com/go-kit/kit/log"
Expand All @@ -24,6 +22,7 @@ import (
"github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/pkg/labels"
"github.com/prometheus/prometheus/pkg/textparse"
"github.com/prometheus/prometheus/promql"
"github.com/stretchr/testify/assert"

"github.com/grafana/loki/pkg/logproto"
Expand Down

0 comments on commit c71a9b0

Please sign in to comment.