Skip to content

Commit

Permalink
chore: update loki modules for 3.0 release (#12433)
Browse files Browse the repository at this point in the history
Signed-off-by: Edward Welch <[email protected]>
  • Loading branch information
slim-bean authored Apr 2, 2024
1 parent affd9d6 commit 4c88be0
Show file tree
Hide file tree
Showing 981 changed files with 4,457 additions and 4,444 deletions.
8 changes: 4 additions & 4 deletions clients/cmd/docker-driver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ import (
"github.com/prometheus/prometheus/model/relabel"
"gopkg.in/yaml.v2"

"github.com/grafana/loki/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/clients/pkg/promtail/targets/file"
"github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/promtail/targets/file"

"github.com/grafana/loki/pkg/util"
"github.com/grafana/loki/v3/pkg/util"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/docker-driver/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ import (
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"

"github.com/grafana/loki/clients/pkg/logentry/stages"
"github.com/grafana/loki/v3/clients/pkg/logentry/stages"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var jobRename = `
Expand Down
8 changes: 4 additions & 4 deletions clients/cmd/docker-driver/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"

"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/loki/v3/pkg/logproto"
)

var jobName = "docker"
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/docker-driver/loki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/docker/docker/daemon/logger"
"github.com/stretchr/testify/require"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

func Test_loki_LogWhenClosed(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/docker-driver/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
dslog "github.com/grafana/dskit/log"
"github.com/prometheus/common/version"

_ "github.com/grafana/loki/pkg/util/build"
util_log "github.com/grafana/loki/pkg/util/log"
_ "github.com/grafana/loki/v3/pkg/util/build"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

const socketAddress = "/run/docker/plugins/loki.sock"
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/fluent-bit/buffer.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/go-kit/log"

"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"
)

type bufferConfig struct {
Expand Down
2 changes: 1 addition & 1 deletion clients/cmd/fluent-bit/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"github.com/go-kit/log"

"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"
)

// NewClient creates a new client based on the fluentbit configuration.
Expand Down
6 changes: 3 additions & 3 deletions clients/cmd/fluent-bit/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/grafana/dskit/log"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/logentry/logql"
"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/logentry/logql"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"

lokiflag "github.com/grafana/loki/pkg/util/flagext"
lokiflag "github.com/grafana/loki/v3/pkg/util/flagext"
)

var defaultClientCfg = client.Config{}
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/fluent-bit/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (
"github.com/grafana/dskit/log"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"

lokiflag "github.com/grafana/loki/pkg/util/flagext"
lokiflag "github.com/grafana/loki/v3/pkg/util/flagext"
)

type fakeConfig map[string]string
Expand Down
6 changes: 3 additions & 3 deletions clients/cmd/fluent-bit/dque.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import (
"github.com/joncrlsn/dque"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"

"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/loki/v3/pkg/logproto"
)

type dqueConfig struct {
Expand Down
6 changes: 3 additions & 3 deletions clients/cmd/fluent-bit/loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
jsoniter "github.com/json-iterator/go"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"

"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/loki/v3/pkg/logproto"
)

var (
Expand Down
6 changes: 3 additions & 3 deletions clients/cmd/fluent-bit/loki_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import (
jsoniter "github.com/json-iterator/go"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"

"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/loki/v3/pkg/logproto"
)

var now = time.Now()
Expand Down
4 changes: 2 additions & 2 deletions clients/cmd/fluent-bit/out_grafana_loki.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
dslog "github.com/grafana/dskit/log"
"github.com/prometheus/common/version"

_ "github.com/grafana/loki/pkg/util/build"
_ "github.com/grafana/loki/v3/pkg/util/build"
)
import (
"github.com/prometheus/client_golang/prometheus"

"github.com/grafana/loki/clients/pkg/promtail/client"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"
)

var (
Expand Down
16 changes: 8 additions & 8 deletions clients/cmd/promtail/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ import (
collectors_version "github.com/prometheus/client_golang/prometheus/collectors/version"
"github.com/prometheus/common/version"

"github.com/grafana/loki/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail"
"github.com/grafana/loki/clients/pkg/promtail/client"
promtail_config "github.com/grafana/loki/clients/pkg/promtail/config"
"github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/v3/clients/pkg/promtail"
"github.com/grafana/loki/v3/clients/pkg/promtail/client"
promtail_config "github.com/grafana/loki/v3/clients/pkg/promtail/config"

"github.com/grafana/loki/pkg/util"
"github.com/grafana/loki/pkg/util/cfg"
"github.com/grafana/loki/v3/pkg/util"
"github.com/grafana/loki/v3/pkg/util/cfg"

_ "github.com/grafana/loki/pkg/util/build"
util_log "github.com/grafana/loki/pkg/util/log"
_ "github.com/grafana/loki/v3/pkg/util/build"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/logql/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

"github.com/prometheus/prometheus/model/labels"

"github.com/grafana/loki/pkg/logqlmodel"
"github.com/grafana/loki/v3/pkg/logqlmodel"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/metric/metricvec.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"
"time"

"github.com/grafana/loki/pkg/util"
"github.com/grafana/loki/v3/pkg/util"

"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/decolorize.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package stages

import (
"github.com/grafana/loki/pkg/logql/log"
"github.com/grafana/loki/v3/pkg/logql/log"
)

type decolorizeStage struct{}
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/decolorize_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var testDecolorizePipeline = `
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"

"github.com/grafana/loki/pkg/util/flagext"
"github.com/grafana/loki/v3/pkg/util/flagext"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/drop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

// Not all these are tested but are here to make sure the different types marshal without error
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/eventlogmessage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var testEvtLogMsgYamlDefaults = `
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"

"github.com/grafana/loki/pkg/util/flagext"
"github.com/grafana/loki/v3/pkg/util/flagext"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/extensions_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var (
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/json_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var testJSONYamlSingleStageWithoutSource = `
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/labelallow_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

func Test_addLabelStage_Process(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/labeldrop_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

func Test_dropLabelStage_Process(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/labels_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/prometheus/common/model"
"github.com/stretchr/testify/assert"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var testLabelsYaml = `
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"

"github.com/grafana/loki/pkg/util"
"github.com/grafana/loki/v3/pkg/util"

"github.com/go-kit/log"
"github.com/mitchellh/mapstructure"
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

// Not all these are tested but are here to make sure the different types marshal without error
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/logfmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var testLogfmtYamlSingleStageWithoutSource = `
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/match.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/labels"

"github.com/grafana/loki/clients/pkg/logentry/logql"
"github.com/grafana/loki/v3/clients/pkg/logentry/logql"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/match_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var testMatchYaml = `
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/logentry/metric"
"github.com/grafana/loki/v3/clients/pkg/logentry/metric"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions clients/pkg/logentry/stages/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/grafana/loki/clients/pkg/logentry/metric"
"github.com/grafana/loki/v3/clients/pkg/logentry/metric"

util_log "github.com/grafana/loki/pkg/util/log"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

var testMetricYaml = `
Expand Down
4 changes: 2 additions & 2 deletions clients/pkg/logentry/stages/multiline.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/common/model"

"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/v3/clients/pkg/promtail/api"

"github.com/grafana/loki/pkg/logproto"
"github.com/grafana/loki/v3/pkg/logproto"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions clients/pkg/logentry/stages/multiline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import (
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"

"github.com/grafana/loki/clients/pkg/promtail/api"
"github.com/grafana/loki/v3/clients/pkg/promtail/api"

"github.com/grafana/loki/pkg/logproto"
util_log "github.com/grafana/loki/pkg/util/log"
"github.com/grafana/loki/v3/pkg/logproto"
util_log "github.com/grafana/loki/v3/pkg/util/log"
)

func Test_multilineStage_Process(t *testing.T) {
Expand Down
Loading

0 comments on commit 4c88be0

Please sign in to comment.