diff --git a/clients/cmd/docker-driver/config.go b/clients/cmd/docker-driver/config.go index 95dd07a6d8e8..d53117ca4872 100644 --- a/clients/cmd/docker-driver/config.go +++ b/clients/cmd/docker-driver/config.go @@ -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 ( diff --git a/clients/cmd/docker-driver/config_test.go b/clients/cmd/docker-driver/config_test.go index a3920778b622..f83c560e3939 100644 --- a/clients/cmd/docker-driver/config_test.go +++ b/clients/cmd/docker-driver/config_test.go @@ -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 = ` diff --git a/clients/cmd/docker-driver/loki.go b/clients/cmd/docker-driver/loki.go index cc15e71bda2e..77bc4e5e439b 100644 --- a/clients/cmd/docker-driver/loki.go +++ b/clients/cmd/docker-driver/loki.go @@ -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" diff --git a/clients/cmd/docker-driver/loki_test.go b/clients/cmd/docker-driver/loki_test.go index 0edc7b0c7693..4e61f37cd05c 100644 --- a/clients/cmd/docker-driver/loki_test.go +++ b/clients/cmd/docker-driver/loki_test.go @@ -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) { diff --git a/clients/cmd/docker-driver/main.go b/clients/cmd/docker-driver/main.go index 5aba041f6b5f..06d90b81bda5 100644 --- a/clients/cmd/docker-driver/main.go +++ b/clients/cmd/docker-driver/main.go @@ -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" diff --git a/clients/cmd/fluent-bit/buffer.go b/clients/cmd/fluent-bit/buffer.go index a168ccfc142c..28e9529abff4 100644 --- a/clients/cmd/fluent-bit/buffer.go +++ b/clients/cmd/fluent-bit/buffer.go @@ -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 { diff --git a/clients/cmd/fluent-bit/client.go b/clients/cmd/fluent-bit/client.go index 11c2fa1d0386..828d013d85ae 100644 --- a/clients/cmd/fluent-bit/client.go +++ b/clients/cmd/fluent-bit/client.go @@ -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. diff --git a/clients/cmd/fluent-bit/config.go b/clients/cmd/fluent-bit/config.go index 469e18d495d7..84838d03f20f 100644 --- a/clients/cmd/fluent-bit/config.go +++ b/clients/cmd/fluent-bit/config.go @@ -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{} diff --git a/clients/cmd/fluent-bit/config_test.go b/clients/cmd/fluent-bit/config_test.go index 0d5ec6d592b0..f52ea18bc96d 100644 --- a/clients/cmd/fluent-bit/config_test.go +++ b/clients/cmd/fluent-bit/config_test.go @@ -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 diff --git a/clients/cmd/fluent-bit/dque.go b/clients/cmd/fluent-bit/dque.go index f7091de893f5..6e5746033254 100644 --- a/clients/cmd/fluent-bit/dque.go +++ b/clients/cmd/fluent-bit/dque.go @@ -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 { diff --git a/clients/cmd/fluent-bit/loki.go b/clients/cmd/fluent-bit/loki.go index ea3de0261f40..6749af1ebf88 100644 --- a/clients/cmd/fluent-bit/loki.go +++ b/clients/cmd/fluent-bit/loki.go @@ -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 ( diff --git a/clients/cmd/fluent-bit/loki_test.go b/clients/cmd/fluent-bit/loki_test.go index 1bfd21d22ce0..477f6abe1757 100644 --- a/clients/cmd/fluent-bit/loki_test.go +++ b/clients/cmd/fluent-bit/loki_test.go @@ -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() diff --git a/clients/cmd/fluent-bit/out_grafana_loki.go b/clients/cmd/fluent-bit/out_grafana_loki.go index d396fddfc8da..70a58e65b935 100644 --- a/clients/cmd/fluent-bit/out_grafana_loki.go +++ b/clients/cmd/fluent-bit/out_grafana_loki.go @@ -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 ( diff --git a/clients/cmd/promtail/main.go b/clients/cmd/promtail/main.go index 4492938246b5..7e00e7ff35db 100644 --- a/clients/cmd/promtail/main.go +++ b/clients/cmd/promtail/main.go @@ -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() { diff --git a/clients/pkg/logentry/logql/parser.go b/clients/pkg/logentry/logql/parser.go index d567f6fce4c8..924ec1b7bdea 100644 --- a/clients/pkg/logentry/logql/parser.go +++ b/clients/pkg/logentry/logql/parser.go @@ -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() { diff --git a/clients/pkg/logentry/metric/metricvec.go b/clients/pkg/logentry/metric/metricvec.go index 07f73c20873d..f004db760f8f 100644 --- a/clients/pkg/logentry/metric/metricvec.go +++ b/clients/pkg/logentry/metric/metricvec.go @@ -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" diff --git a/clients/pkg/logentry/stages/decolorize.go b/clients/pkg/logentry/stages/decolorize.go index bac7274b6bad..a86e6cdeafb2 100644 --- a/clients/pkg/logentry/stages/decolorize.go +++ b/clients/pkg/logentry/stages/decolorize.go @@ -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{} diff --git a/clients/pkg/logentry/stages/decolorize_test.go b/clients/pkg/logentry/stages/decolorize_test.go index 5e7cead0a527..029cd74c1c1e 100644 --- a/clients/pkg/logentry/stages/decolorize_test.go +++ b/clients/pkg/logentry/stages/decolorize_test.go @@ -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 = ` diff --git a/clients/pkg/logentry/stages/drop.go b/clients/pkg/logentry/stages/drop.go index 19a2e6c37807..462d6c34f635 100644 --- a/clients/pkg/logentry/stages/drop.go +++ b/clients/pkg/logentry/stages/drop.go @@ -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 ( diff --git a/clients/pkg/logentry/stages/drop_test.go b/clients/pkg/logentry/stages/drop_test.go index a7e5ffcb5665..220bb68314df 100644 --- a/clients/pkg/logentry/stages/drop_test.go +++ b/clients/pkg/logentry/stages/drop_test.go @@ -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 diff --git a/clients/pkg/logentry/stages/eventlogmessage_test.go b/clients/pkg/logentry/stages/eventlogmessage_test.go index 4729d5a08f0e..ed4bedccfc70 100644 --- a/clients/pkg/logentry/stages/eventlogmessage_test.go +++ b/clients/pkg/logentry/stages/eventlogmessage_test.go @@ -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 = ` diff --git a/clients/pkg/logentry/stages/extensions.go b/clients/pkg/logentry/stages/extensions.go index d2e788dcb9d1..2e49d6bd224b 100644 --- a/clients/pkg/logentry/stages/extensions.go +++ b/clients/pkg/logentry/stages/extensions.go @@ -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 ( diff --git a/clients/pkg/logentry/stages/extensions_test.go b/clients/pkg/logentry/stages/extensions_test.go index 9e2a3f62a56f..0d03acd3fe3d 100644 --- a/clients/pkg/logentry/stages/extensions_test.go +++ b/clients/pkg/logentry/stages/extensions_test.go @@ -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 ( diff --git a/clients/pkg/logentry/stages/json_test.go b/clients/pkg/logentry/stages/json_test.go index 31a0c0219e5a..1764387253fb 100644 --- a/clients/pkg/logentry/stages/json_test.go +++ b/clients/pkg/logentry/stages/json_test.go @@ -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 = ` diff --git a/clients/pkg/logentry/stages/labelallow_test.go b/clients/pkg/logentry/stages/labelallow_test.go index a5cbcd8e3ce6..ebcf451487ef 100644 --- a/clients/pkg/logentry/stages/labelallow_test.go +++ b/clients/pkg/logentry/stages/labelallow_test.go @@ -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) { diff --git a/clients/pkg/logentry/stages/labeldrop_test.go b/clients/pkg/logentry/stages/labeldrop_test.go index 215a7888f8c3..70912c7ed1c8 100644 --- a/clients/pkg/logentry/stages/labeldrop_test.go +++ b/clients/pkg/logentry/stages/labeldrop_test.go @@ -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) { diff --git a/clients/pkg/logentry/stages/labels_test.go b/clients/pkg/logentry/stages/labels_test.go index 175359606a2f..27747d8032ed 100644 --- a/clients/pkg/logentry/stages/labels_test.go +++ b/clients/pkg/logentry/stages/labels_test.go @@ -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 = ` diff --git a/clients/pkg/logentry/stages/limit.go b/clients/pkg/logentry/stages/limit.go index d5489221e6ac..49d32cbf0402 100644 --- a/clients/pkg/logentry/stages/limit.go +++ b/clients/pkg/logentry/stages/limit.go @@ -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" diff --git a/clients/pkg/logentry/stages/limit_test.go b/clients/pkg/logentry/stages/limit_test.go index 840db40d37cb..0d3519e8c9b4 100644 --- a/clients/pkg/logentry/stages/limit_test.go +++ b/clients/pkg/logentry/stages/limit_test.go @@ -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 diff --git a/clients/pkg/logentry/stages/logfmt_test.go b/clients/pkg/logentry/stages/logfmt_test.go index 8258eeece501..ed60d8770d01 100644 --- a/clients/pkg/logentry/stages/logfmt_test.go +++ b/clients/pkg/logentry/stages/logfmt_test.go @@ -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 = ` diff --git a/clients/pkg/logentry/stages/match.go b/clients/pkg/logentry/stages/match.go index 3b4addbb0de1..4007e45da4ec 100644 --- a/clients/pkg/logentry/stages/match.go +++ b/clients/pkg/logentry/stages/match.go @@ -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 ( diff --git a/clients/pkg/logentry/stages/match_test.go b/clients/pkg/logentry/stages/match_test.go index 558407320c57..05d65f0bcaff 100644 --- a/clients/pkg/logentry/stages/match_test.go +++ b/clients/pkg/logentry/stages/match_test.go @@ -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 = ` diff --git a/clients/pkg/logentry/stages/metrics.go b/clients/pkg/logentry/stages/metrics.go index 14386e3b43a4..827f0cf313a4 100644 --- a/clients/pkg/logentry/stages/metrics.go +++ b/clients/pkg/logentry/stages/metrics.go @@ -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 ( diff --git a/clients/pkg/logentry/stages/metrics_test.go b/clients/pkg/logentry/stages/metrics_test.go index 6a14e6c80c1e..f46ea6839919 100644 --- a/clients/pkg/logentry/stages/metrics_test.go +++ b/clients/pkg/logentry/stages/metrics_test.go @@ -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 = ` diff --git a/clients/pkg/logentry/stages/multiline.go b/clients/pkg/logentry/stages/multiline.go index 199ff438a939..2f94a2e1822f 100644 --- a/clients/pkg/logentry/stages/multiline.go +++ b/clients/pkg/logentry/stages/multiline.go @@ -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 ( diff --git a/clients/pkg/logentry/stages/multiline_test.go b/clients/pkg/logentry/stages/multiline_test.go index 33b71c8f5f02..b175f89845de 100644 --- a/clients/pkg/logentry/stages/multiline_test.go +++ b/clients/pkg/logentry/stages/multiline_test.go @@ -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) { diff --git a/clients/pkg/logentry/stages/output_test.go b/clients/pkg/logentry/stages/output_test.go index a7b02714faf7..dc6aac54f0b9 100644 --- a/clients/pkg/logentry/stages/output_test.go +++ b/clients/pkg/logentry/stages/output_test.go @@ -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 testOutputYaml = ` diff --git a/clients/pkg/logentry/stages/pack.go b/clients/pkg/logentry/stages/pack.go index 737fa8d36b79..881650d8c6aa 100644 --- a/clients/pkg/logentry/stages/pack.go +++ b/clients/pkg/logentry/stages/pack.go @@ -15,7 +15,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) var ( diff --git a/clients/pkg/logentry/stages/pack_test.go b/clients/pkg/logentry/stages/pack_test.go index b767f90a7606..44935051a952 100644 --- a/clients/pkg/logentry/stages/pack_test.go +++ b/clients/pkg/logentry/stages/pack_test.go @@ -12,11 +12,11 @@ import ( "github.com/stretchr/testify/assert" "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" - "github.com/grafana/loki/pkg/logqlmodel" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" + 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 diff --git a/clients/pkg/logentry/stages/pipeline.go b/clients/pkg/logentry/stages/pipeline.go index c20a7784c511..1c4d2ba8e5ab 100644 --- a/clients/pkg/logentry/stages/pipeline.go +++ b/clients/pkg/logentry/stages/pipeline.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/time/rate" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" ) // PipelineStages contains configuration for each stage within a pipeline diff --git a/clients/pkg/logentry/stages/pipeline_test.go b/clients/pkg/logentry/stages/pipeline_test.go index 51fe66e30c36..2649de6a8344 100644 --- a/clients/pkg/logentry/stages/pipeline_test.go +++ b/clients/pkg/logentry/stages/pipeline_test.go @@ -14,11 +14,11 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "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" - 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" ) var ( diff --git a/clients/pkg/logentry/stages/regex_test.go b/clients/pkg/logentry/stages/regex_test.go index dc3402e6e7a4..f7fa5390a195 100644 --- a/clients/pkg/logentry/stages/regex_test.go +++ b/clients/pkg/logentry/stages/regex_test.go @@ -14,7 +14,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 testRegexYamlSingleStageWithoutSource = ` diff --git a/clients/pkg/logentry/stages/replace_test.go b/clients/pkg/logentry/stages/replace_test.go index f8feef3c898d..87bb3eecb898 100644 --- a/clients/pkg/logentry/stages/replace_test.go +++ b/clients/pkg/logentry/stages/replace_test.go @@ -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 testReplaceYamlSingleStageWithoutSource = ` diff --git a/clients/pkg/logentry/stages/sampling_test.go b/clients/pkg/logentry/stages/sampling_test.go index 171277e961d6..9b56eec5c0c5 100644 --- a/clients/pkg/logentry/stages/sampling_test.go +++ b/clients/pkg/logentry/stages/sampling_test.go @@ -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 testSampingYaml = ` diff --git a/clients/pkg/logentry/stages/stage.go b/clients/pkg/logentry/stages/stage.go index 1c19face4044..9de1d4e0a590 100644 --- a/clients/pkg/logentry/stages/stage.go +++ b/clients/pkg/logentry/stages/stage.go @@ -12,7 +12,7 @@ import ( "github.com/prometheus/common/model" "gopkg.in/yaml.v2" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" ) const ( diff --git a/clients/pkg/logentry/stages/static_labels_test.go b/clients/pkg/logentry/stages/static_labels_test.go index 9643d3da7aa5..bad2ec68f4a9 100644 --- a/clients/pkg/logentry/stages/static_labels_test.go +++ b/clients/pkg/logentry/stages/static_labels_test.go @@ -7,7 +7,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" ) func Test_staticLabelStage_Process(t *testing.T) { diff --git a/clients/pkg/logentry/stages/structuredmetadata.go b/clients/pkg/logentry/stages/structuredmetadata.go index cdab88a956c7..cdf70c01d4fa 100644 --- a/clients/pkg/logentry/stages/structuredmetadata.go +++ b/clients/pkg/logentry/stages/structuredmetadata.go @@ -5,7 +5,7 @@ import ( "github.com/mitchellh/mapstructure" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func newStructuredMetadataStage(params StageCreationParams) (Stage, error) { diff --git a/clients/pkg/logentry/stages/structuredmetadata_test.go b/clients/pkg/logentry/stages/structuredmetadata_test.go index d9a70300b8b0..2b48c641ef81 100644 --- a/clients/pkg/logentry/stages/structuredmetadata_test.go +++ b/clients/pkg/logentry/stages/structuredmetadata_test.go @@ -9,7 +9,8 @@ import ( "github.com/stretchr/testify/require" "github.com/grafana/loki/pkg/push" - util_log "github.com/grafana/loki/pkg/util/log" + + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var pipelineStagesStructuredMetadataUsingMatch = ` diff --git a/clients/pkg/logentry/stages/template_test.go b/clients/pkg/logentry/stages/template_test.go index 96e7f1b06a2d..7977c87ffee6 100644 --- a/clients/pkg/logentry/stages/template_test.go +++ b/clients/pkg/logentry/stages/template_test.go @@ -12,7 +12,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 testTemplateYaml = ` diff --git a/clients/pkg/logentry/stages/tenant.go b/clients/pkg/logentry/stages/tenant.go index 13717ccb29bf..ed730fbc0c12 100644 --- a/clients/pkg/logentry/stages/tenant.go +++ b/clients/pkg/logentry/stages/tenant.go @@ -10,7 +10,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/client" ) const ( diff --git a/clients/pkg/logentry/stages/tenant_test.go b/clients/pkg/logentry/stages/tenant_test.go index eb02b0bda9db..8eee783d47dd 100644 --- a/clients/pkg/logentry/stages/tenant_test.go +++ b/clients/pkg/logentry/stages/tenant_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/client" - lokiutil "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + lokiutil "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var testTenantYamlExtractedData = ` diff --git a/clients/pkg/logentry/stages/timestamp.go b/clients/pkg/logentry/stages/timestamp.go index 592ae1356564..fb1fb8a27c3b 100644 --- a/clients/pkg/logentry/stages/timestamp.go +++ b/clients/pkg/logentry/stages/timestamp.go @@ -12,7 +12,7 @@ import ( "github.com/mitchellh/mapstructure" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/clients/pkg/logentry/stages/timestamp_test.go b/clients/pkg/logentry/stages/timestamp_test.go index 73e4fb196b5b..f3f23dcfceba 100644 --- a/clients/pkg/logentry/stages/timestamp_test.go +++ b/clients/pkg/logentry/stages/timestamp_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - lokiutil "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + lokiutil "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var testTimestampYaml = ` diff --git a/clients/pkg/logentry/stages/util_test.go b/clients/pkg/logentry/stages/util_test.go index b58490cc56fc..5ce0ae9a7f93 100644 --- a/clients/pkg/logentry/stages/util_test.go +++ b/clients/pkg/logentry/stages/util_test.go @@ -8,9 +8,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" - "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" ) func newEntry(ex map[string]interface{}, lbs model.LabelSet, line string, ts time.Time) Entry { diff --git a/clients/pkg/promtail/api/types.go b/clients/pkg/promtail/api/types.go index 2bb2482da462..36f9cc484160 100644 --- a/clients/pkg/promtail/api/types.go +++ b/clients/pkg/promtail/api/types.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // Entry is a log entry with labels. diff --git a/clients/pkg/promtail/client/batch.go b/clients/pkg/promtail/client/batch.go index 8681b67bd13f..a6e7b45dd984 100644 --- a/clients/pkg/promtail/client/batch.go +++ b/clients/pkg/promtail/client/batch.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/common/model" "golang.org/x/exp/slices" - "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 ( diff --git a/clients/pkg/promtail/client/batch_test.go b/clients/pkg/promtail/client/batch_test.go index 56dc9477e8b6..ec92fbc1c422 100644 --- a/clients/pkg/promtail/client/batch_test.go +++ b/clients/pkg/promtail/client/batch_test.go @@ -9,9 +9,9 @@ import ( "github.com/stretchr/testify/assert" "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" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestBatch_MaxStreams(t *testing.T) { diff --git a/clients/pkg/promtail/client/client.go b/clients/pkg/promtail/client/client.go index 4dfd11363a82..ea93a604d32f 100644 --- a/clients/pkg/promtail/client/client.go +++ b/clients/pkg/promtail/client/client.go @@ -20,10 +20,10 @@ import ( "github.com/prometheus/common/config" "github.com/prometheus/common/model" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" - lokiutil "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/build" + lokiutil "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/build" ) const ( diff --git a/clients/pkg/promtail/client/client_test.go b/clients/pkg/promtail/client/client_test.go index 01cbb87cc111..ea3039879605 100644 --- a/clients/pkg/promtail/client/client_test.go +++ b/clients/pkg/promtail/client/client_test.go @@ -19,12 +19,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/utils" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/utils" - "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/push" - lokiflag "github.com/grafana/loki/pkg/util/flagext" + + "github.com/grafana/loki/v3/pkg/logproto" + lokiflag "github.com/grafana/loki/v3/pkg/util/flagext" ) var logEntries = []api.Entry{ diff --git a/clients/pkg/promtail/client/client_writeto.go b/clients/pkg/promtail/client/client_writeto.go index 6fa549dfa272..bd5ecfc42468 100644 --- a/clients/pkg/promtail/client/client_writeto.go +++ b/clients/pkg/promtail/client/client_writeto.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/record" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/util" ) // clientWriteTo implements a wal.WriteTo that re-builds entries with the stored series, and the received entries. After, diff --git a/clients/pkg/promtail/client/client_writeto_test.go b/clients/pkg/promtail/client/client_writeto_test.go index 2254fbb07365..3693b677f2cc 100644 --- a/clients/pkg/promtail/client/client_writeto_test.go +++ b/clients/pkg/promtail/client/client_writeto_test.go @@ -18,10 +18,10 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "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/ingester/wal" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestClientWriter_LogEntriesAreReconstructedAndForwardedCorrectly(t *testing.T) { diff --git a/clients/pkg/promtail/client/config.go b/clients/pkg/promtail/client/config.go index ab36353ba490..eab0eb8863e6 100644 --- a/clients/pkg/promtail/client/config.go +++ b/clients/pkg/promtail/client/config.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/dskit/flagext" "github.com/prometheus/common/config" - lokiflag "github.com/grafana/loki/pkg/util/flagext" + lokiflag "github.com/grafana/loki/v3/pkg/util/flagext" ) // NOTE the helm chart for promtail and fluent-bit also have defaults for these values, please update to match if you make changes here. diff --git a/clients/pkg/promtail/client/fake/client.go b/clients/pkg/promtail/client/fake/client.go index 33e886c30980..03257135a585 100644 --- a/clients/pkg/promtail/client/fake/client.go +++ b/clients/pkg/promtail/client/fake/client.go @@ -3,7 +3,7 @@ package fake import ( "sync" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" ) // Client is a fake client used for testing. diff --git a/clients/pkg/promtail/client/logger.go b/clients/pkg/promtail/client/logger.go index 890d51177c26..ba20055a0d94 100644 --- a/clients/pkg/promtail/client/logger.go +++ b/clients/pkg/promtail/client/logger.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "gopkg.in/yaml.v2" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/limit" - "github.com/grafana/loki/clients/pkg/promtail/wal" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/limit" + "github.com/grafana/loki/v3/clients/pkg/promtail/wal" ) var ( diff --git a/clients/pkg/promtail/client/logger_test.go b/clients/pkg/promtail/client/logger_test.go index 43c710d69088..c19f39ac7578 100644 --- a/clients/pkg/promtail/client/logger_test.go +++ b/clients/pkg/promtail/client/logger_test.go @@ -9,10 +9,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 TestNewLogger(t *testing.T) { diff --git a/clients/pkg/promtail/client/manager.go b/clients/pkg/promtail/client/manager.go index 84dc48de350d..ef08d2c04f52 100644 --- a/clients/pkg/promtail/client/manager.go +++ b/clients/pkg/promtail/client/manager.go @@ -9,9 +9,9 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/limit" - "github.com/grafana/loki/clients/pkg/promtail/wal" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/limit" + "github.com/grafana/loki/v3/clients/pkg/promtail/wal" ) // WriterEventsNotifier implements a notifier that's received by the Manager, to which wal.Watcher can subscribe for diff --git a/clients/pkg/promtail/client/manager_test.go b/clients/pkg/promtail/client/manager_test.go index 14165ea503f2..f11821c82120 100644 --- a/clients/pkg/promtail/client/manager_test.go +++ b/clients/pkg/promtail/client/manager_test.go @@ -16,14 +16,14 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/limit" - "github.com/grafana/loki/clients/pkg/promtail/utils" - "github.com/grafana/loki/clients/pkg/promtail/wal" - - "github.com/grafana/loki/pkg/logproto" - lokiflag "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/limit" + "github.com/grafana/loki/v3/clients/pkg/promtail/utils" + "github.com/grafana/loki/v3/clients/pkg/promtail/wal" + + "github.com/grafana/loki/v3/pkg/logproto" + lokiflag "github.com/grafana/loki/v3/pkg/util/flagext" ) var testLimitsConfig = limit.Config{ diff --git a/clients/pkg/promtail/config/config.go b/clients/pkg/promtail/config/config.go index 4a720a2dd28f..615b8e9abaad 100644 --- a/clients/pkg/promtail/config/config.go +++ b/clients/pkg/promtail/config/config.go @@ -8,16 +8,16 @@ import ( "github.com/go-kit/log/level" "gopkg.in/yaml.v2" - "github.com/grafana/loki/clients/pkg/promtail/client" - "github.com/grafana/loki/clients/pkg/promtail/limit" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/server" - "github.com/grafana/loki/clients/pkg/promtail/targets/file" - "github.com/grafana/loki/clients/pkg/promtail/wal" + "github.com/grafana/loki/v3/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/limit" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/server" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/file" + "github.com/grafana/loki/v3/clients/pkg/promtail/wal" - "github.com/grafana/loki/pkg/tracing" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/tracing" + "github.com/grafana/loki/v3/pkg/util/flagext" ) // Options contains cross-cutting promtail configurations diff --git a/clients/pkg/promtail/config/config_test.go b/clients/pkg/promtail/config/config_test.go index 04cd09f56dfc..32bab70501e3 100644 --- a/clients/pkg/promtail/config/config_test.go +++ b/clients/pkg/promtail/config/config_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/client" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/util/flagext" ) const testFile = ` diff --git a/clients/pkg/promtail/limit/config.go b/clients/pkg/promtail/limit/config.go index 02589afd86b8..aed6f23c0b04 100644 --- a/clients/pkg/promtail/limit/config.go +++ b/clients/pkg/promtail/limit/config.go @@ -3,7 +3,7 @@ package limit import ( "flag" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/util/flagext" ) type Config struct { diff --git a/clients/pkg/promtail/positions/positions_test.go b/clients/pkg/promtail/positions/positions_test.go index 1dce97b08ec7..6a7044a5a868 100644 --- a/clients/pkg/promtail/positions/positions_test.go +++ b/clients/pkg/promtail/positions/positions_test.go @@ -9,7 +9,7 @@ import ( "github.com/go-kit/log" "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 tempFilename(t *testing.T) string { diff --git a/clients/pkg/promtail/promtail.go b/clients/pkg/promtail/promtail.go index 1ef3368a697e..ffe774a405be 100644 --- a/clients/pkg/promtail/promtail.go +++ b/clients/pkg/promtail/promtail.go @@ -14,17 +14,17 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "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/clients/pkg/promtail/config" - "github.com/grafana/loki/clients/pkg/promtail/server" - "github.com/grafana/loki/clients/pkg/promtail/targets" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/clients/pkg/promtail/utils" - "github.com/grafana/loki/clients/pkg/promtail/wal" + "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/v3/clients/pkg/promtail/config" + "github.com/grafana/loki/v3/clients/pkg/promtail/server" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/utils" + "github.com/grafana/loki/v3/clients/pkg/promtail/wal" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/clients/pkg/promtail/promtail_test.go b/clients/pkg/promtail/promtail_test.go index ca35fc403882..695f3faeb0f5 100644 --- a/clients/pkg/promtail/promtail_test.go +++ b/clients/pkg/promtail/promtail_test.go @@ -30,19 +30,19 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/client" - "github.com/grafana/loki/clients/pkg/promtail/config" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/server" - pserver "github.com/grafana/loki/clients/pkg/promtail/server" - file2 "github.com/grafana/loki/clients/pkg/promtail/targets/file" - "github.com/grafana/loki/clients/pkg/promtail/targets/testutils" - - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "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/config" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/server" + pserver "github.com/grafana/loki/v3/clients/pkg/promtail/server" + file2 "github.com/grafana/loki/v3/clients/pkg/promtail/targets/file" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/testutils" + + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var clientMetrics = client.NewMetrics(prometheus.DefaultRegisterer) diff --git a/clients/pkg/promtail/promtail_wal_test.go b/clients/pkg/promtail/promtail_wal_test.go index dc00c398e91c..dfc7ce727345 100644 --- a/clients/pkg/promtail/promtail_wal_test.go +++ b/clients/pkg/promtail/promtail_wal_test.go @@ -20,15 +20,16 @@ import ( "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/client" - "github.com/grafana/loki/clients/pkg/promtail/config" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/utils" - "github.com/grafana/loki/clients/pkg/promtail/wal" + "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/config" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/utils" + "github.com/grafana/loki/v3/clients/pkg/promtail/wal" "github.com/grafana/loki/pkg/push" - util_log "github.com/grafana/loki/pkg/util/log" + + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/clients/pkg/promtail/scrapeconfig/scrapeconfig.go b/clients/pkg/promtail/scrapeconfig/scrapeconfig.go index 262b4b925d25..a261a9a08a38 100644 --- a/clients/pkg/promtail/scrapeconfig/scrapeconfig.go +++ b/clients/pkg/promtail/scrapeconfig/scrapeconfig.go @@ -27,8 +27,8 @@ import ( "github.com/prometheus/prometheus/discovery/zookeeper" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/discovery/consulagent" + "github.com/grafana/loki/v3/clients/pkg/logentry/stages" + "github.com/grafana/loki/v3/clients/pkg/promtail/discovery/consulagent" ) // Config describes a job to scrape. diff --git a/clients/pkg/promtail/server/server.go b/clients/pkg/promtail/server/server.go index 1b47247630e0..2e7752812c93 100644 --- a/clients/pkg/promtail/server/server.go +++ b/clients/pkg/promtail/server/server.go @@ -23,9 +23,9 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/version" - "github.com/grafana/loki/clients/pkg/promtail/server/ui" - "github.com/grafana/loki/clients/pkg/promtail/targets" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/server/ui" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) var ( diff --git a/clients/pkg/promtail/server/template.go b/clients/pkg/promtail/server/template.go index 1ed7fde54547..53013bc485d4 100644 --- a/clients/pkg/promtail/server/template.go +++ b/clients/pkg/promtail/server/template.go @@ -13,7 +13,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/template" - "github.com/grafana/loki/clients/pkg/promtail/server/ui" + "github.com/grafana/loki/v3/clients/pkg/promtail/server/ui" ) // templateOptions is a set of options to render a template. diff --git a/clients/pkg/promtail/server/ui/assets_generate.go b/clients/pkg/promtail/server/ui/assets_generate.go index 984a1f9c99e4..0165b2031f60 100644 --- a/clients/pkg/promtail/server/ui/assets_generate.go +++ b/clients/pkg/promtail/server/ui/assets_generate.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/alertmanager/pkg/modtimevfs" "github.com/shurcooL/vfsgen" - "github.com/grafana/loki/clients/pkg/promtail/server/ui" + "github.com/grafana/loki/v3/clients/pkg/promtail/server/ui" ) func main() { diff --git a/clients/pkg/promtail/targets/azureeventhubs/parser.go b/clients/pkg/promtail/targets/azureeventhubs/parser.go index cd2ddc7145cb..0001dc525019 100644 --- a/clients/pkg/promtail/targets/azureeventhubs/parser.go +++ b/clients/pkg/promtail/targets/azureeventhubs/parser.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "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" ) type azureMonitorResourceLogs struct { diff --git a/clients/pkg/promtail/targets/azureeventhubs/target_syncer.go b/clients/pkg/promtail/targets/azureeventhubs/target_syncer.go index e16d3b4914a1..bc2175768f46 100644 --- a/clients/pkg/promtail/targets/azureeventhubs/target_syncer.go +++ b/clients/pkg/promtail/targets/azureeventhubs/target_syncer.go @@ -10,10 +10,10 @@ import ( "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/kafka" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/kafka" ) func NewSyncer( diff --git a/clients/pkg/promtail/targets/azureeventhubs/target_syncer_test.go b/clients/pkg/promtail/targets/azureeventhubs/target_syncer_test.go index 2113afffd4e2..1874453cf364 100644 --- a/clients/pkg/promtail/targets/azureeventhubs/target_syncer_test.go +++ b/clients/pkg/promtail/targets/azureeventhubs/target_syncer_test.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func Test_validateConfig(t *testing.T) { diff --git a/clients/pkg/promtail/targets/azureeventhubs/targetmanager.go b/clients/pkg/promtail/targets/azureeventhubs/targetmanager.go index 2651233942ba..48f3a3fe8b8e 100644 --- a/clients/pkg/promtail/targets/azureeventhubs/targetmanager.go +++ b/clients/pkg/promtail/targets/azureeventhubs/targetmanager.go @@ -6,10 +6,10 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/kafka" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/kafka" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // TargetManager manages a series of kafka targets. diff --git a/clients/pkg/promtail/targets/cloudflare/target.go b/clients/pkg/promtail/targets/cloudflare/target.go index 19d1f1875827..bede17bc4532 100644 --- a/clients/pkg/promtail/targets/cloudflare/target.go +++ b/clients/pkg/promtail/targets/cloudflare/target.go @@ -18,12 +18,12 @@ import ( "github.com/prometheus/common/model" "go.uber.org/atomic" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // The minimun window size is 1 minute. diff --git a/clients/pkg/promtail/targets/cloudflare/target_test.go b/clients/pkg/promtail/targets/cloudflare/target_test.go index d275a7e845f1..64cb6c4492e5 100644 --- a/clients/pkg/promtail/targets/cloudflare/target_test.go +++ b/clients/pkg/promtail/targets/cloudflare/target_test.go @@ -15,9 +15,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func Test_CloudflareTarget(t *testing.T) { diff --git a/clients/pkg/promtail/targets/cloudflare/targetmanager.go b/clients/pkg/promtail/targets/cloudflare/targetmanager.go index c60fd6577a5f..31a05fe0b75d 100644 --- a/clients/pkg/promtail/targets/cloudflare/targetmanager.go +++ b/clients/pkg/promtail/targets/cloudflare/targetmanager.go @@ -3,11 +3,11 @@ package cloudflare import ( "github.com/go-kit/log" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // TargetManager manages a series of cloudflare targets. diff --git a/clients/pkg/promtail/targets/docker/target.go b/clients/pkg/promtail/targets/docker/target.go index 3b3e55cfb844..3ec9d02a022c 100644 --- a/clients/pkg/promtail/targets/docker/target.go +++ b/clients/pkg/promtail/targets/docker/target.go @@ -20,11 +20,11 @@ import ( "github.com/prometheus/prometheus/model/relabel" "go.uber.org/atomic" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) type Target struct { diff --git a/clients/pkg/promtail/targets/docker/target_group.go b/clients/pkg/promtail/targets/docker/target_group.go index 0b0ea9eef6f5..b9fd8940824d 100644 --- a/clients/pkg/promtail/targets/docker/target_group.go +++ b/clients/pkg/promtail/targets/docker/target_group.go @@ -15,11 +15,11 @@ import ( "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/build" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) const DockerSource = "Docker" diff --git a/clients/pkg/promtail/targets/docker/target_test.go b/clients/pkg/promtail/targets/docker/target_test.go index 27a22871e454..9bb5c9bfacd5 100644 --- a/clients/pkg/promtail/targets/docker/target_test.go +++ b/clients/pkg/promtail/targets/docker/target_test.go @@ -19,8 +19,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" ) func Test_DockerTarget(t *testing.T) { diff --git a/clients/pkg/promtail/targets/docker/targetmanager.go b/clients/pkg/promtail/targets/docker/targetmanager.go index 2d6b55116584..6321705b8f14 100644 --- a/clients/pkg/promtail/targets/docker/targetmanager.go +++ b/clients/pkg/promtail/targets/docker/targetmanager.go @@ -9,13 +9,13 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/clients/pkg/promtail/targets/docker/targetmanager_test.go b/clients/pkg/promtail/targets/docker/targetmanager_test.go index 23bca7a92321..224e58d5a893 100644 --- a/clients/pkg/promtail/targets/docker/targetmanager_test.go +++ b/clients/pkg/promtail/targets/docker/targetmanager_test.go @@ -19,9 +19,9 @@ import ( "github.com/prometheus/prometheus/discovery/moby" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func Test_TargetManager(t *testing.T) { diff --git a/clients/pkg/promtail/targets/file/decompresser.go b/clients/pkg/promtail/targets/file/decompresser.go index 3beb35415fb6..34d2434d8b04 100644 --- a/clients/pkg/promtail/targets/file/decompresser.go +++ b/clients/pkg/promtail/targets/file/decompresser.go @@ -23,11 +23,11 @@ import ( "golang.org/x/text/encoding/ianaindex" "golang.org/x/text/transform" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func supportedCompressedFormats() map[string]struct{} { diff --git a/clients/pkg/promtail/targets/file/decompresser_test.go b/clients/pkg/promtail/targets/file/decompresser_test.go index 443f14a4a844..a575922ec6e5 100644 --- a/clients/pkg/promtail/targets/file/decompresser_test.go +++ b/clients/pkg/promtail/targets/file/decompresser_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) type noopClient struct { diff --git a/clients/pkg/promtail/targets/file/filetarget.go b/clients/pkg/promtail/targets/file/filetarget.go index 2c52cbead922..97dc10f14829 100644 --- a/clients/pkg/promtail/targets/file/filetarget.go +++ b/clients/pkg/promtail/targets/file/filetarget.go @@ -14,10 +14,10 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) const ( diff --git a/clients/pkg/promtail/targets/file/filetarget_test.go b/clients/pkg/promtail/targets/file/filetarget_test.go index f3cde7bf819a..57bc31b0802e 100644 --- a/clients/pkg/promtail/targets/file/filetarget_test.go +++ b/clients/pkg/promtail/targets/file/filetarget_test.go @@ -20,8 +20,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" ) func TestFileTargetSync(t *testing.T) { diff --git a/clients/pkg/promtail/targets/file/filetargetmanager.go b/clients/pkg/promtail/targets/file/filetargetmanager.go index c56b8fa5f8f4..a02d0295d2bd 100644 --- a/clients/pkg/promtail/targets/file/filetargetmanager.go +++ b/clients/pkg/promtail/targets/file/filetargetmanager.go @@ -20,13 +20,13 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/clients/pkg/promtail/targets/file/filetargetmanager_test.go b/clients/pkg/promtail/targets/file/filetargetmanager_test.go index 62e41635f111..d27cd43106fe 100644 --- a/clients/pkg/promtail/targets/file/filetargetmanager_test.go +++ b/clients/pkg/promtail/targets/file/filetargetmanager_test.go @@ -16,10 +16,10 @@ import ( "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func newTestLogDirectories(t *testing.T) string { diff --git a/clients/pkg/promtail/targets/file/tailer.go b/clients/pkg/promtail/targets/file/tailer.go index 387978b6a770..1e72e3530649 100644 --- a/clients/pkg/promtail/targets/file/tailer.go +++ b/clients/pkg/promtail/targets/file/tailer.go @@ -17,11 +17,11 @@ import ( "golang.org/x/text/encoding/ianaindex" "golang.org/x/text/transform" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" ) type tailer struct { diff --git a/clients/pkg/promtail/targets/gcplog/formatter.go b/clients/pkg/promtail/targets/gcplog/formatter.go index 9c175a7750f4..9435ec477595 100644 --- a/clients/pkg/promtail/targets/gcplog/formatter.go +++ b/clients/pkg/promtail/targets/gcplog/formatter.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "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" ) // GCPLogEntry that will be written to the pubsub topic. diff --git a/clients/pkg/promtail/targets/gcplog/formatter_test.go b/clients/pkg/promtail/targets/gcplog/formatter_test.go index f70fa1d79d12..d5703890197d 100644 --- a/clients/pkg/promtail/targets/gcplog/formatter_test.go +++ b/clients/pkg/promtail/targets/gcplog/formatter_test.go @@ -10,9 +10,9 @@ import ( "github.com/stretchr/testify/assert" "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" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestFormat(t *testing.T) { diff --git a/clients/pkg/promtail/targets/gcplog/pull_target.go b/clients/pkg/promtail/targets/gcplog/pull_target.go index 38db550bdf73..671b160c6f4c 100644 --- a/clients/pkg/promtail/targets/gcplog/pull_target.go +++ b/clients/pkg/promtail/targets/gcplog/pull_target.go @@ -14,9 +14,9 @@ import ( "github.com/prometheus/prometheus/model/relabel" "google.golang.org/api/option" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) var defaultBackoff = backoff.Config{ diff --git a/clients/pkg/promtail/targets/gcplog/pull_target_test.go b/clients/pkg/promtail/targets/gcplog/pull_target_test.go index e81ee20a6938..81a16e6872bd 100644 --- a/clients/pkg/promtail/targets/gcplog/pull_target_test.go +++ b/clients/pkg/promtail/targets/gcplog/pull_target_test.go @@ -16,9 +16,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) func TestPullTarget_RunStop(t *testing.T) { diff --git a/clients/pkg/promtail/targets/gcplog/push_target.go b/clients/pkg/promtail/targets/gcplog/push_target.go index 95260fb914a8..4d0a2d2b8407 100644 --- a/clients/pkg/promtail/targets/gcplog/push_target.go +++ b/clients/pkg/promtail/targets/gcplog/push_target.go @@ -13,12 +13,12 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/serverutils" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/serverutils" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type pushTarget struct { diff --git a/clients/pkg/promtail/targets/gcplog/push_target_test.go b/clients/pkg/promtail/targets/gcplog/push_target_test.go index 50075820fa49..d6e9ce3f75e0 100644 --- a/clients/pkg/promtail/targets/gcplog/push_target_test.go +++ b/clients/pkg/promtail/targets/gcplog/push_target_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" @@ -17,10 +17,10 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - lokiClient "github.com/grafana/loki/clients/pkg/promtail/client" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/gcplog" + lokiClient "github.com/grafana/loki/v3/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/gcplog" ) const localhost = "127.0.0.1" diff --git a/clients/pkg/promtail/targets/gcplog/push_translation.go b/clients/pkg/promtail/targets/gcplog/push_translation.go index f96f7171f218..aae5ee4fb25d 100644 --- a/clients/pkg/promtail/targets/gcplog/push_translation.go +++ b/clients/pkg/promtail/targets/gcplog/push_translation.go @@ -9,10 +9,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/promtail/api" - lokiClient "github.com/grafana/loki/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + lokiClient "github.com/grafana/loki/v3/clients/pkg/promtail/client" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) // PushMessage is the POST body format sent by GCP PubSub push subscriptions. diff --git a/clients/pkg/promtail/targets/gcplog/target.go b/clients/pkg/promtail/targets/gcplog/target.go index b122fb24112f..1c60e8a3eb2c 100644 --- a/clients/pkg/promtail/targets/gcplog/target.go +++ b/clients/pkg/promtail/targets/gcplog/target.go @@ -7,9 +7,9 @@ import ( "github.com/prometheus/prometheus/model/relabel" "google.golang.org/api/option" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // Target is a common interface implemented by both GCPLog targets. diff --git a/clients/pkg/promtail/targets/gcplog/target_test.go b/clients/pkg/promtail/targets/gcplog/target_test.go index 1a7cec47131f..96bf7606985e 100644 --- a/clients/pkg/promtail/targets/gcplog/target_test.go +++ b/clients/pkg/promtail/targets/gcplog/target_test.go @@ -17,9 +17,9 @@ import ( "github.com/grafana/dskit/server" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func TestNewGCPLogTarget(t *testing.T) { diff --git a/clients/pkg/promtail/targets/gcplog/targetmanager.go b/clients/pkg/promtail/targets/gcplog/targetmanager.go index 71f3b5130a2f..cf731c6c9f99 100644 --- a/clients/pkg/promtail/targets/gcplog/targetmanager.go +++ b/clients/pkg/promtail/targets/gcplog/targetmanager.go @@ -6,10 +6,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // nolint:revive diff --git a/clients/pkg/promtail/targets/gelf/gelftarget.go b/clients/pkg/promtail/targets/gelf/gelftarget.go index baaf8e3911fd..42298b7588cc 100644 --- a/clients/pkg/promtail/targets/gelf/gelftarget.go +++ b/clients/pkg/promtail/targets/gelf/gelftarget.go @@ -14,11 +14,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // SeverityLevels maps severity levels to severity string levels. diff --git a/clients/pkg/promtail/targets/gelf/gelftarget_test.go b/clients/pkg/promtail/targets/gelf/gelftarget_test.go index 86a304ef9a7a..8bdc5470e28b 100644 --- a/clients/pkg/promtail/targets/gelf/gelftarget_test.go +++ b/clients/pkg/promtail/targets/gelf/gelftarget_test.go @@ -15,8 +15,8 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func Test_Gelf(t *testing.T) { diff --git a/clients/pkg/promtail/targets/gelf/gelftargetmanager.go b/clients/pkg/promtail/targets/gelf/gelftargetmanager.go index f9824d3152f0..f6b7048287ce 100644 --- a/clients/pkg/promtail/targets/gelf/gelftargetmanager.go +++ b/clients/pkg/promtail/targets/gelf/gelftargetmanager.go @@ -4,10 +4,10 @@ import ( "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // TargetManager manages a series of Gelf Targets. diff --git a/clients/pkg/promtail/targets/heroku/target.go b/clients/pkg/promtail/targets/heroku/target.go index 9ab2fdaacfac..83aceda6b792 100644 --- a/clients/pkg/promtail/targets/heroku/target.go +++ b/clients/pkg/promtail/targets/heroku/target.go @@ -14,14 +14,14 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/promtail/api" - lokiClient "github.com/grafana/loki/clients/pkg/promtail/client" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/serverutils" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" - - "github.com/grafana/loki/pkg/logproto" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + lokiClient "github.com/grafana/loki/v3/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/serverutils" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" + + "github.com/grafana/loki/v3/pkg/logproto" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type Target struct { diff --git a/clients/pkg/promtail/targets/heroku/target_test.go b/clients/pkg/promtail/targets/heroku/target_test.go index c584bedba471..42657d83ff1b 100644 --- a/clients/pkg/promtail/targets/heroku/target_test.go +++ b/clients/pkg/promtail/targets/heroku/target_test.go @@ -19,9 +19,9 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - lokiClient "github.com/grafana/loki/clients/pkg/promtail/client" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + lokiClient "github.com/grafana/loki/v3/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) const localhost = "127.0.0.1" diff --git a/clients/pkg/promtail/targets/heroku/targetmanager.go b/clients/pkg/promtail/targets/heroku/targetmanager.go index 5d046ca3d45c..3ad94bc5a79f 100644 --- a/clients/pkg/promtail/targets/heroku/targetmanager.go +++ b/clients/pkg/promtail/targets/heroku/targetmanager.go @@ -5,10 +5,10 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) type TargetManager struct { diff --git a/clients/pkg/promtail/targets/journal/journaltarget.go b/clients/pkg/promtail/targets/journal/journaltarget.go index 6630b827e7c1..fa04ac50c3db 100644 --- a/clients/pkg/promtail/targets/journal/journaltarget.go +++ b/clients/pkg/promtail/targets/journal/journaltarget.go @@ -19,12 +19,12 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) const ( diff --git a/clients/pkg/promtail/targets/journal/journaltarget_test.go b/clients/pkg/promtail/targets/journal/journaltarget_test.go index b0186d1504f4..768cb7f5c151 100644 --- a/clients/pkg/promtail/targets/journal/journaltarget_test.go +++ b/clients/pkg/promtail/targets/journal/journaltarget_test.go @@ -20,10 +20,10 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/testutils" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/testutils" ) type mockJournalReader struct { diff --git a/clients/pkg/promtail/targets/journal/journaltargetmanager.go b/clients/pkg/promtail/targets/journal/journaltargetmanager.go index 9e55c37d9268..f0d99f091db1 100644 --- a/clients/pkg/promtail/targets/journal/journaltargetmanager.go +++ b/clients/pkg/promtail/targets/journal/journaltargetmanager.go @@ -7,10 +7,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // JournalTargetManager manages a series of JournalTargets. diff --git a/clients/pkg/promtail/targets/journal/journaltargetmanager_linux.go b/clients/pkg/promtail/targets/journal/journaltargetmanager_linux.go index 6940d57ead5d..52d216e58a09 100644 --- a/clients/pkg/promtail/targets/journal/journaltargetmanager_linux.go +++ b/clients/pkg/promtail/targets/journal/journaltargetmanager_linux.go @@ -7,11 +7,11 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // JournalTargetManager manages a series of JournalTargets. diff --git a/clients/pkg/promtail/targets/kafka/consumer.go b/clients/pkg/promtail/targets/kafka/consumer.go index 34cb61da00e7..f4b8a4d260cf 100644 --- a/clients/pkg/promtail/targets/kafka/consumer.go +++ b/clients/pkg/promtail/targets/kafka/consumer.go @@ -11,7 +11,7 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/backoff" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) var defaultBackOff = backoff.Config{ diff --git a/clients/pkg/promtail/targets/kafka/consumer_test.go b/clients/pkg/promtail/targets/kafka/consumer_test.go index 63ab60b1a64f..7420bdf6c1f1 100644 --- a/clients/pkg/promtail/targets/kafka/consumer_test.go +++ b/clients/pkg/promtail/targets/kafka/consumer_test.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) type DiscovererFn func(sarama.ConsumerGroupSession, sarama.ConsumerGroupClaim) (RunnableTarget, error) diff --git a/clients/pkg/promtail/targets/kafka/formatter.go b/clients/pkg/promtail/targets/kafka/formatter.go index b0f61e4332e3..f800dbe20b9d 100644 --- a/clients/pkg/promtail/targets/kafka/formatter.go +++ b/clients/pkg/promtail/targets/kafka/formatter.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) func format(lbs labels.Labels, cfg []*relabel.Config) model.LabelSet { diff --git a/clients/pkg/promtail/targets/kafka/parser.go b/clients/pkg/promtail/targets/kafka/parser.go index 872ea0e45bc0..9ad3b7f8271c 100644 --- a/clients/pkg/promtail/targets/kafka/parser.go +++ b/clients/pkg/promtail/targets/kafka/parser.go @@ -5,9 +5,9 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" - "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" ) // messageParser implements MessageParser. It doesn't modify the content of the original `message.Value`. diff --git a/clients/pkg/promtail/targets/kafka/target.go b/clients/pkg/promtail/targets/kafka/target.go index 519af759b66c..707cc01ca194 100644 --- a/clients/pkg/promtail/targets/kafka/target.go +++ b/clients/pkg/promtail/targets/kafka/target.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) type runnableDroppedTarget struct { diff --git a/clients/pkg/promtail/targets/kafka/target_syncer.go b/clients/pkg/promtail/targets/kafka/target_syncer.go index 187f4749ce2d..6afcd24ad783 100644 --- a/clients/pkg/promtail/targets/kafka/target_syncer.go +++ b/clients/pkg/promtail/targets/kafka/target_syncer.go @@ -16,12 +16,12 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) var TopicPollInterval = 30 * time.Second diff --git a/clients/pkg/promtail/targets/kafka/target_syncer_test.go b/clients/pkg/promtail/targets/kafka/target_syncer_test.go index cc1161c63dcb..1f0255cedf62 100644 --- a/clients/pkg/promtail/targets/kafka/target_syncer_test.go +++ b/clients/pkg/promtail/targets/kafka/target_syncer_test.go @@ -17,9 +17,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/logentry/stages" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func Test_TopicDiscovery(t *testing.T) { diff --git a/clients/pkg/promtail/targets/kafka/target_test.go b/clients/pkg/promtail/targets/kafka/target_test.go index a62488b04a7c..0f8061027de3 100644 --- a/clients/pkg/promtail/targets/kafka/target_test.go +++ b/clients/pkg/promtail/targets/kafka/target_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" ) // Consumergroup handler diff --git a/clients/pkg/promtail/targets/kafka/targetmanager.go b/clients/pkg/promtail/targets/kafka/targetmanager.go index f16606aefda7..c9cc38250370 100644 --- a/clients/pkg/promtail/targets/kafka/targetmanager.go +++ b/clients/pkg/promtail/targets/kafka/targetmanager.go @@ -5,9 +5,9 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // TargetManager manages a series of kafka targets. diff --git a/clients/pkg/promtail/targets/lokipush/pushtarget.go b/clients/pkg/promtail/targets/lokipush/pushtarget.go index 88c7859bd36e..63630c6e5ac2 100644 --- a/clients/pkg/promtail/targets/lokipush/pushtarget.go +++ b/clients/pkg/promtail/targets/lokipush/pushtarget.go @@ -20,14 +20,14 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/serverutils" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" - - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/logproto" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/serverutils" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" + + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logproto" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type PushTarget struct { diff --git a/clients/pkg/promtail/targets/lokipush/pushtarget_test.go b/clients/pkg/promtail/targets/lokipush/pushtarget_test.go index 147994fb2df1..3fe48b599a5e 100644 --- a/clients/pkg/promtail/targets/lokipush/pushtarget_test.go +++ b/clients/pkg/promtail/targets/lokipush/pushtarget_test.go @@ -20,12 +20,12 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/client" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/client" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) const localhost = "127.0.0.1" diff --git a/clients/pkg/promtail/targets/lokipush/pushtargetmanager.go b/clients/pkg/promtail/targets/lokipush/pushtargetmanager.go index be2903754472..e924647c2c07 100644 --- a/clients/pkg/promtail/targets/lokipush/pushtargetmanager.go +++ b/clients/pkg/promtail/targets/lokipush/pushtargetmanager.go @@ -9,10 +9,10 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/util/strutil" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // PushTargetManager manages a series of PushTargets. diff --git a/clients/pkg/promtail/targets/lokipush/pushtargetmanager_test.go b/clients/pkg/promtail/targets/lokipush/pushtargetmanager_test.go index 40621d18f5ba..08730042bf84 100644 --- a/clients/pkg/promtail/targets/lokipush/pushtargetmanager_test.go +++ b/clients/pkg/promtail/targets/lokipush/pushtargetmanager_test.go @@ -5,7 +5,7 @@ import ( "github.com/grafana/dskit/server" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" ) func Test_validateJobName(t *testing.T) { diff --git a/clients/pkg/promtail/targets/manager.go b/clients/pkg/promtail/targets/manager.go index 91ce61a1c84f..241dd25aaa5c 100644 --- a/clients/pkg/promtail/targets/manager.go +++ b/clients/pkg/promtail/targets/manager.go @@ -8,23 +8,23 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/positions" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/azureeventhubs" - "github.com/grafana/loki/clients/pkg/promtail/targets/cloudflare" - "github.com/grafana/loki/clients/pkg/promtail/targets/docker" - "github.com/grafana/loki/clients/pkg/promtail/targets/file" - "github.com/grafana/loki/clients/pkg/promtail/targets/gcplog" - "github.com/grafana/loki/clients/pkg/promtail/targets/gelf" - "github.com/grafana/loki/clients/pkg/promtail/targets/heroku" - "github.com/grafana/loki/clients/pkg/promtail/targets/journal" - "github.com/grafana/loki/clients/pkg/promtail/targets/kafka" - "github.com/grafana/loki/clients/pkg/promtail/targets/lokipush" - "github.com/grafana/loki/clients/pkg/promtail/targets/stdin" - "github.com/grafana/loki/clients/pkg/promtail/targets/syslog" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/clients/pkg/promtail/targets/windows" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/positions" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/azureeventhubs" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/cloudflare" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/docker" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/file" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/gcplog" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/gelf" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/heroku" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/journal" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/kafka" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/lokipush" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/stdin" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/syslog" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/windows" ) const ( diff --git a/clients/pkg/promtail/targets/stdin/stdin_target_manager.go b/clients/pkg/promtail/targets/stdin/stdin_target_manager.go index 065d6bd93feb..bcc441950e3a 100644 --- a/clients/pkg/promtail/targets/stdin/stdin_target_manager.go +++ b/clients/pkg/promtail/targets/stdin/stdin_target_manager.go @@ -15,12 +15,12 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // bufferSize is the size of the buffered reader diff --git a/clients/pkg/promtail/targets/stdin/stdin_target_manager_test.go b/clients/pkg/promtail/targets/stdin/stdin_target_manager_test.go index 58abae3c802b..8f2135f3aff3 100644 --- a/clients/pkg/promtail/targets/stdin/stdin_target_manager_test.go +++ b/clients/pkg/promtail/targets/stdin/stdin_target_manager_test.go @@ -12,13 +12,13 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" + "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/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" - "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_newReaderTarget(t *testing.T) { diff --git a/clients/pkg/promtail/targets/syslog/syslogparser/syslogparser_test.go b/clients/pkg/promtail/targets/syslog/syslogparser/syslogparser_test.go index 89d17c4645f5..f99742de48a2 100644 --- a/clients/pkg/promtail/targets/syslog/syslogparser/syslogparser_test.go +++ b/clients/pkg/promtail/targets/syslog/syslogparser/syslogparser_test.go @@ -9,7 +9,7 @@ import ( "github.com/influxdata/go-syslog/v3/rfc5424" "github.com/stretchr/testify/require" - "github.com/grafana/loki/clients/pkg/promtail/targets/syslog/syslogparser" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/syslog/syslogparser" ) var ( diff --git a/clients/pkg/promtail/targets/syslog/syslogtarget.go b/clients/pkg/promtail/targets/syslog/syslogtarget.go index 54befebc3893..35ba4d8cf297 100644 --- a/clients/pkg/promtail/targets/syslog/syslogtarget.go +++ b/clients/pkg/promtail/targets/syslog/syslogtarget.go @@ -15,11 +15,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) var ( diff --git a/clients/pkg/promtail/targets/syslog/syslogtarget_test.go b/clients/pkg/promtail/targets/syslog/syslogtarget_test.go index 62b5924626f1..2f06e04321ec 100644 --- a/clients/pkg/promtail/targets/syslog/syslogtarget_test.go +++ b/clients/pkg/promtail/targets/syslog/syslogtarget_test.go @@ -19,9 +19,9 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/syslog/syslogparser" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/syslog/syslogparser" ) var ( diff --git a/clients/pkg/promtail/targets/syslog/syslogtargetmanager.go b/clients/pkg/promtail/targets/syslog/syslogtargetmanager.go index 8a7246a28a46..ffda8b3de420 100644 --- a/clients/pkg/promtail/targets/syslog/syslogtargetmanager.go +++ b/clients/pkg/promtail/targets/syslog/syslogtargetmanager.go @@ -5,10 +5,10 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // SyslogTargetManager manages a series of SyslogTargets. diff --git a/clients/pkg/promtail/targets/syslog/transport.go b/clients/pkg/promtail/targets/syslog/transport.go index 67a78136e311..6b1bdfeb91c1 100644 --- a/clients/pkg/promtail/targets/syslog/transport.go +++ b/clients/pkg/promtail/targets/syslog/transport.go @@ -20,8 +20,8 @@ import ( "github.com/influxdata/go-syslog/v3" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/syslog/syslogparser" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/syslog/syslogparser" ) var ( diff --git a/clients/pkg/promtail/targets/windows/bookmark.go b/clients/pkg/promtail/targets/windows/bookmark.go index b7a4a7698cde..55ad7f304052 100644 --- a/clients/pkg/promtail/targets/windows/bookmark.go +++ b/clients/pkg/promtail/targets/windows/bookmark.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/afero" - "github.com/grafana/loki/clients/pkg/promtail/targets/windows/win_eventlog" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/windows/win_eventlog" ) type bookMark struct { diff --git a/clients/pkg/promtail/targets/windows/format.go b/clients/pkg/promtail/targets/windows/format.go index 9fc44cc62a8b..821aa4ecf0d9 100644 --- a/clients/pkg/promtail/targets/windows/format.go +++ b/clients/pkg/promtail/targets/windows/format.go @@ -9,8 +9,8 @@ import ( jsoniter "github.com/json-iterator/go" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/windows/win_eventlog" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/windows/win_eventlog" ) type Event struct { diff --git a/clients/pkg/promtail/targets/windows/target.go b/clients/pkg/promtail/targets/windows/target.go index c4e1806724a5..42cb298f0995 100644 --- a/clients/pkg/promtail/targets/windows/target.go +++ b/clients/pkg/promtail/targets/windows/target.go @@ -18,10 +18,10 @@ import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" - "github.com/grafana/loki/clients/pkg/promtail/targets/windows/win_eventlog" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/windows/win_eventlog" ) var fs = afero.NewOsFs() diff --git a/clients/pkg/promtail/targets/windows/target_test.go b/clients/pkg/promtail/targets/windows/target_test.go index a9a692b21ecf..c766cb869cd8 100644 --- a/clients/pkg/promtail/targets/windows/target_test.go +++ b/clients/pkg/promtail/targets/windows/target_test.go @@ -14,13 +14,13 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/sys/windows/svc/eventlog" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/client/fake" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/windows/win_eventlog" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/windows/win_eventlog" - "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 init() { diff --git a/clients/pkg/promtail/targets/windows/targetmanager.go b/clients/pkg/promtail/targets/windows/targetmanager.go index 78e98880ca2b..9bb12ebc15a9 100644 --- a/clients/pkg/promtail/targets/windows/targetmanager.go +++ b/clients/pkg/promtail/targets/windows/targetmanager.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // TargetManager manages a series of windows event targets. diff --git a/clients/pkg/promtail/targets/windows/targetmanager_windows.go b/clients/pkg/promtail/targets/windows/targetmanager_windows.go index 78793b26c730..4bc53bcc4215 100644 --- a/clients/pkg/promtail/targets/windows/targetmanager_windows.go +++ b/clients/pkg/promtail/targets/windows/targetmanager_windows.go @@ -8,10 +8,10 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/clients/pkg/logentry/stages" - "github.com/grafana/loki/clients/pkg/promtail/api" - "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/loki/clients/pkg/promtail/targets/target" + "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/scrapeconfig" + "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target" ) // TargetManager manages a series of windows event targets. diff --git a/clients/pkg/promtail/targets/windows/win_eventlog/win_eventlog.go b/clients/pkg/promtail/targets/windows/win_eventlog/win_eventlog.go index f2411698d4b1..71ff148de58f 100644 --- a/clients/pkg/promtail/targets/windows/win_eventlog/win_eventlog.go +++ b/clients/pkg/promtail/targets/windows/win_eventlog/win_eventlog.go @@ -39,7 +39,7 @@ import ( "github.com/influxdata/telegraf/plugins/inputs" "golang.org/x/sys/windows" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var sampleConfig = ` diff --git a/clients/pkg/promtail/utils/entries.go b/clients/pkg/promtail/utils/entries.go index 214422b674ba..10204e8fb37f 100644 --- a/clients/pkg/promtail/utils/entries.go +++ b/clients/pkg/promtail/utils/entries.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" ) // FanoutEntryHandler implements api.EntryHandler, fanning out received entries to one or multiple channels. diff --git a/clients/pkg/promtail/utils/entries_test.go b/clients/pkg/promtail/utils/entries_test.go index 8029e895c2a6..c9b098d9ee4a 100644 --- a/clients/pkg/promtail/utils/entries_test.go +++ b/clients/pkg/promtail/utils/entries_test.go @@ -8,9 +8,9 @@ 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" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestFanoutEntryHandler_SuccessfulFanout(t *testing.T) { diff --git a/clients/pkg/promtail/utils/remotewrite_server.go b/clients/pkg/promtail/utils/remotewrite_server.go index 089f4a79a01b..837d3a8581f1 100644 --- a/clients/pkg/promtail/utils/remotewrite_server.go +++ b/clients/pkg/promtail/utils/remotewrite_server.go @@ -5,8 +5,8 @@ import ( "net/http" "net/http/httptest" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" ) // RemoteWriteRequest wraps the received logs remote write request that is received. diff --git a/clients/pkg/promtail/wal/reader.go b/clients/pkg/promtail/wal/reader.go index b19b2bbecc10..769c566efbee 100644 --- a/clients/pkg/promtail/wal/reader.go +++ b/clients/pkg/promtail/wal/reader.go @@ -5,11 +5,11 @@ import ( "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/ingester/wal" - "github.com/grafana/loki/pkg/util" - walUtils "github.com/grafana/loki/pkg/util/wal" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/util" + walUtils "github.com/grafana/loki/v3/pkg/util/wal" ) // ReadWAL will read all entries in the WAL located under dir. Mainly used for testing diff --git a/clients/pkg/promtail/wal/wal.go b/clients/pkg/promtail/wal/wal.go index af1fa7e3d509..8e747530470c 100644 --- a/clients/pkg/promtail/wal/wal.go +++ b/clients/pkg/promtail/wal/wal.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/tsdb/wlog" - "github.com/grafana/loki/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/ingester/wal" ) var ( diff --git a/clients/pkg/promtail/wal/watcher.go b/clients/pkg/promtail/wal/watcher.go index 3e8719a23581..926c93c01bcf 100644 --- a/clients/pkg/promtail/wal/watcher.go +++ b/clients/pkg/promtail/wal/watcher.go @@ -14,7 +14,7 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/wlog" - "github.com/grafana/loki/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/ingester/wal" ) const ( diff --git a/clients/pkg/promtail/wal/watcher_test.go b/clients/pkg/promtail/wal/watcher_test.go index d9a5e04cb0b8..b41880f5d20f 100644 --- a/clients/pkg/promtail/wal/watcher_test.go +++ b/clients/pkg/promtail/wal/watcher_test.go @@ -13,11 +13,11 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "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/ingester/wal" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" ) type testWriteTo struct { diff --git a/clients/pkg/promtail/wal/writer.go b/clients/pkg/promtail/wal/writer.go index 8e754a01038f..e9360645716d 100644 --- a/clients/pkg/promtail/wal/writer.go +++ b/clients/pkg/promtail/wal/writer.go @@ -16,11 +16,11 @@ import ( "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/record" - "github.com/grafana/loki/clients/pkg/promtail/api" + "github.com/grafana/loki/v3/clients/pkg/promtail/api" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/clients/pkg/promtail/wal/writer_test.go b/clients/pkg/promtail/wal/writer_test.go index fbce817f2a26..a9c637f98b1c 100644 --- a/clients/pkg/promtail/wal/writer_test.go +++ b/clients/pkg/promtail/wal/writer_test.go @@ -13,9 +13,9 @@ 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" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestWriter_EntriesAreWrittenToWAL(t *testing.T) { diff --git a/cmd/logcli/main.go b/cmd/logcli/main.go index 56a954cd5b44..3d2aa85297b3 100644 --- a/cmd/logcli/main.go +++ b/cmd/logcli/main.go @@ -15,15 +15,15 @@ import ( "github.com/prometheus/common/version" "gopkg.in/alecthomas/kingpin.v2" - "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/logcli/index" - "github.com/grafana/loki/pkg/logcli/labelquery" - "github.com/grafana/loki/pkg/logcli/output" - "github.com/grafana/loki/pkg/logcli/query" - "github.com/grafana/loki/pkg/logcli/seriesquery" - "github.com/grafana/loki/pkg/logcli/volume" - "github.com/grafana/loki/pkg/logql/syntax" - _ "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/logcli/index" + "github.com/grafana/loki/v3/pkg/logcli/labelquery" + "github.com/grafana/loki/v3/pkg/logcli/output" + "github.com/grafana/loki/v3/pkg/logcli/query" + "github.com/grafana/loki/v3/pkg/logcli/seriesquery" + "github.com/grafana/loki/v3/pkg/logcli/volume" + "github.com/grafana/loki/v3/pkg/logql/syntax" + _ "github.com/grafana/loki/v3/pkg/util/build" ) var ( diff --git a/cmd/logql-analyzer/main.go b/cmd/logql-analyzer/main.go index 5031dbad7d89..beed1226709d 100644 --- a/cmd/logql-analyzer/main.go +++ b/cmd/logql-analyzer/main.go @@ -10,9 +10,9 @@ import ( "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/logqlanalyzer" - "github.com/grafana/loki/pkg/sizing" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logqlanalyzer" + "github.com/grafana/loki/v3/pkg/sizing" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func main() { diff --git a/cmd/loki-canary/main.go b/cmd/loki-canary/main.go index 70aad7b8dfd8..061b98321047 100644 --- a/cmd/loki-canary/main.go +++ b/cmd/loki-canary/main.go @@ -18,10 +18,10 @@ import ( "github.com/prometheus/common/config" "github.com/prometheus/common/version" - "github.com/grafana/loki/pkg/canary/comparator" - "github.com/grafana/loki/pkg/canary/reader" - "github.com/grafana/loki/pkg/canary/writer" - _ "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/canary/comparator" + "github.com/grafana/loki/v3/pkg/canary/reader" + "github.com/grafana/loki/v3/pkg/canary/writer" + _ "github.com/grafana/loki/v3/pkg/util/build" ) const ( diff --git a/cmd/loki/main.go b/cmd/loki/main.go index 20a5925acbb4..250568203be1 100644 --- a/cmd/loki/main.go +++ b/cmd/loki/main.go @@ -16,12 +16,12 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/version" - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/pkg/util" - _ "github.com/grafana/loki/pkg/util/build" - "github.com/grafana/loki/pkg/util/cfg" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/pkg/util" + _ "github.com/grafana/loki/v3/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/cfg" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) func exit(code int) { diff --git a/cmd/migrate/main.go b/cmd/migrate/main.go index d638adaaa812..e42468e532b0 100644 --- a/cmd/migrate/main.go +++ b/cmd/migrate/main.go @@ -17,16 +17,16 @@ import ( "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/util/cfg" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/util/cfg" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) type syncRange struct { diff --git a/cmd/querytee/main.go b/cmd/querytee/main.go index 9007dd6a3e3f..5acebfed8517 100644 --- a/cmd/querytee/main.go +++ b/cmd/querytee/main.go @@ -10,8 +10,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/collectors" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/tools/querytee" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/tools/querytee" ) type Config struct { diff --git a/docs/sources/configure/_index.md b/docs/sources/configure/_index.md index 4c99c3b4c8d1..cce92e24eb2f 100644 --- a/docs/sources/configure/_index.md +++ b/docs/sources/configure/_index.md @@ -2830,6 +2830,12 @@ The `limits_config` block configures global and per-tenant limits in Loki. # CLI flag: -validation.discover-service-name [discover_service_name: | default = [service app application name app_kubernetes_io_name container container_name component workload job]] +# Discover and add log levels during ingestion, if not present already. Levels +# would be added to Structured Metadata with name 'level' and one of the values +# from 'debug', 'info', 'warn', 'error', 'critical', 'fatal'. +# CLI flag: -validation.discover-log-levels +[discover_log_levels: | default = false] + # Maximum number of active streams per user, per ingester. 0 to disable. # CLI flag: -ingester.max-streams-per-user [max_streams_per_user: | default = 0] diff --git a/docs/sources/operations/upgrade.md b/docs/sources/operations/upgrade.md new file mode 100644 index 000000000000..5a0be8626e6a --- /dev/null +++ b/docs/sources/operations/upgrade.md @@ -0,0 +1,11 @@ +--- +title: Upgrade +description: Links to Loki upgrade documentation. +weight: +--- + +# Upgrade + +- [Upgrade](https://grafana.com/docs/loki/latest/setup/upgrade/) from one Loki version to a newer version. + +- [Upgrade Helm](https://grafana.com/docs/loki/latest/setup/upgrade/) from Helm v2.x to Helm v3.x. diff --git a/go.mod b/go.mod index 2fad4fa4375f..0d0659a92220 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/grafana/loki +module github.com/grafana/loki/v3 go 1.21 diff --git a/integration/client/client.go b/integration/client/client.go index 1ad94fd0edbb..a749789036f0 100644 --- a/integration/client/client.go +++ b/integration/client/client.go @@ -23,9 +23,9 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/plog/plogotlp" - logcli "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/util/unmarshal" + logcli "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/util/unmarshal" ) const requestTimeout = 30 * time.Second diff --git a/integration/cluster/cluster.go b/integration/cluster/cluster.go index 79dc7ce2809f..446f84cfbb13 100644 --- a/integration/cluster/cluster.go +++ b/integration/cluster/cluster.go @@ -23,14 +23,14 @@ import ( "github.com/prometheus/common/model" "gopkg.in/yaml.v2" - "github.com/grafana/loki/integration/util" - - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/cfg" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/integration/util" + + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/cfg" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/integration/loki_micro_services_delete_test.go b/integration/loki_micro_services_delete_test.go index d77d7ab11508..ce83cdb4d9f5 100644 --- a/integration/loki_micro_services_delete_test.go +++ b/integration/loki_micro_services_delete_test.go @@ -13,13 +13,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/integration/client" - "github.com/grafana/loki/integration/cluster" + "github.com/grafana/loki/v3/integration/client" + "github.com/grafana/loki/v3/integration/cluster" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" "github.com/grafana/loki/pkg/push" - "github.com/grafana/loki/pkg/storage" + + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage" ) type pushRequest struct { diff --git a/integration/loki_micro_services_test.go b/integration/loki_micro_services_test.go index 3480757f0793..611fafb15ab7 100644 --- a/integration/loki_micro_services_test.go +++ b/integration/loki_micro_services_test.go @@ -21,12 +21,12 @@ import ( "golang.org/x/exp/slices" "google.golang.org/protobuf/proto" - "github.com/grafana/loki/integration/client" - "github.com/grafana/loki/integration/cluster" + "github.com/grafana/loki/v3/integration/client" + "github.com/grafana/loki/v3/integration/cluster" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/util/httpreq" - "github.com/grafana/loki/pkg/util/querylimits" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/querylimits" ) func TestMicroServicesIngestQuery(t *testing.T) { diff --git a/integration/loki_rule_eval_test.go b/integration/loki_rule_eval_test.go index 5ee9bf97ac56..00caeef8883c 100644 --- a/integration/loki_rule_eval_test.go +++ b/integration/loki_rule_eval_test.go @@ -14,10 +14,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/integration/client" - "github.com/grafana/loki/integration/cluster" + "github.com/grafana/loki/v3/integration/client" + "github.com/grafana/loki/v3/integration/cluster" - "github.com/grafana/loki/pkg/ruler" + "github.com/grafana/loki/v3/pkg/ruler" ) // TestLocalRuleEval tests that rules are evaluated locally with an embedded query engine diff --git a/integration/loki_simple_scalable_test.go b/integration/loki_simple_scalable_test.go index f831dcc406c4..070d3f918a14 100644 --- a/integration/loki_simple_scalable_test.go +++ b/integration/loki_simple_scalable_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/integration/client" - "github.com/grafana/loki/integration/cluster" + "github.com/grafana/loki/v3/integration/client" + "github.com/grafana/loki/v3/integration/cluster" ) func TestSimpleScalable_IngestQuery(t *testing.T) { diff --git a/integration/loki_single_binary_test.go b/integration/loki_single_binary_test.go index 7e26f9c4caf7..6aaf64f5b415 100644 --- a/integration/loki_single_binary_test.go +++ b/integration/loki_single_binary_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/integration/client" - "github.com/grafana/loki/integration/cluster" + "github.com/grafana/loki/v3/integration/client" + "github.com/grafana/loki/v3/integration/cluster" ) func TestSingleBinaryIngestQuery(t *testing.T) { diff --git a/integration/multi_tenant_queries_test.go b/integration/multi_tenant_queries_test.go index 4c13d6f9e624..339b380d1b01 100644 --- a/integration/multi_tenant_queries_test.go +++ b/integration/multi_tenant_queries_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/integration/client" - "github.com/grafana/loki/integration/cluster" + "github.com/grafana/loki/v3/integration/client" + "github.com/grafana/loki/v3/integration/cluster" ) func TestMultiTenantQuery(t *testing.T) { diff --git a/integration/per_request_limits_test.go b/integration/per_request_limits_test.go index 34d9c7e99f44..482ff0e93fcf 100644 --- a/integration/per_request_limits_test.go +++ b/integration/per_request_limits_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/integration/client" - "github.com/grafana/loki/integration/cluster" + "github.com/grafana/loki/v3/integration/client" + "github.com/grafana/loki/v3/integration/cluster" - "github.com/grafana/loki/pkg/util/querylimits" + "github.com/grafana/loki/v3/pkg/util/querylimits" ) func TestPerRequestLimits(t *testing.T) { diff --git a/operator/docs/enhancements/short_lived_tokens_authentication.md b/operator/docs/enhancements/short_lived_tokens_authentication.md new file mode 100644 index 000000000000..7d9deba30b7b --- /dev/null +++ b/operator/docs/enhancements/short_lived_tokens_authentication.md @@ -0,0 +1,355 @@ +--- +title: Short-Lived Token Authentication +authors: + - "@periklis" +reviewers: + - "@xperimental" + - "@JoaoBraveCoding" + - "@btaani" +creation-date: 2023-10-26 +last-updated: 2024-03-07 +draft: false +menu: + docs: + parent: "enhancements" +weight: 100 +toc: true +--- + +## Summary + +LokiStack object storage access on all public cloud providers currently only supports credentials for a static cloud service account (i.e. a pair of client id and secret). Provisioning a static cloud service account represents a simple and automation-friendly approach to control access to each provider's resources (e.g. access to S3/GCS/etc.). However, the administrator of such needs to consider manual handling of certain security aspects, i.e. secret rotation, account rotation on expiry, etc. + +To enhance IAM automation across the entire lifetime of access credentials all public cloud providers offer specific services (e.g. named STS, Workload Identity Federation): +1. Automate creation and rotation of credentials per Kubernetes workload using one OIDC authorization server per Kubernetes cluster for its service accounts. +2. Each workload on the managed Kubernetes cluster must be bound to a specific IAM role to access any provider service (e.g. S3/GCS/Azure Storage) +3. The OIDC-based workflow ensures issuing only short-lived tokens to each workload and in turn frequent credentials rotation. + +Such an approach ensures that each Kubernetes workload requests access to the IAM controlled resources by its Kubernetes service account only. Each valid request is further secured by providing only rotated short lived tokens. Thus any Kubernetes workload access can be controlled through the same IAM mechanisms as with static service accounts (e.g. disable on security breaches) plus using automatic rotation to minimize the impact vector on security incidents. + +The following proposal discusses the implemented support of the above workflow in the Loki Operator for all three public cloud providers (AWS, GCP, Azure). Furthermore, it provides instructions on how to create IAM resources upfront to control LokiStack object storage access using AWS STS, GCP Workload Identity or Azure Workload Identity Federation. + +__Note:__ Short-lived Token authentication is picked in this proposal as a generic term that maps well enough to the following public cloud providers IAM offerings: +- Azure: [Workload Identity Federation](https://learn.microsoft.com/en-us/entra/workload-id/workload-identity-federation) +- AWS: [Secure Service Token](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html) +- Google Cloud Platform: [Workload Identity Federation](https://cloud.google.com/iam/docs/workload-identity-federation) + +## Motivation + +Building upon the fact that short-lived token authentication is supported by all three object storage clients in Loki (Azure, AWS, GAP), this proposal's main focus is to automate the administration effort to run LokiStack using such an authentication workflow for object storage access. + +### Goals + +- The LokiStack administrator provides only minimal but valid object storage secrets that enable short-lived token authentication for all three major cloud providers. +- The LokiStack administrator is not required to expose credentials/identity-tokens/etc. to the cloud provider when operating in that workflow. + +### Non-Goals + +- Provide auxiliary and comprehensive tooling to automate preparing the cloud provider IAM resources for short-lived token authentication. + +## Proposal + +The following proposal describes the required changes and validations for each object storage secret for each major cloud provider (Azure, AWS, GCP). + +### API Extensions + +The present proposal introduces a new optional field in the `ObjectStorageSecretSpec` namely `CredentialsMode`. If the user does not provide a value the `CredentialsMode` is automatically detected either from the provided secret fields or the operator environment variables (latter applies only in OpenShift cluters.). The selected or detected `CredentialsMode` is populated in addition in the `status.storage.credentialMode` field. + +```go +/ CredentialMode represents the type of authentication used for accessing the object storage. +// +// +kubebuilder:validation:Enum=static;token;token-cco +type CredentialMode string + +const ( + // CredentialModeStatic represents the usage of static, long-lived credentials stored in a Secret. + // This is the default authentication mode and available for all supported object storage types. + CredentialModeStatic CredentialMode = "static" + // CredentialModeToken represents the usage of short-lived tokens retrieved from a credential source. + // In this mode the static configuration does not contain credentials needed for the object storage. + // Instead, they are generated during runtime using a service, which allows for shorter-lived credentials and + // much more granular control. This authentication mode is not supported for all object storage types. + CredentialModeToken CredentialMode = "token" + // CredentialModeTokenCCO represents the usage of short-lived tokens retrieved from a credential source. + // This mode is similar to CredentialModeToken, but instead of having a user-configured credential source, + // it is configured by the environment and the operator relies on the Cloud Credential Operator to provide + // a secret. This mode is only supported for certain object storage types in certain runtime environments. + CredentialModeTokenCCO CredentialMode = "token-cco" +) + +// ObjectStorageSecretSpec is a secret reference containing name only, no namespace. +type ObjectStorageSecretSpec struct { +... + // CredentialMode can be used to set the desired credential mode for authenticating with the object storage. + // If this is not set, then the operator tries to infer the credential mode from the provided secret and its + // own configuration. + // + // +optional + // +kubebuilder:validation:Optional + CredentialMode CredentialMode `json:"credentialMode,omitempty"` +} +``` + +The purpose of the `CredentialMode` is to override the detected credentials type from object storage secrets or the operator environment variables. Latter is only supported on AWS-STS/Azure-WIF managed OpenShift clusters, where the operator is using CredentialMode `token-cco` by default. However, the user might want to use `static` to store logs for example to Minio on the same cluster instead to AWS S3. + +### Implementation Details/Notes/Constraints + +The following sections describe the required changes in LokiStack's object storage secret format for each object storage client to enable short-lived token authentication + +#### Azure Workload Identity Federation + +##### Overview + +The current Azure object storage secret requires the following mandatory set of fields to be available: + +```yaml +data: + environment: # The Azure Storage account environment + container: # The Azure Storage account container + account_name: # The Azure Storage account name + account_key: # The Azure Storage account key +``` + +In contrast, a minimal configuration set of fields for short-lived token authentication requires: + +```yaml +data: + environment: # The Azure Storage account environment + container: # The Azure Storage account container + account_name: # The Azure Storage account name + client_id: # The Azure Workload Identity's Client ID + tenant_id: # The Azure Account's Tenant ID holding the workload identity for LokiStack + subscription_id: # The Azure Account's Subscription ID holding the workload identity for LokiStack +``` + +##### Pre-requisites + +The LokiStack administrator is required to create a custom Azure Managed Identity and associated federated credentials to trust LokiStack's Kubernetes ServiceAccount. + +1. Create an Azure Managed Identity on the same resource group as the Kubernetes cluster hosting LokiStack: + +```shell +az identity create \ + --name $IDENTITY_NAME \ + --resource-group $RESOURCE_GROUP_NAME \ + --location $LOCATION \ + --subscription $SUBSCRIPTION_ID +``` + +2. Create two Federated Credentials for scenario `Kubernetes accessing Azure resources`: + +```shell +az identity federated-credential create \ + --name openshift-logging-lokistack \ + --identity-name $IDENTITY_NAME \ + --resource-group $RESOURCE_GROUP_NAME \ + --issuer $CLUSTER_ISSUER_URL \ + --subject system:serviceaccount:$LOKISTACK_NS:$LOKISTACK_NAME \ + --audiences $AUDIENCES + +az identity federated-credential create \ + --name openshift-logging-lokistack-ruler \ + --identity-name $IDENTITY_NAME \ + --resource-group $RESOURCE_GROUP_NAME \ + --issuer $CLUSTER_ISSUER_URL \ + --subject system:serviceaccount:$LOKISTACK_NS:$LOKISTACK_NAME-ruler \ + --audiences $AUDIENCES +``` + +__Note:__ To enable the required federated credential scenario in the above command the subject needs to be of the form: `system:serviceaccount::`. The above creates two federated credentials because the operator reconciles two Kubernetes serviceaccounts one common for all Loki pods and one for the Loki Ruler pod. The issuer and audiences are related to the Kubernetes cluster hosting LokiStack. Audience can be set to the Azure default `api://AzureADTokenExchange`. + +3. Assign the above managed identity to the Azure role `Storage Blob Data Contributor`: + +```shell +az role assignment create \ + --assignee "$MANAGED_IDENTITY_ID" \ + --role "Storage Blob Data Contributor" \ + --scope "/subscriptions/$SUBSCRIPTION_ID" +``` + +__Note:__ To lookup the managed identity id you can use the following command: + +```shell +az ad sp list --all --filter "servicePrincipalType eq 'ManagedIdentity'" +``` + +#### AWS Secure Token Service + +##### Overview + +The current S3 object storage secret requires the following mandatory set of fields to be available: + +```yaml +data: + bucketnames: # A comma-separated list of bucket names + access_key_id: # The AWS static service account's key ID + access_key_secret: # The AWS static service account's key secret + endpoint: # The AWS endpoint URL. +``` + +In contrast, a minimal configuration set of fields for short-lived token authentication requires: + +```yaml +data: + bucketnames: # A comma-separated list of bucket names + region: # A valid AWS region, e.g. us-east-1 + role_arn: # The AWS IAM Role associated with a trust relationship to Lokistack's serviceaccount +``` + +##### Pre-requisites + +The LokiStack administrator is required to create a custom AWS IAM Role associated with a trust relationship to the LokiStack's Kubernetes ServiceAccount + +1. Trust relationship: Ensures that each Lokistack container authenticating to AWS STS is using as identity its serviceaccount token. + +```json +{ + "Version": "2012-10-17", + "Statement": [ + { + "Effect": "Allow", + "Principal": { + "Federated": "arn:aws:iam::${AWS_ACCOUNT_ID}:oidc-provider/${OIDC_PROVIDER}" + }, + "Action": "sts:AssumeRoleWithWebIdentity", + "Condition": { + "StringEquals": { + "${OIDC_PROVIDER}:sub": [ + "system:serviceaccount:${LOKISTACK_NS}:${LOKISTACK_NAME}" + "system:serviceaccount:${LOKISTACK_NS}:${LOKISTACK_NAME}-ruler" + ] + } + } + } + ] +} +``` + +__Note:__ To enable the required trust relationship scenario in the above command the subject needs to be of the form: `system:serviceaccount::`. + +2. Create an AWS IAM role: + +```shell +aws iam create-role \ + --role-name "my-lokistack-s3-access" \ + --assume-role-policy-document file:///tmp/trust.json \ + --query Role.Arn \ + --output text +``` + +3. Attach a specific policy that role: + +```shell +aws iam attach-role-policy \ + --role-name "my-lokistack-s3-access" \ + --policy-arn "arn:aws:iam::aws:policy/AmazonS3FullAccess" +``` + +#### GCP Workload Identity Federation + +The current GCS object storage secret requires the following mandatory set of fields to be available: + +```yaml +data: + bucketname: # The GCS bucket name + key.json: # The static serviceaccount json +``` + +In contrast, a minimal configuration set of fields for short-lived token authentication requires: + +```yaml +data: + audience: # The audience configured for Loki's k8s serviceacount + bucketname: # The GCS bucket name + key.json: # The serviceacount json file for type external_account +``` + +The following format will be validated for the `key.json` and in particular the `credential_source.file` having the default value `/var/run/secrets/storage/serviceaccount/token`. + +```json +{ + "type": "external_account", + "audience": "//iam.googleapis.com/projects/123456789/locations/global/workloadIdentityPools/test-pool/providers/test-provider", + "subject_token_type": "urn:ietf:params:oauth:token-type:jwt", + "token_url": "https://sts.googleapis.com/v1/token", + "service_account_impersonation_url": "https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/test-service-account-42ssv@test-project.iam.gserviceaccount.com:generateAccessToken", + "credential_source": { + "file": "/var/run/secrets/storage/serviceaccount/token", + "format": { + "type": "text" + } + } +} +``` + +##### Pre-requisites + +The LokiStack administrator is required to create a custom Google Managed Identity and an associated credentials configuration to trust the LokiStack's Kubernetes ServiceAccount. + +1. Create a GCP service account to be used by the LokiStack to access GCP resources: + +```shell +gcloud iam service-accounts create "$SERVICE_ACCOUNT_NAME" \ + --display-name="Loki Operator Account" \ + --project "$PROJECT_ID" +``` + +2. Bind the minimal set of GCP roles `roles/iam.workloadIdentityUser` and `roles/storage.objectAdmin` to the newly created GCP serviceaccount: + +```shell +gcloud projects add-iam-policy-binding "$project_id" \ + --member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \ + --role="roles/iam.workloadIdentityUser"\ + --format=none + +gcloud projects add-iam-policy-binding "$project_id" \ + --member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \ + --role="roles/storage.objectAdmin" \ + --format=none +``` + +and the LokiStack serviceaccounts: + +```shell +gcloud projects add-iam-policy-binding "$PROJECT_ID" \ + --member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \ + --role="roles/iam.workloadIdentityUser" \ + --member="principal://iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/subject/system:serviceaccount:${LOKISTACK_NS}:${LOKISTACK_NAME}" + +gcloud projects add-iam-policy-binding "$PROJECT_ID" \ + --member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \ + --role="roles/storage.objectAdmin" \ + --member="principal://iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/subject/system:serviceaccount:${LOKISTACK_NS}:${LOKISTACK_NAME}" + +gcloud projects add-iam-policy-binding "$PROJECT_ID" \ + --member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \ + --role="roles/iam.workloadIdentityUser" \ + --member="principal://iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/subject/system:serviceaccount:${LOKISTACK_NS}:${LOKISTACK_NAME}-ruler" + +gcloud projects add-iam-policy-binding "$PROJECT_ID" \ + --member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" \ + --role="roles/storage.objectAdmin" \ + --member="principal://iam.googleapis.com/projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/subject/system:serviceaccount:${LOKISTACK_NS}:${LOKISTACK_NAME}-ruler" +``` + +__Note:__ To enable the required membership scenario in the above commands the subject needs to be of the form: `system:serviceaccount::`. The workload identity pool needs to be the same that manages your other Kubernetes cluster's managed identities. + +3. Create a credentials configuration file for the managed identity to be used by LokiStack: + +```shell +gcloud iam workload-identity-pools create-cred-config \ + "projects/$PROJECT_NUMBER/locations/global/workloadIdentityPools/$POOL_ID/providers/$PROVIDER_ID" \ + --service-account="$SERVICE_ACCOUNT_EMAIL" \ + --credential-source-file=/var/run/secrets/serviceaccount/token \ + --credential-source-type=text \ + --output-file="/tmp/google-application-credentials.json" +``` + +__Note:__ The workload identity pool and associated OIDC provider needs to be the same that manages your other Kubernetes cluster's managed identities. + +## Implementation History + +- AWS Support https://github.com/grafana/loki/pull/11481 +- GCS Support https://github.com/grafana/loki/pull/11869 +- Azure Support https://github.com/grafana/loki/pull/11802 +- Refactoring https://github.com/grafana/loki/pull/12106 diff --git a/pkg/analytics/reporter.go b/pkg/analytics/reporter.go index 85050237d99a..d58e727aac7f 100644 --- a/pkg/analytics/reporter.go +++ b/pkg/analytics/reporter.go @@ -18,8 +18,8 @@ import ( "github.com/grafana/dskit/services" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/util/build" ) const ( diff --git a/pkg/analytics/reporter_test.go b/pkg/analytics/reporter_test.go index 183f2d824620..a986ac66de05 100644 --- a/pkg/analytics/reporter_test.go +++ b/pkg/analytics/reporter_test.go @@ -14,7 +14,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" ) func Test_LeaderElection(t *testing.T) { diff --git a/pkg/analytics/seed_test.go b/pkg/analytics/seed_test.go index 4229c508d2df..366789354d69 100644 --- a/pkg/analytics/seed_test.go +++ b/pkg/analytics/seed_test.go @@ -15,7 +15,7 @@ import ( "github.com/grafana/dskit/services" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" ) type dnsProviderMock struct { diff --git a/pkg/analytics/stats.go b/pkg/analytics/stats.go index 2479ae28c804..e4ea068f0cab 100644 --- a/pkg/analytics/stats.go +++ b/pkg/analytics/stats.go @@ -14,7 +14,7 @@ import ( "sync" "time" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/build" "github.com/cespare/xxhash/v2" jsoniter "github.com/json-iterator/go" diff --git a/pkg/analytics/stats_test.go b/pkg/analytics/stats_test.go index 8c676af35865..b2ba30db7ca8 100644 --- a/pkg/analytics/stats_test.go +++ b/pkg/analytics/stats_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/build" ) func Test_BuildReport(t *testing.T) { diff --git a/pkg/bloomcompactor/batch.go b/pkg/bloomcompactor/batch.go index a9bf2c6c0cc8..4247fc1e4b52 100644 --- a/pkg/bloomcompactor/batch.go +++ b/pkg/bloomcompactor/batch.go @@ -9,12 +9,12 @@ import ( "github.com/grafana/dskit/multierror" "golang.org/x/exp/slices" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - logql_log "github.com/grafana/loki/pkg/logql/log" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + logql_log "github.com/grafana/loki/v3/pkg/logql/log" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) type Fetcher[A, B any] interface { diff --git a/pkg/bloomcompactor/batch_test.go b/pkg/bloomcompactor/batch_test.go index bd2cb3378cfb..d64b8313e106 100644 --- a/pkg/bloomcompactor/batch_test.go +++ b/pkg/bloomcompactor/batch_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) func TestBatchedLoader(t *testing.T) { diff --git a/pkg/bloomcompactor/bloomcompactor.go b/pkg/bloomcompactor/bloomcompactor.go index 7b91eca0565b..3a99a1d1ad86 100644 --- a/pkg/bloomcompactor/bloomcompactor.go +++ b/pkg/bloomcompactor/bloomcompactor.go @@ -16,13 +16,13 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/bloomutils" - "github.com/grafana/loki/pkg/storage" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - util_ring "github.com/grafana/loki/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/bloomutils" + "github.com/grafana/loki/v3/pkg/storage" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + util_ring "github.com/grafana/loki/v3/pkg/util/ring" ) var ( diff --git a/pkg/bloomcompactor/bloomcompactor_test.go b/pkg/bloomcompactor/bloomcompactor_test.go index 9ffa1a88ba65..1734ecfa710f 100644 --- a/pkg/bloomcompactor/bloomcompactor_test.go +++ b/pkg/bloomcompactor/bloomcompactor_test.go @@ -14,14 +14,14 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/bloomutils" - "github.com/grafana/loki/pkg/chunkenc" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - util_log "github.com/grafana/loki/pkg/util/log" - lokiring "github.com/grafana/loki/pkg/util/ring" - util_ring "github.com/grafana/loki/pkg/util/ring" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/bloomutils" + "github.com/grafana/loki/v3/pkg/chunkenc" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + util_log "github.com/grafana/loki/v3/pkg/util/log" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + util_ring "github.com/grafana/loki/v3/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/validation" ) func TestCompactor_ownsTenant(t *testing.T) { diff --git a/pkg/bloomcompactor/config.go b/pkg/bloomcompactor/config.go index e0b2afd924f4..8b42cd683471 100644 --- a/pkg/bloomcompactor/config.go +++ b/pkg/bloomcompactor/config.go @@ -7,7 +7,7 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/util/ring" ) const ( diff --git a/pkg/bloomcompactor/controller.go b/pkg/bloomcompactor/controller.go index 1f8770cc216f..37a7c6bc69b6 100644 --- a/pkg/bloomcompactor/controller.go +++ b/pkg/bloomcompactor/controller.go @@ -12,11 +12,11 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/chunkenc" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/chunkenc" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" ) type SimpleBloomController struct { diff --git a/pkg/bloomcompactor/controller_test.go b/pkg/bloomcompactor/controller_test.go index 7f81c5abe2d2..2367ee3cc956 100644 --- a/pkg/bloomcompactor/controller_test.go +++ b/pkg/bloomcompactor/controller_test.go @@ -8,9 +8,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" ) func Test_findGaps(t *testing.T) { diff --git a/pkg/bloomcompactor/metrics.go b/pkg/bloomcompactor/metrics.go index d4b4b0e53d50..d569a4dbfd82 100644 --- a/pkg/bloomcompactor/metrics.go +++ b/pkg/bloomcompactor/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) const ( diff --git a/pkg/bloomcompactor/retention.go b/pkg/bloomcompactor/retention.go index 4c7fc39c1ce6..7dd30dece9e8 100644 --- a/pkg/bloomcompactor/retention.go +++ b/pkg/bloomcompactor/retention.go @@ -13,10 +13,10 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/chunk/client" - storageconfig "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + storageconfig "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/validation" ) type retentionSharding interface { diff --git a/pkg/bloomcompactor/retention_test.go b/pkg/bloomcompactor/retention_test.go index 0f880a2bd7e2..26ad6b3d2e4a 100644 --- a/pkg/bloomcompactor/retention_test.go +++ b/pkg/bloomcompactor/retention_test.go @@ -15,16 +15,16 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - storageconfig "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" - util_log "github.com/grafana/loki/pkg/util/log" - lokiring "github.com/grafana/loki/pkg/util/ring" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/storage" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + storageconfig "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" + util_log "github.com/grafana/loki/v3/pkg/util/log" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/validation" ) var testTime = parseDayTime("2024-12-31").ModelTime() diff --git a/pkg/bloomcompactor/spec.go b/pkg/bloomcompactor/spec.go index 2f67d8f90dcd..6c7e095dbed8 100644 --- a/pkg/bloomcompactor/spec.go +++ b/pkg/bloomcompactor/spec.go @@ -10,13 +10,13 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/stores" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/logproto" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/stores" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" ) // inclusive range diff --git a/pkg/bloomcompactor/spec_test.go b/pkg/bloomcompactor/spec_test.go index e9a403ac6929..b35d82b9d3f4 100644 --- a/pkg/bloomcompactor/spec_test.go +++ b/pkg/bloomcompactor/spec_test.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/chunkenc" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) func blocksFromSchema(t *testing.T, n int, options v1.BlockOptions) (res []*v1.Block, data []v1.SeriesWithBloom, refs []bloomshipper.BlockRef) { diff --git a/pkg/bloomcompactor/tracker.go b/pkg/bloomcompactor/tracker.go index 34f726f322a0..1c9bde0a4ae7 100644 --- a/pkg/bloomcompactor/tracker.go +++ b/pkg/bloomcompactor/tracker.go @@ -8,8 +8,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" ) type tableRangeProgress struct { diff --git a/pkg/bloomcompactor/tracker_test.go b/pkg/bloomcompactor/tracker_test.go index 494073e7cc52..e23eb55d6dc6 100644 --- a/pkg/bloomcompactor/tracker_test.go +++ b/pkg/bloomcompactor/tracker_test.go @@ -6,8 +6,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" ) func mkTblRange(tenant string, tbl config.DayTime, from, through model.Fingerprint) *tenantTableRange { diff --git a/pkg/bloomcompactor/tsdb.go b/pkg/bloomcompactor/tsdb.go index db2adf9fdc74..3ad359bc3122 100644 --- a/pkg/bloomcompactor/tsdb.go +++ b/pkg/bloomcompactor/tsdb.go @@ -14,14 +14,14 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/chunkenc" - baseStore "github.com/grafana/loki/pkg/storage" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/chunkenc" + baseStore "github.com/grafana/loki/v3/pkg/storage" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" ) const ( diff --git a/pkg/bloomcompactor/tsdb_test.go b/pkg/bloomcompactor/tsdb_test.go index 30fc668a5a92..a18e36ddb6d1 100644 --- a/pkg/bloomcompactor/tsdb_test.go +++ b/pkg/bloomcompactor/tsdb_test.go @@ -9,8 +9,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) type forSeriesTestImpl []*v1.Series diff --git a/pkg/bloomcompactor/versioned_range.go b/pkg/bloomcompactor/versioned_range.go index 0c399025f610..03da12f1d7da 100644 --- a/pkg/bloomcompactor/versioned_range.go +++ b/pkg/bloomcompactor/versioned_range.go @@ -5,8 +5,8 @@ import ( "github.com/prometheus/common/model" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) type tsdbToken struct { diff --git a/pkg/bloomcompactor/versioned_range_test.go b/pkg/bloomcompactor/versioned_range_test.go index 6c4329a0dba9..a85418bc6e1e 100644 --- a/pkg/bloomcompactor/versioned_range_test.go +++ b/pkg/bloomcompactor/versioned_range_test.go @@ -6,9 +6,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" ) func Test_TsdbTokenRange(t *testing.T) { diff --git a/pkg/bloomgateway/bloomgateway.go b/pkg/bloomgateway/bloomgateway.go index 482d6d8ef866..d2ac958f424a 100644 --- a/pkg/bloomgateway/bloomgateway.go +++ b/pkg/bloomgateway/bloomgateway.go @@ -56,12 +56,12 @@ import ( "github.com/prometheus/client_golang/prometheus" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/queue" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/queue" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) var errGatewayUnhealthy = errors.New("bloom-gateway is unhealthy in the ring") diff --git a/pkg/bloomgateway/bloomgateway_test.go b/pkg/bloomgateway/bloomgateway_test.go index 59f37974a4ce..edaa2ea7f0c8 100644 --- a/pkg/bloomgateway/bloomgateway_test.go +++ b/pkg/bloomgateway/bloomgateway_test.go @@ -20,17 +20,17 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/storage" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - bloomshipperconfig "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" - lokiring "github.com/grafana/loki/pkg/util/ring" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/storage" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + bloomshipperconfig "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/validation" ) func groupRefs(t *testing.T, chunkRefs []*logproto.ChunkRef) []*logproto.GroupedChunkRefs { diff --git a/pkg/bloomgateway/cache.go b/pkg/bloomgateway/cache.go index aec04333368d..60124f353e2a 100644 --- a/pkg/bloomgateway/cache.go +++ b/pkg/bloomgateway/cache.go @@ -11,9 +11,9 @@ import ( "golang.org/x/exp/slices" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" ) const ( diff --git a/pkg/bloomgateway/cache_test.go b/pkg/bloomgateway/cache_test.go index bf1a8dbaa365..3694a20ca09d 100644 --- a/pkg/bloomgateway/cache_test.go +++ b/pkg/bloomgateway/cache_test.go @@ -11,13 +11,13 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util/constants" ) // Range is 1000-4000 diff --git a/pkg/bloomgateway/client.go b/pkg/bloomgateway/client.go index f08397693f86..ff3ef1defb73 100644 --- a/pkg/bloomgateway/client.go +++ b/pkg/bloomgateway/client.go @@ -25,17 +25,17 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/bloomutils" - "github.com/grafana/loki/pkg/distributor/clientpool" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/queue" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/bloomutils" + "github.com/grafana/loki/v3/pkg/distributor/clientpool" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/queue" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/bloomgateway/client_test.go b/pkg/bloomgateway/client_test.go index e4b905c37b12..d1de9dbab84e 100644 --- a/pkg/bloomgateway/client_test.go +++ b/pkg/bloomgateway/client_test.go @@ -14,12 +14,12 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/bloomutils" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/bloomutils" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/validation" ) func rs(id int, tokens ...uint32) ring.ReplicationSet { diff --git a/pkg/bloomgateway/config.go b/pkg/bloomgateway/config.go index 356bc782fb83..9eaa6771e674 100644 --- a/pkg/bloomgateway/config.go +++ b/pkg/bloomgateway/config.go @@ -3,7 +3,7 @@ package bloomgateway import ( "flag" - "github.com/grafana/loki/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/util/ring" ) // Config configures the Bloom Gateway component. diff --git a/pkg/bloomgateway/multiplexing.go b/pkg/bloomgateway/multiplexing.go index 97e0b0aa6d66..fab8fd867765 100644 --- a/pkg/bloomgateway/multiplexing.go +++ b/pkg/bloomgateway/multiplexing.go @@ -9,11 +9,11 @@ import ( "github.com/oklog/ulid" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) const ( diff --git a/pkg/bloomgateway/multiplexing_test.go b/pkg/bloomgateway/multiplexing_test.go index af79f37b358b..27c0bbbe5ec6 100644 --- a/pkg/bloomgateway/multiplexing_test.go +++ b/pkg/bloomgateway/multiplexing_test.go @@ -9,10 +9,10 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) func TestTask(t *testing.T) { diff --git a/pkg/bloomgateway/processor.go b/pkg/bloomgateway/processor.go index 5d43e79eece3..401bd9210e0a 100644 --- a/pkg/bloomgateway/processor.go +++ b/pkg/bloomgateway/processor.go @@ -12,9 +12,9 @@ import ( "github.com/grafana/dskit/concurrency" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) func newProcessor(id string, concurrency int, store bloomshipper.Store, logger log.Logger, metrics *workerMetrics) *processor { diff --git a/pkg/bloomgateway/processor_test.go b/pkg/bloomgateway/processor_test.go index d0ecaf769944..69259a919394 100644 --- a/pkg/bloomgateway/processor_test.go +++ b/pkg/bloomgateway/processor_test.go @@ -14,11 +14,11 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/util/constants" ) var _ bloomshipper.Store = &dummyStore{} diff --git a/pkg/bloomgateway/querier.go b/pkg/bloomgateway/querier.go index 32f14b7e668c..a9d494beb0c7 100644 --- a/pkg/bloomgateway/querier.go +++ b/pkg/bloomgateway/querier.go @@ -9,10 +9,10 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/plan" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/plan" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/util/constants" ) type querierMetrics struct { diff --git a/pkg/bloomgateway/querier_test.go b/pkg/bloomgateway/querier_test.go index 0d7872927cc4..f952f3733233 100644 --- a/pkg/bloomgateway/querier_test.go +++ b/pkg/bloomgateway/querier_test.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" ) type noopClient struct { diff --git a/pkg/bloomgateway/util.go b/pkg/bloomgateway/util.go index e07c5740fdc6..bf5f5ee1501e 100644 --- a/pkg/bloomgateway/util.go +++ b/pkg/bloomgateway/util.go @@ -7,10 +7,10 @@ import ( "github.com/prometheus/common/model" "golang.org/x/exp/slices" - "github.com/grafana/loki/pkg/logproto" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/logproto" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) func getDayTime(ts model.Time) time.Time { diff --git a/pkg/bloomgateway/util_test.go b/pkg/bloomgateway/util_test.go index f624d337092b..ed293566886a 100644 --- a/pkg/bloomgateway/util_test.go +++ b/pkg/bloomgateway/util_test.go @@ -7,10 +7,10 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/logproto" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) func parseDayTime(s string) config.DayTime { diff --git a/pkg/bloomgateway/worker.go b/pkg/bloomgateway/worker.go index eadbd2fa33c9..fab243f29613 100644 --- a/pkg/bloomgateway/worker.go +++ b/pkg/bloomgateway/worker.go @@ -11,9 +11,9 @@ import ( "github.com/prometheus/common/model" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/queue" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/queue" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" ) const ( diff --git a/pkg/bloomutils/ring.go b/pkg/bloomutils/ring.go index 9858f63e6ba3..9743298e89b4 100644 --- a/pkg/bloomutils/ring.go +++ b/pkg/bloomutils/ring.go @@ -13,7 +13,7 @@ import ( "golang.org/x/exp/constraints" "golang.org/x/exp/slices" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) var ( diff --git a/pkg/bloomutils/ring_test.go b/pkg/bloomutils/ring_test.go index a6ef7374f527..8a373696c7c9 100644 --- a/pkg/bloomutils/ring_test.go +++ b/pkg/bloomutils/ring_test.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/dskit/ring" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) func uint64Range(min, max uint64) Range[uint64] { diff --git a/pkg/canary/comparator/comparator.go b/pkg/canary/comparator/comparator.go index e7234df191f9..8f57af09ba78 100644 --- a/pkg/canary/comparator/comparator.go +++ b/pkg/canary/comparator/comparator.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/canary/reader" + "github.com/grafana/loki/v3/pkg/canary/reader" ) const ( diff --git a/pkg/canary/reader/reader.go b/pkg/canary/reader/reader.go index 0725a658b468..4576ca7a70ed 100644 --- a/pkg/canary/reader/reader.go +++ b/pkg/canary/reader/reader.go @@ -23,10 +23,10 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/config" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/util/build" - "github.com/grafana/loki/pkg/util/unmarshal" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/unmarshal" ) var ( diff --git a/pkg/canary/writer/push.go b/pkg/canary/writer/push.go index 799f265451f9..15d0b1ba8d6f 100644 --- a/pkg/canary/writer/push.go +++ b/pkg/canary/writer/push.go @@ -19,8 +19,8 @@ import ( "github.com/prometheus/common/config" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util/build" ) const ( diff --git a/pkg/canary/writer/push_test.go b/pkg/canary/writer/push_test.go index 89204f2a00a8..b61272eb2ec3 100644 --- a/pkg/canary/writer/push_test.go +++ b/pkg/canary/writer/push_test.go @@ -17,8 +17,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/pkg/chunkenc/dumb_chunk.go b/pkg/chunkenc/dumb_chunk.go index 793e0b751829..e2d520df6e02 100644 --- a/pkg/chunkenc/dumb_chunk.go +++ b/pkg/chunkenc/dumb_chunk.go @@ -6,10 +6,10 @@ import ( "sort" "time" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/util/filter" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/util/filter" ) const ( diff --git a/pkg/chunkenc/facade.go b/pkg/chunkenc/facade.go index d66e994539f2..22a6e760d590 100644 --- a/pkg/chunkenc/facade.go +++ b/pkg/chunkenc/facade.go @@ -6,8 +6,8 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/filter" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/filter" ) // GzipLogChunk is a cortex encoding type for our chunks. diff --git a/pkg/chunkenc/hash_test.go b/pkg/chunkenc/hash_test.go index 0ca899a72cbe..e75251f57cb5 100644 --- a/pkg/chunkenc/hash_test.go +++ b/pkg/chunkenc/hash_test.go @@ -8,7 +8,7 @@ import ( "github.com/segmentio/fasthash/fnv1a" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc/testdata" + "github.com/grafana/loki/v3/pkg/chunkenc/testdata" ) var res uint64 diff --git a/pkg/chunkenc/interface.go b/pkg/chunkenc/interface.go index 0985f4a883c2..b96d9f705d09 100644 --- a/pkg/chunkenc/interface.go +++ b/pkg/chunkenc/interface.go @@ -8,10 +8,10 @@ import ( "strings" "time" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/util/filter" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/util/filter" ) // Errors returned by the chunk interface. diff --git a/pkg/chunkenc/memchunk.go b/pkg/chunkenc/memchunk.go index df59db7c755c..107e3c71a97d 100644 --- a/pkg/chunkenc/memchunk.go +++ b/pkg/chunkenc/memchunk.go @@ -17,13 +17,13 @@ import ( "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/filter" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/filter" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/chunkenc/memchunk_test.go b/pkg/chunkenc/memchunk_test.go index 071d7bab2153..8fc3eaab5ab3 100644 --- a/pkg/chunkenc/memchunk_test.go +++ b/pkg/chunkenc/memchunk_test.go @@ -18,15 +18,16 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc/testdata" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" "github.com/grafana/loki/pkg/push" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/filter" + + "github.com/grafana/loki/v3/pkg/chunkenc/testdata" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/filter" ) var testEncoding = []Encoding{ diff --git a/pkg/chunkenc/pool.go b/pkg/chunkenc/pool.go index 4b6cf7abb90b..486bef44b3da 100644 --- a/pkg/chunkenc/pool.go +++ b/pkg/chunkenc/pool.go @@ -14,7 +14,7 @@ import ( "github.com/pierrec/lz4/v4" "github.com/prometheus/prometheus/util/pool" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // WriterPool is a pool of io.Writer diff --git a/pkg/chunkenc/symbols.go b/pkg/chunkenc/symbols.go index cb1c5586775a..bed4035400c7 100644 --- a/pkg/chunkenc/symbols.go +++ b/pkg/chunkenc/symbols.go @@ -11,7 +11,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) // symbol holds reference to a label name and value pair diff --git a/pkg/chunkenc/unordered.go b/pkg/chunkenc/unordered.go index 883be05154f2..788f9c0a7c45 100644 --- a/pkg/chunkenc/unordered.go +++ b/pkg/chunkenc/unordered.go @@ -14,10 +14,10 @@ import ( "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) var noopStreamPipeline = log.NewNoopPipeline().ForStream(labels.Labels{}) diff --git a/pkg/chunkenc/unordered_test.go b/pkg/chunkenc/unordered_test.go index d92c2f1054bb..f4930952660f 100644 --- a/pkg/chunkenc/unordered_test.go +++ b/pkg/chunkenc/unordered_test.go @@ -12,10 +12,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) func iterEq(t *testing.T, exp []entry, got iter.EntryIterator) { diff --git a/pkg/chunkenc/util_test.go b/pkg/chunkenc/util_test.go index 3b5118495ddc..a1860f9ae297 100644 --- a/pkg/chunkenc/util_test.go +++ b/pkg/chunkenc/util_test.go @@ -4,8 +4,8 @@ import ( "math/rand" "time" - "github.com/grafana/loki/pkg/chunkenc/testdata" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/chunkenc/testdata" + "github.com/grafana/loki/v3/pkg/logproto" ) func logprotoEntry(ts int64, line string) *logproto.Entry { diff --git a/pkg/compactor/client/grpc.go b/pkg/compactor/client/grpc.go index 89fdbd7015ee..6a03b6b4a0c4 100644 --- a/pkg/compactor/client/grpc.go +++ b/pkg/compactor/client/grpc.go @@ -12,8 +12,8 @@ import ( "github.com/prometheus/common/model" "google.golang.org/grpc" - deletion_grpc "github.com/grafana/loki/pkg/compactor/client/grpc" - "github.com/grafana/loki/pkg/compactor/deletion" + deletion_grpc "github.com/grafana/loki/v3/pkg/compactor/client/grpc" + "github.com/grafana/loki/v3/pkg/compactor/deletion" ) type GRPCConfig struct { diff --git a/pkg/compactor/client/http.go b/pkg/compactor/client/http.go index ea3009405551..7e8120067ae8 100644 --- a/pkg/compactor/client/http.go +++ b/pkg/compactor/client/http.go @@ -13,8 +13,8 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/crypto/tls" - "github.com/grafana/loki/pkg/compactor/deletion" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/compactor/compactor.go b/pkg/compactor/compactor.go index 6521983729b9..f6fa95f10a4a 100644 --- a/pkg/compactor/compactor.go +++ b/pkg/compactor/compactor.go @@ -19,18 +19,18 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/compactor/deletion" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/util/filter" - util_log "github.com/grafana/loki/pkg/util/log" - lokiring "github.com/grafana/loki/pkg/util/ring" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/util/filter" + util_log "github.com/grafana/loki/v3/pkg/util/log" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/validation" ) // Here is how the generic compactor works: diff --git a/pkg/compactor/compactor_test.go b/pkg/compactor/compactor_test.go index cfcc55e456d0..3fccbb237b78 100644 --- a/pkg/compactor/compactor_test.go +++ b/pkg/compactor/compactor_test.go @@ -15,12 +15,12 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/constants" - loki_net "github.com/grafana/loki/pkg/util/net" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/constants" + loki_net "github.com/grafana/loki/v3/pkg/util/net" + "github.com/grafana/loki/v3/pkg/validation" ) const indexTablePrefix = "table_" diff --git a/pkg/compactor/deletion/delete_request.go b/pkg/compactor/deletion/delete_request.go index 5af9716a74ed..9ce7f381fb10 100644 --- a/pkg/compactor/deletion/delete_request.go +++ b/pkg/compactor/deletion/delete_request.go @@ -7,10 +7,10 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util/filter" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util/filter" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type timeInterval struct { diff --git a/pkg/compactor/deletion/delete_request_test.go b/pkg/compactor/deletion/delete_request_test.go index bd83f9591382..f67a06dc483f 100644 --- a/pkg/compactor/deletion/delete_request_test.go +++ b/pkg/compactor/deletion/delete_request_test.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util/filter" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util/filter" ) const ( diff --git a/pkg/compactor/deletion/delete_requests_client.go b/pkg/compactor/deletion/delete_requests_client.go index 62b6f509880e..8395b33cd9f3 100644 --- a/pkg/compactor/deletion/delete_requests_client.go +++ b/pkg/compactor/deletion/delete_requests_client.go @@ -7,7 +7,7 @@ import ( "github.com/go-kit/log/level" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/log" ) type CompactorClient interface { diff --git a/pkg/compactor/deletion/delete_requests_manager.go b/pkg/compactor/deletion/delete_requests_manager.go index c18d1b032ba7..ba99625b2dd9 100644 --- a/pkg/compactor/deletion/delete_requests_manager.go +++ b/pkg/compactor/deletion/delete_requests_manager.go @@ -12,10 +12,10 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/compactor/deletionmode" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/util/filter" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor/deletionmode" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/util/filter" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/compactor/deletion/delete_requests_manager_test.go b/pkg/compactor/deletion/delete_requests_manager_test.go index 44285bb890b4..04aa986ac492 100644 --- a/pkg/compactor/deletion/delete_requests_manager_test.go +++ b/pkg/compactor/deletion/delete_requests_manager_test.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/compactor/deletionmode" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util/filter" + "github.com/grafana/loki/v3/pkg/compactor/deletionmode" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util/filter" ) const testUserID = "test-user" diff --git a/pkg/compactor/deletion/delete_requests_store.go b/pkg/compactor/deletion/delete_requests_store.go index 20212467c15d..ee8f324d6b0b 100644 --- a/pkg/compactor/deletion/delete_requests_store.go +++ b/pkg/compactor/deletion/delete_requests_store.go @@ -17,8 +17,8 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" ) type ( diff --git a/pkg/compactor/deletion/delete_requests_store_test.go b/pkg/compactor/deletion/delete_requests_store_test.go index 0bf4cb27f7bd..fa02a44bc759 100644 --- a/pkg/compactor/deletion/delete_requests_store_test.go +++ b/pkg/compactor/deletion/delete_requests_store_test.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" ) func TestDeleteRequestsStore(t *testing.T) { diff --git a/pkg/compactor/deletion/delete_requests_table.go b/pkg/compactor/deletion/delete_requests_table.go index 3143a51cc544..80a47a5e6435 100644 --- a/pkg/compactor/deletion/delete_requests_table.go +++ b/pkg/compactor/deletion/delete_requests_table.go @@ -13,12 +13,12 @@ import ( "github.com/go-kit/log/level" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - shipper_util "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + shipper_util "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type deleteRequestsTable struct { diff --git a/pkg/compactor/deletion/delete_requests_table_test.go b/pkg/compactor/deletion/delete_requests_table_test.go index 4b30a9bc67b1..b5fcacaa5d38 100644 --- a/pkg/compactor/deletion/delete_requests_table_test.go +++ b/pkg/compactor/deletion/delete_requests_table_test.go @@ -8,11 +8,11 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/testutil" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" ) func TestDeleteRequestsTable(t *testing.T) { diff --git a/pkg/compactor/deletion/grpc_request_handler.go b/pkg/compactor/deletion/grpc_request_handler.go index 94ba7c163524..bf68c397043b 100644 --- a/pkg/compactor/deletion/grpc_request_handler.go +++ b/pkg/compactor/deletion/grpc_request_handler.go @@ -8,8 +8,8 @@ import ( "github.com/grafana/dskit/tenant" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/compactor/client/grpc" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor/client/grpc" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type GRPCRequestHandler struct { diff --git a/pkg/compactor/deletion/grpc_request_handler_test.go b/pkg/compactor/deletion/grpc_request_handler_test.go index c7171e6ac340..612777e9101c 100644 --- a/pkg/compactor/deletion/grpc_request_handler_test.go +++ b/pkg/compactor/deletion/grpc_request_handler_test.go @@ -17,8 +17,8 @@ import ( "google.golang.org/grpc/status" "google.golang.org/grpc/test/bufconn" - compactor_client_grpc "github.com/grafana/loki/pkg/compactor/client/grpc" - "github.com/grafana/loki/pkg/compactor/deletionmode" + compactor_client_grpc "github.com/grafana/loki/v3/pkg/compactor/client/grpc" + "github.com/grafana/loki/v3/pkg/compactor/deletionmode" ) func server(t *testing.T, h *GRPCRequestHandler) (compactor_client_grpc.CompactorClient, func()) { diff --git a/pkg/compactor/deletion/metrics.go b/pkg/compactor/deletion/metrics.go index b3196948830b..9d89f46c88d9 100644 --- a/pkg/compactor/deletion/metrics.go +++ b/pkg/compactor/deletion/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type DeleteRequestClientMetrics struct { diff --git a/pkg/compactor/deletion/request_handler.go b/pkg/compactor/deletion/request_handler.go index 458279d3b852..c4c0e1105341 100644 --- a/pkg/compactor/deletion/request_handler.go +++ b/pkg/compactor/deletion/request_handler.go @@ -15,9 +15,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // DeleteRequestHandler provides handlers for delete requests diff --git a/pkg/compactor/deletion/request_handler_test.go b/pkg/compactor/deletion/request_handler_test.go index 58e2ffd13c32..1df1446bd4e5 100644 --- a/pkg/compactor/deletion/request_handler_test.go +++ b/pkg/compactor/deletion/request_handler_test.go @@ -15,7 +15,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) func TestAddDeleteRequestHandler(t *testing.T) { diff --git a/pkg/compactor/deletion/tenant_delete_requests_client.go b/pkg/compactor/deletion/tenant_delete_requests_client.go index d3ba3a9905a3..495ece96e181 100644 --- a/pkg/compactor/deletion/tenant_delete_requests_client.go +++ b/pkg/compactor/deletion/tenant_delete_requests_client.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) const deletionNotAvailableMsg = "deletion is not available for this tenant" diff --git a/pkg/compactor/deletion/tenant_request_handler_test.go b/pkg/compactor/deletion/tenant_request_handler_test.go index c4a18543ccef..c57dc84ba4ca 100644 --- a/pkg/compactor/deletion/tenant_request_handler_test.go +++ b/pkg/compactor/deletion/tenant_request_handler_test.go @@ -9,7 +9,7 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) func TestDeleteRequestHandlerDeletionMiddleware(t *testing.T) { diff --git a/pkg/compactor/deletion/util.go b/pkg/compactor/deletion/util.go index 18d5822141f1..c20da8a4a260 100644 --- a/pkg/compactor/deletion/util.go +++ b/pkg/compactor/deletion/util.go @@ -3,8 +3,8 @@ package deletion import ( "errors" - "github.com/grafana/loki/pkg/compactor/deletionmode" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/compactor/deletionmode" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) var ( diff --git a/pkg/compactor/generationnumber/gennumber_loader.go b/pkg/compactor/generationnumber/gennumber_loader.go index ec8bb0bcab56..c2edb62dc166 100644 --- a/pkg/compactor/generationnumber/gennumber_loader.go +++ b/pkg/compactor/generationnumber/gennumber_loader.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/log" ) const reloadDuration = 5 * time.Minute diff --git a/pkg/compactor/generationnumber/metrics.go b/pkg/compactor/generationnumber/metrics.go index c71f1b582156..ccd06d74f8a7 100644 --- a/pkg/compactor/generationnumber/metrics.go +++ b/pkg/compactor/generationnumber/metrics.go @@ -3,7 +3,7 @@ package generationnumber import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) // Make this package level because we want several instances of a loader to be able to report metrics diff --git a/pkg/compactor/index_set.go b/pkg/compactor/index_set.go index 9b6267d60739..7102aef56425 100644 --- a/pkg/compactor/index_set.go +++ b/pkg/compactor/index_set.go @@ -12,12 +12,12 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type IndexSet interface { diff --git a/pkg/compactor/retention/expiration.go b/pkg/compactor/retention/expiration.go index 9111a6c7afee..45029f9652c5 100644 --- a/pkg/compactor/retention/expiration.go +++ b/pkg/compactor/retention/expiration.go @@ -8,9 +8,9 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/util/filter" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/util/filter" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) // IntervalFilter contains the interval to delete diff --git a/pkg/compactor/retention/expiration_test.go b/pkg/compactor/retention/expiration_test.go index ee61eb102b7b..3cc69f88ae61 100644 --- a/pkg/compactor/retention/expiration_test.go +++ b/pkg/compactor/retention/expiration_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) type retentionLimit struct { diff --git a/pkg/compactor/retention/marker.go b/pkg/compactor/retention/marker.go index 84e461cd7bc5..bad9b46d1c57 100644 --- a/pkg/compactor/retention/marker.go +++ b/pkg/compactor/retention/marker.go @@ -15,9 +15,9 @@ import ( "github.com/go-kit/log/level" "go.etcd.io/bbolt" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - shipper_util "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" - util_log "github.com/grafana/loki/pkg/util/log" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + shipper_util "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/compactor/retention/retention.go b/pkg/compactor/retention/retention.go index 703e7e0182e6..0a4aba59be47 100644 --- a/pkg/compactor/retention/retention.go +++ b/pkg/compactor/retention/retention.go @@ -15,13 +15,13 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/filter" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/filter" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var chunkBucket = []byte("chunks") diff --git a/pkg/compactor/retention/retention_test.go b/pkg/compactor/retention/retention_test.go index 36faaaf332dc..6c261d34799e 100644 --- a/pkg/compactor/retention/retention_test.go +++ b/pkg/compactor/retention/retention_test.go @@ -20,14 +20,14 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - ingesterclient "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/filter" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + ingesterclient "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/filter" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) type mockChunkClient struct { diff --git a/pkg/compactor/retention/util_test.go b/pkg/compactor/retention/util_test.go index bb2f0fe2e0a7..3597a11565ad 100644 --- a/pkg/compactor/retention/util_test.go +++ b/pkg/compactor/retention/util_test.go @@ -14,14 +14,14 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func dayFromTime(t model.Time) config.DayTime { diff --git a/pkg/compactor/table.go b/pkg/compactor/table.go index b7b94627c741..c371a5db88f5 100644 --- a/pkg/compactor/table.go +++ b/pkg/compactor/table.go @@ -12,11 +12,11 @@ import ( "github.com/grafana/dskit/concurrency" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/compactor/retention" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor/retention" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/compactor/table_test.go b/pkg/compactor/table_test.go index c08c0390de8e..462511eca478 100644 --- a/pkg/compactor/table_test.go +++ b/pkg/compactor/table_test.go @@ -12,10 +12,10 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" ) const ( diff --git a/pkg/compactor/testutil.go b/pkg/compactor/testutil.go index 094eea2903ad..4ebba27f64bf 100644 --- a/pkg/compactor/testutil.go +++ b/pkg/compactor/testutil.go @@ -17,12 +17,12 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/testutil" ) const ( diff --git a/pkg/configs/client/client.go b/pkg/configs/client/client.go index fb530ed020e7..5592fbe1b83d 100644 --- a/pkg/configs/client/client.go +++ b/pkg/configs/client/client.go @@ -19,8 +19,8 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/version" - "github.com/grafana/loki/pkg/configs/userconfig" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/configs/userconfig" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/configs/client/configs_test.go b/pkg/configs/client/configs_test.go index 96e1fa9f7d3c..311c33ca91ad 100644 --- a/pkg/configs/client/configs_test.go +++ b/pkg/configs/client/configs_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/configs/userconfig" + "github.com/grafana/loki/v3/pkg/configs/userconfig" ) var response = `{ diff --git a/pkg/configs/userconfig/config.go b/pkg/configs/userconfig/config.go index 2bb33c824f26..e7d22e033a8e 100644 --- a/pkg/configs/userconfig/config.go +++ b/pkg/configs/userconfig/config.go @@ -13,7 +13,7 @@ import ( "github.com/prometheus/prometheus/rules" "gopkg.in/yaml.v3" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // An ID is the ID of a single users's Cortex configuration. When a diff --git a/pkg/configs/userconfig/config_test.go b/pkg/configs/userconfig/config_test.go index 0b304f28288d..ac81d47e4ee9 100644 --- a/pkg/configs/userconfig/config_test.go +++ b/pkg/configs/userconfig/config_test.go @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var legacyRulesFile = `ALERT TestAlert diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index 9b34913d42a1..1a256baa6764 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -10,11 +10,13 @@ import ( "strconv" "strings" "time" + "unicode" "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gogo/status" "github.com/prometheus/prometheus/model/labels" + "go.opentelemetry.io/collector/pdata/plog" "google.golang.org/grpc/codes" "github.com/grafana/dskit/httpgrpc" @@ -32,22 +34,22 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/distributor/clientpool" - "github.com/grafana/loki/pkg/distributor/shardstreams" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - lokiring "github.com/grafana/loki/pkg/util/ring" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/distributor/clientpool" + "github.com/grafana/loki/v3/pkg/distributor/shardstreams" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/validation" ) const ( @@ -57,6 +59,13 @@ const ( labelServiceName = "service_name" serviceUnknown = "unknown_service" + labelLevel = "level" + logLevelDebug = "debug" + logLevelInfo = "info" + logLevelWarn = "warn" + logLevelError = "error" + logLevelFatal = "fatal" + logLevelCritical = "critical" ) var ( @@ -367,6 +376,7 @@ func (d *Distributor) Push(ctx context.Context, req *logproto.PushRequest) (*log n := 0 pushSize := 0 prevTs := stream.Entries[0].Timestamp + addLogLevel := validationContext.allowStructuredMetadata && validationContext.discoverLogLevels && !lbs.Has(labelLevel) for _, entry := range stream.Entries { if err := d.validator.ValidateEntry(ctx, validationContext, lbs, entry); err != nil { d.writeFailuresManager.Log(tenantID, err) @@ -374,6 +384,14 @@ func (d *Distributor) Push(ctx context.Context, req *logproto.PushRequest) (*log continue } + structuredMetadata := logproto.FromLabelAdaptersToLabels(entry.StructuredMetadata) + if addLogLevel && !structuredMetadata.Has(labelLevel) { + logLevel := detectLogLevelFromLogEntry(entry, structuredMetadata) + entry.StructuredMetadata = append(entry.StructuredMetadata, logproto.LabelAdapter{ + Name: labelLevel, + Value: logLevel, + }) + } stream.Entries[n] = entry // If configured for this tenant, increment duplicate timestamps. Note, this is imperfect @@ -838,3 +856,109 @@ func newRingAndLifecycler(cfg RingConfig, instanceCount *atomic.Uint32, logger l func (d *Distributor) HealthyInstancesCount() int { return int(d.healthyInstancesCount.Load()) } + +func detectLogLevelFromLogEntry(entry logproto.Entry, structuredMetadata labels.Labels) string { + // otlp logs have a severity number, using which we are defining the log levels. + // Significance of severity number is explained in otel docs here https://opentelemetry.io/docs/specs/otel/logs/data-model/#field-severitynumber + if otlpSeverityNumberTxt := structuredMetadata.Get(push.OTLPSeverityNumber); otlpSeverityNumberTxt != "" { + otlpSeverityNumber, err := strconv.Atoi(otlpSeverityNumberTxt) + if err != nil { + return logLevelInfo + } + if otlpSeverityNumber <= int(plog.SeverityNumberDebug4) { + return logLevelDebug + } else if otlpSeverityNumber <= int(plog.SeverityNumberInfo4) { + return logLevelInfo + } else if otlpSeverityNumber <= int(plog.SeverityNumberWarn4) { + return logLevelWarn + } else if otlpSeverityNumber <= int(plog.SeverityNumberError4) { + return logLevelError + } else if otlpSeverityNumber <= int(plog.SeverityNumberFatal4) { + return logLevelFatal + } + return logLevelInfo + } + + return extractLogLevelFromLogLine(entry.Line) +} + +func extractLogLevelFromLogLine(log string) string { + // check for log levels in known log formats to avoid any false detection + + // json logs: + var firstNonSpaceChar rune + for _, char := range log { + if !unicode.IsSpace(char) { + firstNonSpaceChar = char + break + } + } + + var lastNonSpaceChar rune + for i := len(log) - 1; i >= 0; i-- { + char := rune(log[i]) + if !unicode.IsSpace(char) { + lastNonSpaceChar = char + break + } + } + + if firstNonSpaceChar == '{' && lastNonSpaceChar == '}' { + if strings.Contains(log, `:"err"`) || strings.Contains(log, `:"ERR"`) || + strings.Contains(log, `:"error"`) || strings.Contains(log, `:"ERROR"`) { + return logLevelError + } + if strings.Contains(log, `:"warn"`) || strings.Contains(log, `:"WARN"`) || + strings.Contains(log, `:"warning"`) || strings.Contains(log, `:"WARNING"`) { + return logLevelWarn + } + if strings.Contains(log, `:"critical"`) || strings.Contains(log, `:"CRITICAL"`) { + return logLevelCritical + } + if strings.Contains(log, `:"debug"`) || strings.Contains(log, `:"DEBUG"`) { + return logLevelDebug + } + if strings.Contains(log, `:"info"`) || strings.Contains(log, `:"INFO"`) { + return logLevelDebug + } + } + + // logfmt logs: + if strings.Contains(log, "=") { + if strings.Contains(log, "=err") || strings.Contains(log, "=ERR") || + strings.Contains(log, "=error") || strings.Contains(log, "=ERROR") { + return logLevelError + } + if strings.Contains(log, "=warn") || strings.Contains(log, "=WARN") || + strings.Contains(log, "=warning") || strings.Contains(log, "=WARNING") { + return logLevelWarn + } + if strings.Contains(log, "=critical") || strings.Contains(log, "=CRITICAL") { + return logLevelCritical + } + if strings.Contains(log, "=debug") || strings.Contains(log, "=DEBUG") { + return logLevelDebug + } + if strings.Contains(log, "=info") || strings.Contains(log, "=INFO") { + return logLevelDebug + } + } + + if strings.Contains(log, "err:") || strings.Contains(log, "ERR:") || + strings.Contains(log, "error") || strings.Contains(log, "ERROR") { + return logLevelError + } + if strings.Contains(log, "warn:") || strings.Contains(log, "WARN:") || + strings.Contains(log, "warning") || strings.Contains(log, "WARNING") { + return logLevelWarn + } + if strings.Contains(log, "CRITICAL:") || strings.Contains(log, "critical:") { + return logLevelCritical + } + if strings.Contains(log, "debug:") || strings.Contains(log, "DEBUG:") { + return logLevelDebug + } + + // Default to info if no specific level is found + return logLevelInfo +} diff --git a/pkg/distributor/distributor_ring.go b/pkg/distributor/distributor_ring.go index 0c7451ebdea2..0beffd91791a 100644 --- a/pkg/distributor/distributor_ring.go +++ b/pkg/distributor/distributor_ring.go @@ -14,7 +14,7 @@ import ( "github.com/grafana/dskit/netutil" "github.com/grafana/dskit/ring" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // RingConfig masks the ring lifecycler config which contains diff --git a/pkg/distributor/distributor_test.go b/pkg/distributor/distributor_test.go index 81a7fb09b94a..7a3fe93fa880 100644 --- a/pkg/distributor/distributor_test.go +++ b/pkg/distributor/distributor_test.go @@ -26,21 +26,25 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/pdata/plog" "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/ingester" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/util/constants" - fe "github.com/grafana/loki/pkg/util/flagext" - loki_flagext "github.com/grafana/loki/pkg/util/flagext" - util_log "github.com/grafana/loki/pkg/util/log" - loki_net "github.com/grafana/loki/pkg/util/net" - "github.com/grafana/loki/pkg/util/test" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/pkg/push" + + "github.com/grafana/loki/v3/pkg/ingester" + "github.com/grafana/loki/v3/pkg/ingester/client" + loghttp_push "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/util/constants" + fe "github.com/grafana/loki/v3/pkg/util/flagext" + loki_flagext "github.com/grafana/loki/v3/pkg/util/flagext" + util_log "github.com/grafana/loki/v3/pkg/util/log" + loki_net "github.com/grafana/loki/v3/pkg/util/net" + "github.com/grafana/loki/v3/pkg/util/test" + "github.com/grafana/loki/v3/pkg/validation" ) var ( @@ -532,18 +536,33 @@ func TestDistributorPushErrors(t *testing.T) { } func Test_SortLabelsOnPush(t *testing.T) { - limits := &validation.Limits{} - flagext.DefaultValues(limits) - limits.DiscoverServiceName = nil - ingester := &mockIngester{} - distributors, _ := prepare(t, 1, 5, limits, func(addr string) (ring_client.PoolClient, error) { return ingester, nil }) + t.Run("with service_name already present in labels", func(t *testing.T) { + limits := &validation.Limits{} + flagext.DefaultValues(limits) + ingester := &mockIngester{} + distributors, _ := prepare(t, 1, 5, limits, func(addr string) (ring_client.PoolClient, error) { return ingester, nil }) - request := makeWriteRequest(10, 10) - request.Streams[0].Labels = `{buzz="f", a="b"}` - _, err := distributors[0].Push(ctx, request) - require.NoError(t, err) - topVal := ingester.Peek() - require.Equal(t, `{a="b", buzz="f"}`, topVal.Streams[0].Labels) + request := makeWriteRequest(10, 10) + request.Streams[0].Labels = `{buzz="f", service_name="foo", a="b"}` + _, err := distributors[0].Push(ctx, request) + require.NoError(t, err) + topVal := ingester.Peek() + require.Equal(t, `{a="b", buzz="f", service_name="foo"}`, topVal.Streams[0].Labels) + }) + + t.Run("with service_name added during ingestion", func(t *testing.T) { + limits := &validation.Limits{} + flagext.DefaultValues(limits) + ingester := &mockIngester{} + distributors, _ := prepare(t, 1, 5, limits, func(addr string) (ring_client.PoolClient, error) { return ingester, nil }) + + request := makeWriteRequest(10, 10) + request.Streams[0].Labels = `{buzz="f", x="y", a="b"}` + _, err := distributors[0].Push(ctx, request) + require.NoError(t, err) + topVal := ingester.Peek() + require.Equal(t, `{a="b", buzz="f", service_name="unknown_service", x="y"}`, topVal.Streams[0].Labels) + }) } func Test_TruncateLogLines(t *testing.T) { @@ -1491,3 +1510,165 @@ func TestDistributorTee(t *testing.T) { require.Equal(t, "test", tee.tenant) } } + +func Test_DetectLogLevels(t *testing.T) { + setup := func(discoverLogLevels bool) (*validation.Limits, *mockIngester) { + limits := &validation.Limits{} + flagext.DefaultValues(limits) + + limits.DiscoverLogLevels = discoverLogLevels + limits.DiscoverServiceName = nil + limits.AllowStructuredMetadata = true + return limits, &mockIngester{} + } + + t.Run("log level detection disabled", func(t *testing.T) { + limits, ingester := setup(false) + distributors, _ := prepare(t, 1, 5, limits, func(addr string) (ring_client.PoolClient, error) { return ingester, nil }) + + writeReq := makeWriteRequestWithLabels(1, 10, []string{`{foo="bar"}`}) + _, err := distributors[0].Push(ctx, writeReq) + require.NoError(t, err) + topVal := ingester.Peek() + require.Equal(t, `{foo="bar"}`, topVal.Streams[0].Labels) + require.Len(t, topVal.Streams[0].Entries[0].StructuredMetadata, 0) + }) + + t.Run("log level detection enabled", func(t *testing.T) { + limits, ingester := setup(true) + distributors, _ := prepare(t, 1, 5, limits, func(addr string) (ring_client.PoolClient, error) { return ingester, nil }) + + writeReq := makeWriteRequestWithLabels(1, 10, []string{`{foo="bar"}`}) + _, err := distributors[0].Push(ctx, writeReq) + require.NoError(t, err) + topVal := ingester.Peek() + require.Equal(t, `{foo="bar"}`, topVal.Streams[0].Labels) + require.Equal(t, push.LabelsAdapter{ + { + Name: labelLevel, + Value: logLevelInfo, + }, + }, topVal.Streams[0].Entries[0].StructuredMetadata) + }) + + t.Run("log level detection enabled but log level already present in stream", func(t *testing.T) { + limits, ingester := setup(true) + distributors, _ := prepare(t, 1, 5, limits, func(addr string) (ring_client.PoolClient, error) { return ingester, nil }) + + writeReq := makeWriteRequestWithLabels(1, 10, []string{`{foo="bar", level="debug"}`}) + _, err := distributors[0].Push(ctx, writeReq) + require.NoError(t, err) + topVal := ingester.Peek() + require.Equal(t, `{foo="bar", level="debug"}`, topVal.Streams[0].Labels) + require.Len(t, topVal.Streams[0].Entries[0].StructuredMetadata, 0) + }) + + t.Run("log level detection enabled but log level already present as structured metadata", func(t *testing.T) { + limits, ingester := setup(true) + distributors, _ := prepare(t, 1, 5, limits, func(addr string) (ring_client.PoolClient, error) { return ingester, nil }) + + writeReq := makeWriteRequestWithLabels(1, 10, []string{`{foo="bar"}`}) + writeReq.Streams[0].Entries[0].StructuredMetadata = push.LabelsAdapter{ + { + Name: labelLevel, + Value: logLevelWarn, + }, + } + _, err := distributors[0].Push(ctx, writeReq) + require.NoError(t, err) + topVal := ingester.Peek() + require.Equal(t, `{foo="bar"}`, topVal.Streams[0].Labels) + require.Equal(t, push.LabelsAdapter{ + { + Name: labelLevel, + Value: logLevelWarn, + }, + }, topVal.Streams[0].Entries[0].StructuredMetadata) + }) +} + +func Test_detectLogLevelFromLogEntry(t *testing.T) { + for _, tc := range []struct { + name string + entry logproto.Entry + expectedLogLevel string + }{ + { + name: "use severity number from otlp logs", + entry: logproto.Entry{ + Line: "error", + StructuredMetadata: push.LabelsAdapter{ + { + Name: loghttp_push.OTLPSeverityNumber, + Value: fmt.Sprintf("%d", plog.SeverityNumberDebug3), + }, + }, + }, + expectedLogLevel: logLevelDebug, + }, + { + name: "invalid severity number should not cause any issues", + entry: logproto.Entry{ + StructuredMetadata: push.LabelsAdapter{ + { + Name: loghttp_push.OTLPSeverityNumber, + Value: "foo", + }, + }, + }, + expectedLogLevel: logLevelInfo, + }, + { + name: "non otlp without any of the log level keywords in log line", + entry: logproto.Entry{ + Line: "foo", + }, + expectedLogLevel: logLevelInfo, + }, + { + name: "non otlp with log level keywords in log line", + entry: logproto.Entry{ + Line: "this is a warning log", + }, + expectedLogLevel: logLevelWarn, + }, + { + name: "json log line with an error", + entry: logproto.Entry{ + Line: `{"foo":"bar",msg:"message with keyword error but it should not get picked up",level":"critical"}`, + }, + expectedLogLevel: logLevelCritical, + }, + { + name: "logfmt log line with a warn", + entry: logproto.Entry{ + Line: `foo=bar msg="message with keyword error but it should not get picked up" level=warn`, + }, + expectedLogLevel: logLevelWarn, + }, + } { + t.Run(tc.name, func(t *testing.T) { + detectedLogLevel := detectLogLevelFromLogEntry(tc.entry, logproto.FromLabelAdaptersToLabels(tc.entry.StructuredMetadata)) + require.Equal(t, tc.expectedLogLevel, detectedLogLevel) + }) + } +} + +func Benchmark_extractLogLevelFromLogLine(b *testing.B) { + // looks scary, but it is some random text of about 1000 chars from charset a-zA-Z0-9 + logLine := "dGzJ6rKk Zj U04SWEqEK4Uwho8 DpNyLz0 Nfs61HJ fz5iKVigg 44 kabOz7ghviGmVONriAdz4lA 7Kis1OTvZGT3 " + + "ZB6ioK4fgJLbzm AuIcbnDZKx3rZ aeZJQzRb3zhrn vok8Efav6cbyzbRUQ PYsEdQxCpdCDcGNsKG FVwe61 nhF06t9hXSNySEWa " + + "gBAXP1J8oEL grep1LfeKjA23ntszKA A772vNyxjQF SjWfJypwI7scxk oLlqRzrDl ostO4CCwx01wDB7Utk0 64A7p5eQDITE6zc3 " + + "rGL DrPnD K2oj Vro2JEvI2YScstnMx SVu H o GUl8fxZJJ1HY0 C QOA HNJr5XtsCNRrLi 0w C0Pd8XWbVZyQkSlsRm zFw1lW " + + "c8j6JFQuQnnB EyL20z0 2Duo0dvynnAGD 45ut2Z Jrz8Nd7Pmg 5oQ09r9vnmy U2 mKHO5uBfndPnbjbr mzOvQs9bM1 9e " + + "yvNSfcbPyhuWvB VKJt2kp8IoTVc XCe Uva5mp9NrGh3TEbjQu1 C Zvdk uPr7St2m kwwMRcS9eC aS6ZuL48eoQUiKo VBPd4m49ymr " + + "eQZ0fbjWpj6qA A6rYs4E 58dqh9ntu8baziDJ4c 1q6aVEig YrMXTF hahrlt 6hKVHfZLFZ V 9hEVN0WKgcpu6L zLxo6YC57 XQyfAGpFM " + + "Wm3 S7if5qCXPzvuMZ2 gNHdst Z39s9uNc58QBDeYRW umyIF BDqEdqhE tAs2gidkqee3aux8b NLDb7 ZZLekc0cQZ GUKQuBg2pL2y1S " + + "RJtBuW ABOqQHLSlNuUw ZlM2nGS2 jwA7cXEOJhY 3oPv4gGAz Uqdre16MF92C06jOH dayqTCK8XmIilT uvgywFSfNadYvRDQa " + + "iUbswJNcwqcr6huw LAGrZS8NGlqqzcD2wFU rm Uqcrh3TKLUCkfkwLm 5CIQbxMCUz boBrEHxvCBrUo YJoF2iyif4xq3q yk " + + for i := 0; i < b.N; i++ { + level := extractLogLevelFromLogLine(logLine) + require.Equal(b, logLevelInfo, level) + } +} diff --git a/pkg/distributor/http.go b/pkg/distributor/http.go index 54c958866236..00c3ba53a280 100644 --- a/pkg/distributor/http.go +++ b/pkg/distributor/http.go @@ -8,13 +8,13 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/httpgrpc" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/loghttp/push" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/loghttp/push" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) // PushHandler reads a snappy-compressed proto from the HTTP body. diff --git a/pkg/distributor/http_test.go b/pkg/distributor/http_test.go index 23b2993c5b21..0ecf70fa9a49 100644 --- a/pkg/distributor/http_test.go +++ b/pkg/distributor/http_test.go @@ -9,13 +9,13 @@ import ( "github.com/grafana/dskit/user" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/grafana/dskit/flagext" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) func TestDistributorRingHandler(t *testing.T) { diff --git a/pkg/distributor/ingestion_rate_strategy_test.go b/pkg/distributor/ingestion_rate_strategy_test.go index e87c5ce69f8e..657d34290984 100644 --- a/pkg/distributor/ingestion_rate_strategy_test.go +++ b/pkg/distributor/ingestion_rate_strategy_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) const ( diff --git a/pkg/distributor/instance_count_test.go b/pkg/distributor/instance_count_test.go index 92abf94c4506..7f861a262284 100644 --- a/pkg/distributor/instance_count_test.go +++ b/pkg/distributor/instance_count_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func TestInstanceCountDelegateCounting(t *testing.T) { diff --git a/pkg/distributor/limits.go b/pkg/distributor/limits.go index d2f655f1c832..05734db4184f 100644 --- a/pkg/distributor/limits.go +++ b/pkg/distributor/limits.go @@ -3,9 +3,9 @@ package distributor import ( "time" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/distributor/shardstreams" - "github.com/grafana/loki/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/distributor/shardstreams" + "github.com/grafana/loki/v3/pkg/loghttp/push" ) // Limits is an interface for distributor limits/related configs @@ -23,6 +23,7 @@ type Limits interface { IncrementDuplicateTimestamps(userID string) bool DiscoverServiceName(userID string) []string + DiscoverLogLevels(userID string) bool ShardStreams(userID string) *shardstreams.Config IngestionRateStrategy() string diff --git a/pkg/distributor/ratestore.go b/pkg/distributor/ratestore.go index 2eb9e9f06232..0fe5c3aca0bc 100644 --- a/pkg/distributor/ratestore.go +++ b/pkg/distributor/ratestore.go @@ -15,9 +15,9 @@ import ( "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type poolClientFactory interface { diff --git a/pkg/distributor/ratestore_metrics.go b/pkg/distributor/ratestore_metrics.go index 2e31e3934f0b..fce24ee6617b 100644 --- a/pkg/distributor/ratestore_metrics.go +++ b/pkg/distributor/ratestore_metrics.go @@ -5,7 +5,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type ratestoreMetrics struct { diff --git a/pkg/distributor/ratestore_test.go b/pkg/distributor/ratestore_test.go index ab01fbc21593..af9fa9f0adb7 100644 --- a/pkg/distributor/ratestore_test.go +++ b/pkg/distributor/ratestore_test.go @@ -7,16 +7,16 @@ import ( "testing" "time" - "github.com/grafana/loki/pkg/distributor/shardstreams" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/distributor/shardstreams" + "github.com/grafana/loki/v3/pkg/validation" "github.com/stretchr/testify/require" - client2 "github.com/grafana/loki/pkg/ingester/client" + client2 "github.com/grafana/loki/v3/pkg/ingester/client" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/ring/client" diff --git a/pkg/distributor/shardstreams/config.go b/pkg/distributor/shardstreams/config.go index 6a9247245154..90f1e65600a9 100644 --- a/pkg/distributor/shardstreams/config.go +++ b/pkg/distributor/shardstreams/config.go @@ -3,7 +3,7 @@ package shardstreams import ( "flag" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/util/flagext" ) type Config struct { diff --git a/pkg/distributor/streamsharder_test.go b/pkg/distributor/streamsharder_test.go index 1bd03d9fdd82..eff8b476c086 100644 --- a/pkg/distributor/streamsharder_test.go +++ b/pkg/distributor/streamsharder_test.go @@ -3,7 +3,7 @@ package distributor import ( "fmt" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) type StreamSharderMock struct { diff --git a/pkg/distributor/validator.go b/pkg/distributor/validator.go index ca2186c1d262..2ef4c78cff94 100644 --- a/pkg/distributor/validator.go +++ b/pkg/distributor/validator.go @@ -9,9 +9,9 @@ import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/validation" ) const ( @@ -44,6 +44,7 @@ type validationContext struct { incrementDuplicateTimestamps bool discoverServiceName []string + discoverLogLevels bool allowStructuredMetadata bool maxStructuredMetadataSize int @@ -65,6 +66,7 @@ func (v Validator) getValidationContextForTime(now time.Time, userID string) val maxLabelValueLength: v.MaxLabelValueLength(userID), incrementDuplicateTimestamps: v.IncrementDuplicateTimestamps(userID), discoverServiceName: v.DiscoverServiceName(userID), + discoverLogLevels: v.DiscoverLogLevels(userID), allowStructuredMetadata: v.AllowStructuredMetadata(userID), maxStructuredMetadataSize: v.MaxStructuredMetadataSize(userID), maxStructuredMetadataCount: v.MaxStructuredMetadataCount(userID), diff --git a/pkg/distributor/validator_test.go b/pkg/distributor/validator_test.go index 0bfdd7d4d056..9e51099dfad3 100644 --- a/pkg/distributor/validator_test.go +++ b/pkg/distributor/validator_test.go @@ -11,10 +11,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" "github.com/grafana/loki/pkg/push" - "github.com/grafana/loki/pkg/validation" + + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/pkg/distributor/writefailures/cfg.go b/pkg/distributor/writefailures/cfg.go index 393000f2573a..727c4a1dda0e 100644 --- a/pkg/distributor/writefailures/cfg.go +++ b/pkg/distributor/writefailures/cfg.go @@ -3,7 +3,7 @@ package writefailures import ( "flag" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/util/flagext" ) type Cfg struct { diff --git a/pkg/distributor/writefailures/manager.go b/pkg/distributor/writefailures/manager.go index 2804c47e9522..f02ab2e57d76 100644 --- a/pkg/distributor/writefailures/manager.go +++ b/pkg/distributor/writefailures/manager.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/dskit/limiter" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/runtime" + "github.com/grafana/loki/v3/pkg/runtime" ) type Manager struct { diff --git a/pkg/distributor/writefailures/manager_test.go b/pkg/distributor/writefailures/manager_test.go index 6f5f1eee3841..fb3d7577953a 100644 --- a/pkg/distributor/writefailures/manager_test.go +++ b/pkg/distributor/writefailures/manager_test.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/util/flagext" ) func TestWriteFailuresLogging(t *testing.T) { diff --git a/pkg/distributor/writefailures/metrics.go b/pkg/distributor/writefailures/metrics.go index e62d6f19b4f7..1d4c1a2fe85c 100644 --- a/pkg/distributor/writefailures/metrics.go +++ b/pkg/distributor/writefailures/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type metrics struct { diff --git a/pkg/ingester/checkpoint.go b/pkg/ingester/checkpoint.go index e2c8ef2c1868..9de54888f474 100644 --- a/pkg/ingester/checkpoint.go +++ b/pkg/ingester/checkpoint.go @@ -20,11 +20,11 @@ import ( "github.com/prometheus/prometheus/tsdb/wlog" prompool "github.com/prometheus/prometheus/util/pool" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/logproto" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/pool" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/logproto" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/pool" ) var ( diff --git a/pkg/ingester/checkpoint.pb.go b/pkg/ingester/checkpoint.pb.go index 4f66c217b5ef..b4dbe51913ac 100644 --- a/pkg/ingester/checkpoint.pb.go +++ b/pkg/ingester/checkpoint.pb.go @@ -10,8 +10,8 @@ import ( proto "github.com/gogo/protobuf/proto" _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - _ "github.com/grafana/loki/pkg/logproto" - github_com_grafana_loki_pkg_logproto "github.com/grafana/loki/pkg/logproto" + _ "github.com/grafana/loki/v3/pkg/logproto" + github_com_grafana_loki_v3_pkg_logproto "github.com/grafana/loki/v3/pkg/logproto" io "io" math "math" math_bits "math/bits" @@ -139,9 +139,9 @@ func (m *Chunk) GetHead() []byte { type Series struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` // post mapped fingerprint is necessary because subsequent wal writes will reference it. - Fingerprint uint64 `protobuf:"varint,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` - Labels []github_com_grafana_loki_pkg_logproto.LabelAdapter `protobuf:"bytes,3,rep,name=labels,proto3,customtype=github.com/grafana/loki/pkg/logproto.LabelAdapter" json:"labels"` - Chunks []Chunk `protobuf:"bytes,4,rep,name=chunks,proto3" json:"chunks"` + Fingerprint uint64 `protobuf:"varint,2,opt,name=fingerprint,proto3" json:"fingerprint,omitempty"` + Labels []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,3,rep,name=labels,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"labels"` + Chunks []Chunk `protobuf:"bytes,4,rep,name=chunks,proto3" json:"chunks"` // most recently pushed timestamp. To time.Time `protobuf:"bytes,5,opt,name=to,proto3,stdtime" json:"to"` // most recently pushed line. @@ -242,40 +242,40 @@ func init() { func init() { proto.RegisterFile("pkg/ingester/checkpoint.proto", fileDescriptor_00f4b7152db9bdb5) } var fileDescriptor_00f4b7152db9bdb5 = []byte{ - // 517 bytes of a gzipped FileDescriptorProto + // 521 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x31, 0x8f, 0xd3, 0x30, - 0x14, 0x8e, 0xdb, 0x5c, 0xae, 0x75, 0x61, 0xb1, 0x4e, 0xc8, 0x14, 0xe1, 0x56, 0x37, 0x75, 0x4a, - 0x44, 0x61, 0x80, 0x05, 0xe9, 0x7a, 0x08, 0x09, 0xa9, 0x03, 0x0a, 0xc7, 0xc2, 0x82, 0xdc, 0xc4, - 0x75, 0xa2, 0xa6, 0x71, 0x64, 0xbb, 0x43, 0x37, 0x7e, 0xc2, 0x0d, 0xfc, 0x08, 0x7e, 0xca, 0x8d, - 0x1d, 0x4f, 0x20, 0x1d, 0x34, 0x5d, 0x18, 0xef, 0x27, 0x20, 0x3b, 0x49, 0x29, 0x1b, 0xdd, 0xde, - 0xf7, 0x9e, 0xbf, 0xf7, 0xc9, 0xdf, 0xfb, 0xe0, 0xd3, 0x62, 0xc1, 0x83, 0x34, 0xe7, 0x4c, 0x69, - 0x26, 0x83, 0x28, 0x61, 0xd1, 0xa2, 0x10, 0x69, 0xae, 0xfd, 0x42, 0x0a, 0x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, 0x65, 0xca, 0xac, 0x5a, 0x29, 0x26, 0xdf, 0xbd, 0xb1, 0x06, 0x77, 0xc3, - 0x1a, 0xa1, 0x21, 0xec, 0xcd, 0xcd, 0x85, 0x65, 0x21, 0xd3, 0x5c, 0x5b, 0x17, 0xdd, 0xf0, 0xb0, - 0x85, 0x32, 0xe8, 0x65, 0x74, 0xc6, 0x32, 0x85, 0xdb, 0xc3, 0xf6, 0xa8, 0x37, 0x7e, 0xec, 0xef, - 0x6f, 0x38, 0x65, 0x9c, 0x46, 0xeb, 0xa9, 0x99, 0xbe, 0xa7, 0xa9, 0x9c, 0xbc, 0x32, 0xdf, 0xfb, - 0x7e, 0x37, 0x78, 0xc6, 0x53, 0x9d, 0xac, 0x66, 0x7e, 0x24, 0x96, 0x01, 0x97, 0x74, 0x4e, 0x73, - 0x1a, 0x98, 0x2c, 0x05, 0x87, 0x51, 0xf0, 0x2d, 0xef, 0x22, 0xa6, 0x85, 0x66, 0x32, 0xac, 0x35, - 0xd0, 0x18, 0x7a, 0x91, 0xc9, 0x83, 0xc2, 0xae, 0x55, 0x3b, 0xf3, 0xff, 0x09, 0xa1, 0x6f, 0xc3, - 0x32, 0x71, 0x8d, 0x50, 0x58, 0xbf, 0xac, 0x03, 0x70, 0x72, 0x64, 0x00, 0xfa, 0xb0, 0x63, 0x6e, - 0x30, 0x4d, 0x73, 0x66, 0xed, 0xed, 0x86, 0x7b, 0x8c, 0x30, 0x3c, 0x65, 0xb9, 0x96, 0xeb, 0x4b, - 0x6d, 0x3d, 0x6e, 0x87, 0x0d, 0x34, 0xb1, 0x49, 0x52, 0x9e, 0x30, 0xa5, 0xaf, 0x94, 0xf5, 0xfa, - 0xbf, 0x63, 0xb3, 0xa7, 0x4d, 0x5e, 0x6f, 0xb6, 0xc4, 0xb9, 0xdd, 0x12, 0xe7, 0x7e, 0x4b, 0xc0, - 0x97, 0x92, 0x80, 0x6f, 0x25, 0x01, 0x37, 0x25, 0x01, 0x9b, 0x92, 0x80, 0x5f, 0x25, 0x01, 0xbf, - 0x4b, 0xe2, 0xdc, 0x97, 0x04, 0x5c, 0xef, 0x88, 0xb3, 0xd9, 0x11, 0xe7, 0x76, 0x47, 0x9c, 0x4f, - 0x9d, 0xc6, 0x83, 0x99, 0x67, 0x85, 0x9e, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0xda, 0xcc, 0xb5, - 0xf6, 0xbf, 0x03, 0x00, 0x00, + 0x14, 0x8e, 0xdb, 0x5c, 0xae, 0xe7, 0xc2, 0x62, 0x9d, 0x90, 0x29, 0xc2, 0xad, 0x6e, 0xea, 0x94, + 0x48, 0xbd, 0x1b, 0x18, 0x10, 0xd2, 0xf5, 0x10, 0x12, 0x52, 0x07, 0x14, 0x8e, 0x85, 0x05, 0xb9, + 0x89, 0xeb, 0x44, 0x4d, 0xe3, 0xc8, 0x76, 0x91, 0xba, 0xf1, 0x13, 0x6e, 0xe3, 0x2f, 0xf0, 0x53, + 0x6e, 0xec, 0x78, 0x02, 0xe9, 0xa0, 0xe9, 0xc2, 0x78, 0x3f, 0x01, 0xd9, 0x49, 0x4a, 0xd9, 0xe8, + 0xf6, 0xbe, 0xf7, 0xfc, 0xbd, 0x4f, 0xfe, 0xde, 0x07, 0x9f, 0x17, 0x73, 0x1e, 0xa4, 0x39, 0x67, + 0x4a, 0x33, 0x19, 0x44, 0x09, 0x8b, 0xe6, 0x85, 0x48, 0x73, 0xed, 0x17, 0x52, 0x68, 0x81, 0x1e, + 0x67, 0x62, 0x9e, 0x7e, 0x6a, 0xe6, 0xbd, 0x53, 0x2e, 0xb8, 0xb0, 0x93, 0xc0, 0x54, 0xd5, 0xa3, + 0x5e, 0x9f, 0x0b, 0xc1, 0x33, 0x16, 0x58, 0x34, 0x5d, 0xce, 0x02, 0x9d, 0x2e, 0x98, 0xd2, 0x74, + 0x51, 0xd4, 0x0f, 0x9e, 0x19, 0x91, 0x4c, 0xf0, 0x8a, 0xd9, 0x14, 0xd5, 0xf0, 0xec, 0x47, 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5a, 0x4d, 0xcc, 0xf4, 0x1d, 0x4d, 0xe5, 0xf8, 0xa5, 0xf9, + 0xde, 0xf7, 0xfb, 0xfe, 0x05, 0x4f, 0x75, 0xb2, 0x9c, 0xfa, 0x91, 0x58, 0x04, 0x5c, 0xd2, 0x19, + 0xcd, 0x69, 0x60, 0xb2, 0x14, 0x7c, 0x3e, 0x0f, 0xf6, 0xd3, 0xe0, 0x5b, 0xea, 0x65, 0x4c, 0x0b, + 0xcd, 0x64, 0x58, 0xcb, 0xa0, 0x11, 0xf4, 0x22, 0x13, 0x09, 0x85, 0x5d, 0x2b, 0x78, 0xea, 0xff, + 0x93, 0x43, 0xdf, 0xe6, 0x65, 0xec, 0x1a, 0xad, 0xb0, 0x7e, 0x59, 0x67, 0xe0, 0xe8, 0xc0, 0x0c, + 0xf4, 0x60, 0xc7, 0x9c, 0x61, 0x92, 0xe6, 0xcc, 0x3a, 0x7c, 0x12, 0xee, 0x30, 0xc2, 0xf0, 0x98, + 0xe5, 0x5a, 0xae, 0xae, 0xb4, 0xb5, 0xb9, 0x1d, 0x36, 0xd0, 0x24, 0x27, 0x49, 0x79, 0xc2, 0x94, + 0xbe, 0x56, 0xd6, 0xee, 0xff, 0x4e, 0xce, 0x8e, 0x36, 0x7e, 0xb5, 0xde, 0x10, 0xe7, 0x6e, 0x43, + 0x9c, 0x87, 0x0d, 0x01, 0x5f, 0x4a, 0x02, 0xbe, 0x95, 0x04, 0xdc, 0x96, 0x04, 0xac, 0x4b, 0x02, + 0x7e, 0x95, 0x04, 0xfc, 0x2e, 0x89, 0xf3, 0x50, 0x12, 0x70, 0xb3, 0x25, 0xce, 0x7a, 0x4b, 0x9c, + 0xbb, 0x2d, 0x71, 0x3e, 0x76, 0x1a, 0x0f, 0xa6, 0x9e, 0x15, 0x3a, 0xff, 0x13, 0x00, 0x00, 0xff, + 0xff, 0x4e, 0xf6, 0xfc, 0x95, 0xc2, 0x03, 0x00, 0x00, } func (this *Chunk) Equal(that interface{}) bool { @@ -1142,7 +1142,7 @@ func (m *Series) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = append(m.Labels, github_com_grafana_loki_pkg_logproto.LabelAdapter{}) + m.Labels = append(m.Labels, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{}) if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pkg/ingester/checkpoint.proto b/pkg/ingester/checkpoint.proto index 48e100b32ab5..92dae8499ec0 100644 --- a/pkg/ingester/checkpoint.proto +++ b/pkg/ingester/checkpoint.proto @@ -42,7 +42,7 @@ message Series { uint64 fingerprint = 2; repeated logproto.LegacyLabelPair labels = 3 [ (gogoproto.nullable) = false, - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" ]; repeated Chunk chunks = 4 [(gogoproto.nullable) = false]; // most recently pushed timestamp. diff --git a/pkg/ingester/checkpoint_test.go b/pkg/ingester/checkpoint_test.go index 2cf46d921ce9..e8871e7a1391 100644 --- a/pkg/ingester/checkpoint_test.go +++ b/pkg/ingester/checkpoint_test.go @@ -15,15 +15,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) // small util for ensuring data exists as we expect diff --git a/pkg/ingester/chunk_test.go b/pkg/ingester/chunk_test.go index c18c64fe6776..4523bc8cc1d8 100644 --- a/pkg/ingester/chunk_test.go +++ b/pkg/ingester/chunk_test.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" ) func testIteratorForward(t *testing.T, iter iter.EntryIterator, from, through int64) { diff --git a/pkg/ingester/client/client.go b/pkg/ingester/client/client.go index 861a925d6b17..2c4329b56c93 100644 --- a/pkg/ingester/client/client.go +++ b/pkg/ingester/client/client.go @@ -5,7 +5,7 @@ import ( "io" "time" - "github.com/grafana/loki/pkg/util/server" + "github.com/grafana/loki/v3/pkg/util/server" "github.com/grafana/dskit/grpcclient" "github.com/grafana/dskit/middleware" @@ -16,8 +16,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/distributor/clientpool" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/distributor/clientpool" + "github.com/grafana/loki/v3/pkg/logproto" ) var ingesterClientRequestDuration = promauto.NewHistogramVec(prometheus.HistogramOpts{ diff --git a/pkg/ingester/client/compat.go b/pkg/ingester/client/compat.go index 4d6c3cacc3fd..136c48669433 100644 --- a/pkg/ingester/client/compat.go +++ b/pkg/ingester/client/compat.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) const ( diff --git a/pkg/ingester/encoding_test.go b/pkg/ingester/encoding_test.go index 200f97b6413b..4bb1aab0b8da 100644 --- a/pkg/ingester/encoding_test.go +++ b/pkg/ingester/encoding_test.go @@ -8,9 +8,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/logproto" ) func fillChunk(t testing.TB, c chunkenc.Chunk) { diff --git a/pkg/ingester/flush.go b/pkg/ingester/flush.go index 1326d916961e..f9904ca8409e 100644 --- a/pkg/ingester/flush.go +++ b/pkg/ingester/flush.go @@ -17,10 +17,10 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/ingester/flush_test.go b/pkg/ingester/flush_test.go index 86127a3177f9..a4255f7510b7 100644 --- a/pkg/ingester/flush_test.go +++ b/pkg/ingester/flush_test.go @@ -22,22 +22,22 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) const ( diff --git a/pkg/ingester/index/bitprefix.go b/pkg/ingester/index/bitprefix.go index fe24a885917b..38df9381e49d 100644 --- a/pkg/ingester/index/bitprefix.go +++ b/pkg/ingester/index/bitprefix.go @@ -7,9 +7,9 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // BitPrefixInvertedIndex is another inverted index implementation diff --git a/pkg/ingester/index/bitprefix_test.go b/pkg/ingester/index/bitprefix_test.go index fbb297bd9c26..9832e15ed60c 100644 --- a/pkg/ingester/index/bitprefix_test.go +++ b/pkg/ingester/index/bitprefix_test.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func Test_BitPrefixGetShards(t *testing.T) { diff --git a/pkg/ingester/index/index.go b/pkg/ingester/index/index.go index 6536cc7f7c44..67246b081c54 100644 --- a/pkg/ingester/index/index.go +++ b/pkg/ingester/index/index.go @@ -17,10 +17,10 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/storage/stores/series" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/storage/stores/series" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) const DefaultIndexShards = 32 diff --git a/pkg/ingester/index/index_test.go b/pkg/ingester/index/index_test.go index f34633c0c6b5..23873cbfc3fd 100644 --- a/pkg/ingester/index/index_test.go +++ b/pkg/ingester/index/index_test.go @@ -9,10 +9,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/util" ) func Test_GetShards(t *testing.T) { diff --git a/pkg/ingester/index/multi.go b/pkg/ingester/index/multi.go index 0bfa57806ad0..2d94d2e9ea3e 100644 --- a/pkg/ingester/index/multi.go +++ b/pkg/ingester/index/multi.go @@ -7,9 +7,9 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/storage/config" ) type periodIndex struct { diff --git a/pkg/ingester/index/multi_test.go b/pkg/ingester/index/multi_test.go index 6be07effea8d..d78f132bc975 100644 --- a/pkg/ingester/index/multi_test.go +++ b/pkg/ingester/index/multi_test.go @@ -9,10 +9,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func MustParseDayTime(s string) config.DayTime { diff --git a/pkg/ingester/ingester.go b/pkg/ingester/ingester.go index 7d0fb671a0a5..1c1f1e1d7bfd 100644 --- a/pkg/ingester/ingester.go +++ b/pkg/ingester/ingester.go @@ -12,7 +12,7 @@ import ( "sync" "time" - lokilog "github.com/grafana/loki/pkg/logql/log" + lokilog "github.com/grafana/loki/v3/pkg/logql/log" "github.com/go-kit/log" "github.com/go-kit/log/level" @@ -29,28 +29,28 @@ import ( "github.com/prometheus/prometheus/model/labels" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/ingester/index" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores" - indexstore "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - index_stats "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/wal" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/ingester/index" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores" + indexstore "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + index_stats "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/wal" ) const ( @@ -1371,3 +1371,40 @@ func (i *Ingester) GetDetectedFields(_ context.Context, _ *logproto.DetectedFiel }, }, nil } + +// GetDetectedLabels returns map of detected labels and unique values from this ingester +func (i *Ingester) GetDetectedLabels(ctx context.Context, req *logproto.DetectedLabelsRequest) (*logproto.LabelToValuesResponse, error) { + userID, err := tenant.TenantID(ctx) + if err != nil { + return nil, err + } + + instance, err := i.GetOrCreateInstance(userID) + if err != nil { + return nil, err + } + var matchers []*labels.Matcher + if req.Query != "" { + matchers, err := syntax.ParseMatchers(req.Query, true) + if err != nil { + return nil, err + } + level.Info(i.logger).Log("msg", matchers) + } + + labelMap, err := instance.LabelsWithValues(ctx, *req.Start, matchers...) + + if err != nil { + return nil, err + } + result := make(map[string]*logproto.UniqueLabelValues) + for label, values := range labelMap { + uniqueValues := make([]string, len(values)) + for v := range values { + uniqueValues = append(uniqueValues, v) + } + + result[label] = &logproto.UniqueLabelValues{Values: uniqueValues} + } + return &logproto.LabelToValuesResponse{Labels: result}, nil +} diff --git a/pkg/ingester/ingester_test.go b/pkg/ingester/ingester_test.go index 82a124f5116a..bf7922fb61df 100644 --- a/pkg/ingester/ingester_test.go +++ b/pkg/ingester/ingester_test.go @@ -28,24 +28,24 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/ingester/index" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/ingester/index" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) func TestPrepareShutdownMarkerPathNotSet(t *testing.T) { diff --git a/pkg/ingester/instance.go b/pkg/ingester/instance.go index e0e9d5e4ca6b..674cb8a76ea2 100644 --- a/pkg/ingester/instance.go +++ b/pkg/ingester/instance.go @@ -10,7 +10,7 @@ import ( "syscall" "time" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" "github.com/go-kit/log/level" "github.com/grafana/dskit/httpgrpc" @@ -26,28 +26,28 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester/index" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/deletion" - util_log "github.com/grafana/loki/pkg/util/log" - mathutil "github.com/grafana/loki/pkg/util/math" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester/index" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/deletion" + util_log "github.com/grafana/loki/v3/pkg/util/log" + mathutil "github.com/grafana/loki/v3/pkg/util/math" + "github.com/grafana/loki/v3/pkg/validation" ) const ( @@ -562,6 +562,8 @@ func (i *instance) Label(ctx context.Context, req *logproto.LabelRequest, matche } labels := util.NewUniqueStrings(0) + // (shantanu) can create a map here to store label names::values and count the unique values + // just return a string to int map err := i.forMatchingStreams(ctx, *req.Start, matchers, nil, func(s *stream) error { for _, label := range s.labels { if req.Values && label.Name == req.Name { @@ -583,6 +585,32 @@ func (i *instance) Label(ctx context.Context, req *logproto.LabelRequest, matche }, nil } +type UniqueValues map[string]struct{} + +// LabelsWithValues returns the label names with all the unique values depending on the request +func (i *instance) LabelsWithValues(ctx context.Context, startTime time.Time, matchers ...*labels.Matcher) (map[string]UniqueValues, error) { + // TODO (shantanu): Figure out how to get the label names from index directly when no matchers are given. + + labelMap := make(map[string]UniqueValues) + err := i.forMatchingStreams(ctx, startTime, matchers, nil, func(s *stream) error { + for _, label := range s.labels { + v, exists := labelMap[label.Name] + if !exists { + v = make(map[string]struct{}) + } + if label.Value != "" { + v[label.Value] = struct{}{} + } + labelMap[label.Name] = v + } + return nil + }) + if err != nil { + return nil, err + } + return labelMap, nil +} + func (i *instance) Series(ctx context.Context, req *logproto.SeriesRequest) (*logproto.SeriesResponse, error) { groups, err := logql.MatchForSeriesRequest(req.GetGroups()) if err != nil { diff --git a/pkg/ingester/instance_test.go b/pkg/ingester/instance_test.go index 254779511465..ed78943c23c4 100644 --- a/pkg/ingester/instance_test.go +++ b/pkg/ingester/instance_test.go @@ -10,12 +10,12 @@ import ( "testing" "time" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" "github.com/grafana/dskit/tenant" "github.com/grafana/dskit/user" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" "github.com/grafana/dskit/flagext" "github.com/pkg/errors" @@ -23,18 +23,18 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/distributor/shardstreams" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/querier/plan" - loki_runtime "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/distributor/shardstreams" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/querier/plan" + loki_runtime "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) func defaultConfig() *Config { diff --git a/pkg/ingester/limiter.go b/pkg/ingester/limiter.go index e48c2a018d27..193209a54f6b 100644 --- a/pkg/ingester/limiter.go +++ b/pkg/ingester/limiter.go @@ -8,8 +8,8 @@ import ( "golang.org/x/time/rate" - "github.com/grafana/loki/pkg/distributor/shardstreams" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/distributor/shardstreams" + "github.com/grafana/loki/v3/pkg/validation" ) const ( diff --git a/pkg/ingester/limiter_test.go b/pkg/ingester/limiter_test.go index b9646bb27d18..6186e910663e 100644 --- a/pkg/ingester/limiter_test.go +++ b/pkg/ingester/limiter_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/time/rate" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) func TestLimiter_AssertMaxStreamsPerUser(t *testing.T) { diff --git a/pkg/ingester/mapper.go b/pkg/ingester/mapper.go index 5677a2a08dbe..ced7c0d6833e 100644 --- a/pkg/ingester/mapper.go +++ b/pkg/ingester/mapper.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "go.uber.org/atomic" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const maxMappedFP = 1 << 20 // About 1M fingerprints reserved for mapping. diff --git a/pkg/ingester/metrics.go b/pkg/ingester/metrics.go index e3d3a41c1a59..8b005860555f 100644 --- a/pkg/ingester/metrics.go +++ b/pkg/ingester/metrics.go @@ -4,9 +4,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) type ingesterMetrics struct { diff --git a/pkg/ingester/recovery.go b/pkg/ingester/recovery.go index f6809f2a2bdf..a93151e0e6fc 100644 --- a/pkg/ingester/recovery.go +++ b/pkg/ingester/recovery.go @@ -13,8 +13,8 @@ import ( "github.com/prometheus/prometheus/tsdb/wlog" "golang.org/x/net/context" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/logproto" ) type WALReader interface { diff --git a/pkg/ingester/recovery_test.go b/pkg/ingester/recovery_test.go index 525d39ce1d8f..fd8f05136d6f 100644 --- a/pkg/ingester/recovery_test.go +++ b/pkg/ingester/recovery_test.go @@ -17,14 +17,14 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/logproto" - loki_runtime "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/logproto" + loki_runtime "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) type MemoryWALReader struct { diff --git a/pkg/ingester/replay_controller.go b/pkg/ingester/replay_controller.go index b5bf6d7b56a0..398292130063 100644 --- a/pkg/ingester/replay_controller.go +++ b/pkg/ingester/replay_controller.go @@ -7,7 +7,7 @@ import ( "github.com/go-kit/log/level" "go.uber.org/atomic" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type replayFlusher struct { diff --git a/pkg/ingester/replay_controller_test.go b/pkg/ingester/replay_controller_test.go index 5559022eae97..0cde538d7c50 100644 --- a/pkg/ingester/replay_controller_test.go +++ b/pkg/ingester/replay_controller_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type dumbFlusher struct { diff --git a/pkg/ingester/stream.go b/pkg/ingester/stream.go index 81ce43692925..d7a29b73e802 100644 --- a/pkg/ingester/stream.go +++ b/pkg/ingester/stream.go @@ -15,16 +15,16 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/distributor/writefailures" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util/flagext" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/distributor/writefailures" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util/flagext" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) var ErrEntriesExist = errors.New("duplicate push - entries already exist") diff --git a/pkg/ingester/stream_rate_calculator.go b/pkg/ingester/stream_rate_calculator.go index ef6578ed5d1b..e021850a9bd5 100644 --- a/pkg/ingester/stream_rate_calculator.go +++ b/pkg/ingester/stream_rate_calculator.go @@ -4,7 +4,7 @@ import ( "sync" "time" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) const ( diff --git a/pkg/ingester/stream_test.go b/pkg/ingester/stream_test.go index d1b01f22746c..26eef4e3a793 100644 --- a/pkg/ingester/stream_test.go +++ b/pkg/ingester/stream_test.go @@ -14,13 +14,13 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util/flagext" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/pkg/ingester/streams_map_test.go b/pkg/ingester/streams_map_test.go index 2468ffd7c79d..d98369ff152a 100644 --- a/pkg/ingester/streams_map_test.go +++ b/pkg/ingester/streams_map_test.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) func TestStreamsMap(t *testing.T) { diff --git a/pkg/ingester/tailer.go b/pkg/ingester/tailer.go index 25fdfdb740d7..80cceba78fca 100644 --- a/pkg/ingester/tailer.go +++ b/pkg/ingester/tailer.go @@ -10,11 +10,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "golang.org/x/net/context" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/ingester/tailer_test.go b/pkg/ingester/tailer_test.go index fa44cc0a7dcb..1f49ec009508 100644 --- a/pkg/ingester/tailer_test.go +++ b/pkg/ingester/tailer_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) func TestTailer_RoundTrip(t *testing.T) { diff --git a/pkg/ingester/wal.go b/pkg/ingester/wal.go index 2bb60d65749d..5a32aee05032 100644 --- a/pkg/ingester/wal.go +++ b/pkg/ingester/wal.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/tsdb/wlog" - "github.com/grafana/loki/pkg/ingester/wal" - "github.com/grafana/loki/pkg/util/flagext" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/ingester/wal" + "github.com/grafana/loki/v3/pkg/util/flagext" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/ingester/wal/encoding.go b/pkg/ingester/wal/encoding.go index fee0b8b5f314..a21ce57bf34b 100644 --- a/pkg/ingester/wal/encoding.go +++ b/pkg/ingester/wal/encoding.go @@ -7,8 +7,8 @@ import ( "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/record" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util/encoding" ) // RecordType represents the type of the WAL/Checkpoint record. diff --git a/pkg/ingester/wal/encoding_test.go b/pkg/ingester/wal/encoding_test.go index 9b36c1c79917..a72e1c160565 100644 --- a/pkg/ingester/wal/encoding_test.go +++ b/pkg/ingester/wal/encoding_test.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) var ( diff --git a/pkg/iter/cache.go b/pkg/iter/cache.go index db26244e60d2..a6e12dffbce2 100644 --- a/pkg/iter/cache.go +++ b/pkg/iter/cache.go @@ -1,7 +1,7 @@ package iter import ( - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) type CacheEntryIterator interface { diff --git a/pkg/iter/cache_test.go b/pkg/iter/cache_test.go index 9befe3438353..23ee9cb7d995 100644 --- a/pkg/iter/cache_test.go +++ b/pkg/iter/cache_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func Test_CachedIterator(t *testing.T) { diff --git a/pkg/iter/categorized_labels_iterator.go b/pkg/iter/categorized_labels_iterator.go index 1e95cad09a16..c91aa4991116 100644 --- a/pkg/iter/categorized_labels_iterator.go +++ b/pkg/iter/categorized_labels_iterator.go @@ -5,8 +5,8 @@ import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) type categorizeLabelsIterator struct { diff --git a/pkg/iter/categorized_labels_iterator_test.go b/pkg/iter/categorized_labels_iterator_test.go index 18259edfbf16..790ca5413aba 100644 --- a/pkg/iter/categorized_labels_iterator_test.go +++ b/pkg/iter/categorized_labels_iterator_test.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestNewCategorizeLabelsIterator(t *testing.T) { diff --git a/pkg/iter/entry_iterator.go b/pkg/iter/entry_iterator.go index fa67da6a3bc0..7c373ddeac7c 100644 --- a/pkg/iter/entry_iterator.go +++ b/pkg/iter/entry_iterator.go @@ -7,10 +7,10 @@ import ( "sync" "time" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/loser" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/loser" ) // EntryIterator iterates over entries in time-order. diff --git a/pkg/iter/entry_iterator_test.go b/pkg/iter/entry_iterator_test.go index c900f898f1be..3c64c01e296e 100644 --- a/pkg/iter/entry_iterator_test.go +++ b/pkg/iter/entry_iterator_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) const ( diff --git a/pkg/iter/iterator.go b/pkg/iter/iterator.go index 8d0bde08ec65..61c727428c71 100644 --- a/pkg/iter/iterator.go +++ b/pkg/iter/iterator.go @@ -1,6 +1,6 @@ package iter -import "github.com/grafana/loki/pkg/logproto" +import "github.com/grafana/loki/v3/pkg/logproto" // Iterator iterates over data in time-order. type Iterator interface { diff --git a/pkg/iter/sample_iterator.go b/pkg/iter/sample_iterator.go index 632ed9106df1..261b75a0b33c 100644 --- a/pkg/iter/sample_iterator.go +++ b/pkg/iter/sample_iterator.go @@ -6,9 +6,9 @@ import ( "io" "sync" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util" ) // SampleIterator iterates over samples in time-order. diff --git a/pkg/iter/sample_iterator_test.go b/pkg/iter/sample_iterator_test.go index ec739e4d5a29..da3113c547e6 100644 --- a/pkg/iter/sample_iterator_test.go +++ b/pkg/iter/sample_iterator_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" ) func TestNewPeekingSampleIterator(t *testing.T) { diff --git a/pkg/logcli/client/client.go b/pkg/logcli/client/client.go index 964abc13d30b..73ddccd7efd1 100644 --- a/pkg/logcli/client/client.go +++ b/pkg/logcli/client/client.go @@ -19,12 +19,12 @@ import ( "github.com/grafana/dskit/backoff" - "github.com/grafana/loki/pkg/logcli/volume" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/logcli/volume" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/build" ) const ( diff --git a/pkg/logcli/client/file.go b/pkg/logcli/client/file.go index 82274ef79fb8..dd0432a79e17 100644 --- a/pkg/logcli/client/file.go +++ b/pkg/logcli/client/file.go @@ -11,15 +11,15 @@ import ( "github.com/gorilla/websocket" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logcli/volume" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - logqllog "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/marshal" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logcli/volume" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + logqllog "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/util/validation" "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/model/labels" diff --git a/pkg/logcli/client/file_test.go b/pkg/logcli/client/file_test.go index 1e5a2ab77c63..1a1eac9fa7a7 100644 --- a/pkg/logcli/client/file_test.go +++ b/pkg/logcli/client/file_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/logcli/index/stats.go b/pkg/logcli/index/stats.go index f67c6283ba55..723513a26cf2 100644 --- a/pkg/logcli/index/stats.go +++ b/pkg/logcli/index/stats.go @@ -7,8 +7,8 @@ import ( "github.com/fatih/color" - "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/logproto" ) type StatsQuery struct { diff --git a/pkg/logcli/index/volume.go b/pkg/logcli/index/volume.go index 85a378d20d25..b6a320570691 100644 --- a/pkg/logcli/index/volume.go +++ b/pkg/logcli/index/volume.go @@ -3,11 +3,11 @@ package index import ( "log" - "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/logcli/output" - "github.com/grafana/loki/pkg/logcli/print" - "github.com/grafana/loki/pkg/logcli/volume" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/logcli/output" + "github.com/grafana/loki/v3/pkg/logcli/print" + "github.com/grafana/loki/v3/pkg/logcli/volume" + "github.com/grafana/loki/v3/pkg/loghttp" ) // GetVolume executes a volume query and prints the results diff --git a/pkg/logcli/labelquery/labels.go b/pkg/logcli/labelquery/labels.go index 38e0a500df86..2759a2bb8cf2 100644 --- a/pkg/logcli/labelquery/labels.go +++ b/pkg/logcli/labelquery/labels.go @@ -5,8 +5,8 @@ import ( "log" "time" - "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/loghttp" ) // LabelQuery contains all necessary fields to execute label queries and print out the results diff --git a/pkg/logcli/output/default.go b/pkg/logcli/output/default.go index d6edf3c30d34..cfa9f2ad34a1 100644 --- a/pkg/logcli/output/default.go +++ b/pkg/logcli/output/default.go @@ -8,7 +8,7 @@ import ( "github.com/fatih/color" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) // DefaultOutput provides logs and metadata in human readable format diff --git a/pkg/logcli/output/default_test.go b/pkg/logcli/output/default_test.go index 61e87633362c..121b6d481600 100644 --- a/pkg/logcli/output/default_test.go +++ b/pkg/logcli/output/default_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) func TestDefaultOutput_Format(t *testing.T) { diff --git a/pkg/logcli/output/jsonl.go b/pkg/logcli/output/jsonl.go index 6c9372cf2194..793c47eeafb3 100644 --- a/pkg/logcli/output/jsonl.go +++ b/pkg/logcli/output/jsonl.go @@ -7,7 +7,7 @@ import ( "log" "time" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) // JSONLOutput prints logs and metadata as JSON Lines, suitable for scripts diff --git a/pkg/logcli/output/jsonl_test.go b/pkg/logcli/output/jsonl_test.go index bd984e912b87..22e81fd29ea9 100644 --- a/pkg/logcli/output/jsonl_test.go +++ b/pkg/logcli/output/jsonl_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) func TestJSONLOutput_Format(t *testing.T) { diff --git a/pkg/logcli/output/output.go b/pkg/logcli/output/output.go index 92d3a214c230..be82e6e97e69 100644 --- a/pkg/logcli/output/output.go +++ b/pkg/logcli/output/output.go @@ -8,7 +8,7 @@ import ( "github.com/fatih/color" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) // Blue color is excluded since we are already printing timestamp diff --git a/pkg/logcli/output/raw.go b/pkg/logcli/output/raw.go index 22aba03e3591..4431858efb7e 100644 --- a/pkg/logcli/output/raw.go +++ b/pkg/logcli/output/raw.go @@ -5,7 +5,7 @@ import ( "io" "time" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) // RawOutput prints logs in their original form, without any metadata diff --git a/pkg/logcli/output/raw_test.go b/pkg/logcli/output/raw_test.go index 3c4570837463..844e8e811afc 100644 --- a/pkg/logcli/output/raw_test.go +++ b/pkg/logcli/output/raw_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) func TestRawOutput_Format(t *testing.T) { diff --git a/pkg/logcli/print/print.go b/pkg/logcli/print/print.go index 6528b2c7ec4b..0f7d5d131151 100644 --- a/pkg/logcli/print/print.go +++ b/pkg/logcli/print/print.go @@ -11,11 +11,11 @@ import ( "github.com/fatih/color" - "github.com/grafana/loki/pkg/logcli/output" - "github.com/grafana/loki/pkg/logcli/util" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logcli/output" + "github.com/grafana/loki/v3/pkg/logcli/util" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) type QueryResultPrinter struct { diff --git a/pkg/logcli/print/print_test.go b/pkg/logcli/print/print_test.go index 91ada1c6e568..737e494545c6 100644 --- a/pkg/logcli/print/print_test.go +++ b/pkg/logcli/print/print_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/util/marshal" ) func Test_commonLabels(t *testing.T) { diff --git a/pkg/logcli/query/query.go b/pkg/logcli/query/query.go index 7e8c86e08ad1..84934e57730c 100644 --- a/pkg/logcli/query/query.go +++ b/pkg/logcli/query/query.go @@ -16,22 +16,22 @@ import ( "github.com/prometheus/client_golang/prometheus" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/logcli/output" - "github.com/grafana/loki/pkg/logcli/print" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/pkg/storage" - chunk "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/util/cfg" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/marshal" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/logcli/output" + "github.com/grafana/loki/v3/pkg/logcli/print" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/pkg/storage" + chunk "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/util/cfg" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/validation" ) const schemaConfigFilename = "schemaconfig" diff --git a/pkg/logcli/query/query_test.go b/pkg/logcli/query/query_test.go index 605155bca3db..32a6538558ca 100644 --- a/pkg/logcli/query/query_test.go +++ b/pkg/logcli/query/query_test.go @@ -17,17 +17,17 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logcli/output" - "github.com/grafana/loki/pkg/logcli/volume" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/logcli/output" + "github.com/grafana/loki/v3/pkg/logcli/volume" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/marshal" ) func Test_batch(t *testing.T) { diff --git a/pkg/logcli/query/tail.go b/pkg/logcli/query/tail.go index c1c092a9e116..b65e546b904e 100644 --- a/pkg/logcli/query/tail.go +++ b/pkg/logcli/query/tail.go @@ -13,11 +13,11 @@ import ( "github.com/gorilla/websocket" "github.com/grafana/dskit/backoff" - "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/logcli/output" - "github.com/grafana/loki/pkg/logcli/util" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/util/unmarshal" + "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/logcli/output" + "github.com/grafana/loki/v3/pkg/logcli/util" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/util/unmarshal" ) // TailQuery connects to the Loki websocket endpoint and tails logs diff --git a/pkg/logcli/seriesquery/series.go b/pkg/logcli/seriesquery/series.go index 94bd3cc842a0..c5d639ca6af1 100644 --- a/pkg/logcli/seriesquery/series.go +++ b/pkg/logcli/seriesquery/series.go @@ -8,8 +8,8 @@ import ( "text/tabwriter" "time" - "github.com/grafana/loki/pkg/logcli/client" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logcli/client" + "github.com/grafana/loki/v3/pkg/loghttp" ) // SeriesQuery contains all necessary fields to execute label queries and print out the results diff --git a/pkg/logcli/util/util.go b/pkg/logcli/util/util.go index cb3a70f924a9..cf276d5ab365 100644 --- a/pkg/logcli/util/util.go +++ b/pkg/logcli/util/util.go @@ -1,6 +1,6 @@ package util -import "github.com/grafana/loki/pkg/loghttp" +import "github.com/grafana/loki/v3/pkg/loghttp" func MatchLabels(on bool, l loghttp.LabelSet, names []string) loghttp.LabelSet { ret := loghttp.LabelSet{} diff --git a/pkg/loghttp/labels.go b/pkg/loghttp/labels.go index efa059fc9709..b2c5a343637b 100644 --- a/pkg/loghttp/labels.go +++ b/pkg/loghttp/labels.go @@ -9,7 +9,7 @@ import ( "github.com/gorilla/mux" "github.com/grafana/jsonparser" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // LabelResponse represents the http json response to a label query @@ -99,17 +99,3 @@ func ParseDetectedLabelsQuery(r *http.Request) (*logproto.DetectedLabelsRequest, Query: query(r), }, nil } - -func ParseDetectedFieldsQuery(r *http.Request) (*logproto.DetectedFieldsRequest, error) { - req := &logproto.DetectedFieldsRequest{} - - start, end, err := bounds(r) - if err != nil { - return nil, err - } - req.Start = &start - req.End = &end - - req.Query = query(r) - return req, nil -} diff --git a/pkg/loghttp/labels_test.go b/pkg/loghttp/labels_test.go index c2f0f0315b30..c5b5c837f057 100644 --- a/pkg/loghttp/labels_test.go +++ b/pkg/loghttp/labels_test.go @@ -9,7 +9,7 @@ import ( "github.com/gorilla/mux" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestParseLabelQuery(t *testing.T) { diff --git a/pkg/loghttp/legacy/tail.go b/pkg/loghttp/legacy/tail.go index a51629cb7c2a..06e4b8b1b181 100644 --- a/pkg/loghttp/legacy/tail.go +++ b/pkg/loghttp/legacy/tail.go @@ -3,7 +3,7 @@ package loghttp import ( "time" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // DroppedEntry represents a dropped entry in a tail call diff --git a/pkg/loghttp/params.go b/pkg/loghttp/params.go index 74597a1970d4..4f34992df592 100644 --- a/pkg/loghttp/params.go +++ b/pkg/loghttp/params.go @@ -12,13 +12,14 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) const ( defaultQueryLimit = 100 + defaultFieldLimit = 1000 defaultSince = 1 * time.Hour defaultDirection = logproto.BACKWARD ) @@ -34,6 +35,28 @@ func limit(r *http.Request) (uint32, error) { return uint32(l), nil } +func lineLimit(r *http.Request) (uint32, error) { + l, err := parseInt(r.Form.Get("line_limit"), defaultQueryLimit) + if err != nil { + return 0, err + } + if l <= 0 { + return 0, errors.New("limit must be a positive value") + } + return uint32(l), nil +} + +func fieldLimit(r *http.Request) (uint32, error) { + l, err := parseInt(r.Form.Get("field_limit"), defaultFieldLimit) + if err != nil { + return 0, err + } + if l <= 0 { + return 0, errors.New("limit must be a positive value") + } + return uint32(l), nil +} + func query(r *http.Request) string { return r.Form.Get("query") } diff --git a/pkg/loghttp/params_test.go b/pkg/loghttp/params_test.go index 873fdff36bb9..3456fdc2ed80 100644 --- a/pkg/loghttp/params_test.go +++ b/pkg/loghttp/params_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestHttp_defaultQueryRangeStep(t *testing.T) { diff --git a/pkg/loghttp/push/otlp.go b/pkg/loghttp/push/otlp.go index a001b52b210f..a361bbbf196d 100644 --- a/pkg/loghttp/push/otlp.go +++ b/pkg/loghttp/push/otlp.go @@ -18,15 +18,18 @@ import ( "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/plog/plogotlp" - "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/push" - loki_util "github.com/grafana/loki/pkg/util" + + "github.com/grafana/loki/v3/pkg/logproto" + loki_util "github.com/grafana/loki/v3/pkg/util" ) const ( pbContentType = "application/x-protobuf" gzipContentEncoding = "gzip" attrServiceName = "service.name" + + OTLPSeverityNumber = "severity_number" ) func newPushStats() *Stats { @@ -287,7 +290,7 @@ func otlpLogToPushEntry(log plog.LogRecord, otlpConfig OTLPConfig) push.Entry { if severityNum := log.SeverityNumber(); severityNum != plog.SeverityNumberUnspecified { structuredMetadata = append(structuredMetadata, push.LabelAdapter{ - Name: "severity_number", + Name: OTLPSeverityNumber, Value: fmt.Sprintf("%d", severityNum), }) } diff --git a/pkg/loghttp/push/otlp_test.go b/pkg/loghttp/push/otlp_test.go index c711c85905cf..bcdeb18d1706 100644 --- a/pkg/loghttp/push/otlp_test.go +++ b/pkg/loghttp/push/otlp_test.go @@ -13,8 +13,9 @@ import ( "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/plog" - "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/push" + + "github.com/grafana/loki/v3/pkg/logproto" ) func TestOTLPToLokiPushRequest(t *testing.T) { diff --git a/pkg/loghttp/push/push.go b/pkg/loghttp/push/push.go index f4b8771e5fec..c63b32c6111b 100644 --- a/pkg/loghttp/push/push.go +++ b/pkg/loghttp/push/push.go @@ -20,15 +20,16 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util" - loki_util "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/unmarshal" - unmarshal2 "github.com/grafana/loki/pkg/util/unmarshal/legacy" + loki_util "github.com/grafana/loki/v3/pkg/util" + + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/unmarshal" + unmarshal2 "github.com/grafana/loki/v3/pkg/util/unmarshal/legacy" ) var ( diff --git a/pkg/loghttp/push/push_test.go b/pkg/loghttp/push/push_test.go index 8c4768615ce6..ac83492d62eb 100644 --- a/pkg/loghttp/push/push_test.go +++ b/pkg/loghttp/push/push_test.go @@ -17,7 +17,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" ) // GZip source string and return compressed string diff --git a/pkg/loghttp/query.go b/pkg/loghttp/query.go index 75f75c60ccc0..5d16aefc1e43 100644 --- a/pkg/loghttp/query.go +++ b/pkg/loghttp/query.go @@ -15,12 +15,12 @@ import ( "github.com/grafana/dskit/httpgrpc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util" ) var ( @@ -617,6 +617,48 @@ func ParseVolumeRangeQuery(r *http.Request) (*VolumeRangeQuery, error) { }, nil } +func ParseDetectedFieldsQuery(r *http.Request) (*logproto.DetectedFieldsRequest, error) { + var err error + result := &logproto.DetectedFieldsRequest{} + + result.Query = query(r) + result.Start, result.End, err = bounds(r) + if err != nil { + return nil, err + } + + if result.End.Before(result.Start) { + return nil, errEndBeforeStart + } + + result.LineLimit, err = lineLimit(r) + if err != nil { + return nil, err + } + + result.FieldLimit, err = fieldLimit(r) + if err != nil { + return nil, err + } + + step, err := step(r, result.Start, result.End) + result.Step = step.Milliseconds() + if err != nil { + return nil, err + } + + if result.Step <= 0 { + return nil, errZeroOrNegativeStep + } + + // For safety, limit the number of returned points per timeseries. + // This is sufficient for 60s resolution for a week or 1h resolution for a year. + if (result.End.Sub(result.Start) / step) > 11000 { + return nil, errStepTooSmall + } + return result, nil +} + func targetLabels(r *http.Request) []string { lbls := strings.Split(r.Form.Get("targetLabels"), ",") if (len(lbls) == 1 && lbls[0] == "") || len(lbls) == 0 { diff --git a/pkg/loghttp/query_test.go b/pkg/loghttp/query_test.go index e94199352f12..889a8900eac7 100644 --- a/pkg/loghttp/query_test.go +++ b/pkg/loghttp/query_test.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) func TestParseRangeQuery(t *testing.T) { diff --git a/pkg/loghttp/series.go b/pkg/loghttp/series.go index 2cb22ec6cfec..1faef6d6e540 100644 --- a/pkg/loghttp/series.go +++ b/pkg/loghttp/series.go @@ -5,8 +5,8 @@ import ( "sort" "strings" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" ) type SeriesResponse struct { diff --git a/pkg/loghttp/series_test.go b/pkg/loghttp/series_test.go index 403b0c19af98..928e5350ccb5 100644 --- a/pkg/loghttp/series_test.go +++ b/pkg/loghttp/series_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestParseAndValidateSeriesQuery(t *testing.T) { diff --git a/pkg/loghttp/tail.go b/pkg/loghttp/tail.go index 9ad2219b1097..658ae112cce0 100644 --- a/pkg/loghttp/tail.go +++ b/pkg/loghttp/tail.go @@ -10,9 +10,9 @@ import ( "github.com/grafana/dskit/httpgrpc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" ) const ( diff --git a/pkg/loghttp/tail_test.go b/pkg/loghttp/tail_test.go index 6fe716311667..06fd23f4f5f9 100644 --- a/pkg/loghttp/tail_test.go +++ b/pkg/loghttp/tail_test.go @@ -8,9 +8,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" ) func TestParseTailQuery(t *testing.T) { diff --git a/pkg/logproto/bloomgateway.pb.go b/pkg/logproto/bloomgateway.pb.go index 98a22fd13168..1ca062e722b3 100644 --- a/pkg/logproto/bloomgateway.pb.go +++ b/pkg/logproto/bloomgateway.pb.go @@ -8,8 +8,8 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - github_com_grafana_loki_pkg_logql_syntax "github.com/grafana/loki/pkg/logql/syntax" - github_com_grafana_loki_pkg_querier_plan "github.com/grafana/loki/pkg/querier/plan" + github_com_grafana_loki_v3_pkg_logql_syntax "github.com/grafana/loki/v3/pkg/logql/syntax" + github_com_grafana_loki_v3_pkg_querier_plan "github.com/grafana/loki/v3/pkg/querier/plan" github_com_prometheus_common_model "github.com/prometheus/common/model" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -37,8 +37,8 @@ type FilterChunkRefRequest struct { Through github_com_prometheus_common_model.Time `protobuf:"varint,2,opt,name=through,proto3,customtype=github.com/prometheus/common/model.Time" json:"through"` Refs []*GroupedChunkRefs `protobuf:"bytes,3,rep,name=refs,proto3" json:"refs,omitempty"` // TODO(salvacorts): Delete this field once the weekly release is done. - Filters []github_com_grafana_loki_pkg_logql_syntax.LineFilter `protobuf:"bytes,4,rep,name=filters,proto3,customtype=github.com/grafana/loki/pkg/logql/syntax.LineFilter" json:"filters"` - Plan github_com_grafana_loki_pkg_querier_plan.QueryPlan `protobuf:"bytes,5,opt,name=plan,proto3,customtype=github.com/grafana/loki/pkg/querier/plan.QueryPlan" json:"plan"` + Filters []github_com_grafana_loki_v3_pkg_logql_syntax.LineFilter `protobuf:"bytes,4,rep,name=filters,proto3,customtype=github.com/grafana/loki/v3/pkg/logql/syntax.LineFilter" json:"filters"` + Plan github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `protobuf:"bytes,5,opt,name=plan,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan" json:"plan"` } func (m *FilterChunkRefRequest) Reset() { *m = FilterChunkRefRequest{} } @@ -237,40 +237,41 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/bloomgateway.proto", fileDescriptor_a50b5dd1dbcd1415) } var fileDescriptor_a50b5dd1dbcd1415 = []byte{ - // 525 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x53, 0xbb, 0x6e, 0x13, 0x41,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b, 0x77, 0x57, - 0xe3, 0x7b, 0x57, 0x75, 0x11, 0x07, 0xb7, 0x82, 0x98, 0x87, 0x20, 0x33, 0x19, 0x73, 0x6d, 0x64, - 0x34, 0xd9, 0xfa, 0x17, 0xd9, 0xc7, 0x5b, 0x1a, 0xb8, 0xcf, 0xb5, 0xc9, 0x6d, 0x97, 0xad, 0x5e, - 0xe4, 0xd1, 0xc6, 0x5c, 0x91, 0xba, 0x76, 0x55, 0x6d, 0xca, 0x79, 0xea, 0x07, 0xf8, 0xd6, 0x60, - 0xb9, 0x7c, 0x47, 0xe5, 0xf2, 0x91, 0x77, 0xf8, 0xee, 0x66, 0x4b, 0x14, 0xe9, 0xd4, 0xe0, 0xdf, - 0xee, 0x54, 0xdb, 0xf9, 0xb3, 0x43, 0xd9, 0xce, 0xae, 0x35, 0x38, 0x9e, 0xcd, 0xa9, 0x75, 0x36, - 0xa7, 0xd6, 0xc5, 0x9c, 0xa2, 0x4f, 0x05, 0x45, 0x5f, 0x0b, 0x8a, 0x4e, 0x0b, 0x8a, 0x66, 0x05, - 0x45, 0x3f, 0x0a, 0x8a, 0x7e, 0x16, 0xd4, 0xba, 0x28, 0x28, 0xfa, 0xbc, 0xa0, 0xd6, 0x6c, 0x41, - 0xad, 0xb3, 0x05, 0xb5, 0x8e, 0x1f, 0x5e, 0x33, 0xbe, 0x86, 0x74, 0xb8, 0x65, 0x8e, 0x83, 0x5f, - 0x01, 0x00, 0x00, 0xff, 0xff, 0xbe, 0xe2, 0x64, 0x8a, 0x54, 0x04, 0x00, 0x00, + // 529 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x53, 0xbb, 0x6e, 0x13, 0x4d, + 0x14, 0xde, 0xf9, 0xed, 0x3f, 0x71, 0xc6, 0xdc, 0x34, 0x0a, 0xd1, 0xca, 0x48, 0xe3, 0x95, 0x0b, + 0xe2, 0x6a, 0x47, 0x72, 0x04, 0xa2, 0x81, 0xc2, 0x91, 0x88, 0x90, 0x28, 0x60, 0x40, 0x14, 0x48, + 0x14, 0x6b, 0xe7, 0xec, 0x45, 0xde, 0x9d, 0x59, 0xcf, 0xce, 0x02, 0xee, 0x78, 0x04, 0x1e, 0x03, + 0xf1, 0x00, 0x3c, 0x43, 0x4a, 0x97, 0x11, 0x45, 0x84, 0xd7, 0x0d, 0x65, 0x1e, 0x01, 0x79, 0xd6, + 0x1b, 0xdb, 0x11, 0xc8, 0x12, 0x15, 0xd5, 0x5c, 0xce, 0xf9, 0xce, 0x77, 0xbe, 0x73, 0xc1, 0xed, + 0x74, 0x14, 0xb0, 0x58, 0x06, 0xa9, 0x92, 0x5a, 0xb2, 0x41, 0x2c, 0x65, 0x12, 0x78, 0x1a, 0x3e, + 0x78, 0x13, 0xd7, 0x7c, 0x91, 0x46, 0x65, 0x6c, 0xed, 0x07, 0x32, 0x90, 0xa5, 0xdf, 0xe2, 0x56, + 0xda, 0x5b, 0xf7, 0x36, 0x02, 0x54, 0x97, 0xd2, 0xd8, 0xf9, 0x5a, 0xc3, 0x77, 0x9f, 0x46, 0xb1, + 0x06, 0x75, 0x1c, 0xe6, 0x62, 0xc4, 0xc1, 0xe7, 0x30, 0xce, 0x21, 0xd3, 0xe4, 0x18, 0xd7, 0x7d, + 0x25, 0x13, 0x1b, 0x39, 0xa8, 0x5b, 0xeb, 0xb3, 0xb3, 0x8b, 0xb6, 0xf5, 0xfd, 0xa2, 0x7d, 0x18, + 0x44, 0x3a, 0xcc, 0x07, 0xee, 0x50, 0x26, 0x2c, 0x55, 0x32, 0x01, 0x1d, 0x42, 0x9e, 0xb1, 0xa1, + 0x4c, 0x12, 0x29, 0x58, 0x22, 0x4f, 0x21, 0x76, 0x5f, 0x47, 0x09, 0x70, 0x03, 0x26, 0xcf, 0xf0, + 0xae, 0x0e, 0x95, 0xcc, 0x83, 0xd0, 0xfe, 0xef, 0xef, 0xe2, 0x54, 0x78, 0xe2, 0xe2, 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0x7c, 0xfd, 0x8b, 0x1c, 0xe0, 0x1d, 0x0d, 0xc2, 0x13, 0xda, 0xe4, + 0xb6, 0xc7, 0x97, 0x2f, 0x72, 0x7f, 0x63, 0xba, 0xc8, 0xaa, 0x76, 0x55, 0x6d, 0xca, 0xa9, 0xea, + 0xf9, 0xf8, 0x46, 0x7f, 0xb1, 0x82, 0x27, 0xe5, 0x0a, 0x92, 0x37, 0xf8, 0xf6, 0x66, 0x4b, 0x32, + 0xd2, 0x5e, 0x81, 0x7f, 0xbb, 0x59, 0x2d, 0xe7, 0xcf, 0x0e, 0x65, 0x3b, 0x3b, 0x56, 0xff, 0xdd, + 0x74, 0x46, 0xad, 0xf3, 0x19, 0xb5, 0x2e, 0x67, 0x14, 0x7d, 0x2a, 0x28, 0xfa, 0x52, 0x50, 0x74, + 0x56, 0x50, 0x34, 0x2d, 0x28, 0xfa, 0x51, 0x50, 0xf4, 0xb3, 0xa0, 0xd6, 0x65, 0x41, 0xd1, 0xe7, + 0x39, 0xb5, 0xa6, 0x73, 0x6a, 0x9d, 0xcf, 0xa9, 0xf5, 0xf6, 0x70, 0xfb, 0x10, 0x1b, 0xde, 0xc1, + 0x8e, 0x39, 0x8e, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x1b, 0x54, 0xbe, 0xd4, 0x5d, 0x04, 0x00, + 0x00, } func (this *FilterChunkRefRequest) Equal(that interface{}) bool { @@ -1053,7 +1054,7 @@ func (m *FilterChunkRefRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Filters = append(m.Filters, github_com_grafana_loki_pkg_logql_syntax.LineFilter{}) + m.Filters = append(m.Filters, github_com_grafana_loki_v3_pkg_logql_syntax.LineFilter{}) if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pkg/logproto/bloomgateway.proto b/pkg/logproto/bloomgateway.proto index 13d5c25e763f..ffef97efe7cc 100644 --- a/pkg/logproto/bloomgateway.proto +++ b/pkg/logproto/bloomgateway.proto @@ -5,7 +5,7 @@ package logproto; import "gogoproto/gogo.proto"; import "pkg/logproto/logproto.proto"; -option go_package = "github.com/grafana/loki/pkg/logproto"; +option go_package = "github.com/grafana/loki/v3/pkg/logproto"; message FilterChunkRefRequest { int64 from = 1 [ @@ -19,11 +19,11 @@ message FilterChunkRefRequest { repeated GroupedChunkRefs refs = 3; // TODO(salvacorts): Delete this field once the weekly release is done. repeated LineFilter filters = 4 [ - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logql/syntax.LineFilter", + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logql/syntax.LineFilter", (gogoproto.nullable) = false ]; Plan plan = 5 [ - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/plan.QueryPlan", + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan", (gogoproto.nullable) = false ]; } diff --git a/pkg/logproto/compat.go b/pkg/logproto/compat.go index 25b5269e1ae6..82979824a5f5 100644 --- a/pkg/logproto/compat.go +++ b/pkg/logproto/compat.go @@ -20,9 +20,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/timestamp" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util" ) // ToWriteRequest converts matched slices of Labels, Samples and Metadata into a WriteRequest proto. diff --git a/pkg/logproto/compat_test.go b/pkg/logproto/compat_test.go index c4e3307d03e3..83b2e61787fa 100644 --- a/pkg/logproto/compat_test.go +++ b/pkg/logproto/compat_test.go @@ -16,8 +16,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" ) // This test verifies that jsoninter uses our custom method for marshalling. diff --git a/pkg/logproto/extensions.go b/pkg/logproto/extensions.go index 9c0e5c3d432d..19e1f7be3b0c 100644 --- a/pkg/logproto/extensions.go +++ b/pkg/logproto/extensions.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // This is the separator define in the Prometheus Labels.Hash function. diff --git a/pkg/logproto/indexgateway.pb.go b/pkg/logproto/indexgateway.pb.go index 1229caebbb60..bd2650fbc01a 100644 --- a/pkg/logproto/indexgateway.pb.go +++ b/pkg/logproto/indexgateway.pb.go @@ -8,7 +8,7 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - stats "github.com/grafana/loki/pkg/logqlmodel/stats" + stats "github.com/grafana/loki/v3/pkg/logqlmodel/stats" github_com_prometheus_common_model "github.com/prometheus/common/model" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -249,53 +249,54 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/indexgateway.proto", fileDescriptor_d27585148d0a52c8) } var fileDescriptor_d27585148d0a52c8 = []byte{ - // 734 bytes of a gzipped FileDescriptorProto + // 737 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0xbf, 0x4f, 0xdb, 0x4c, - 0x18, 0xf6, 0x91, 0x84, 0x0f, 0x8e, 0x0f, 0x86, 0xfb, 0x7e, 0x60, 0x05, 0xb0, 0xa3, 0xa8, 0x52, - 0xd3, 0xc5, 0xae, 0xe8, 0x50, 0xb5, 0x12, 0x12, 0x75, 0xa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2, - 0x17, 0xed, 0xc0, 0xbf, 0x78, 0x87, 0x92, 0xc8, 0xed, 0xa8, 0x53, 0x42, 0xef, 0xe9, 0xef, 0xeb, - 0x65, 0x0a, 0x76, 0x76, 0x41, 0x3a, 0x2c, 0x1d, 0x47, 0x98, 0x9e, 0xa8, 0x85, 0x0a, 0xa8, 0xcd, - 0x5a, 0xb3, 0x83, 0x58, 0x97, 0x80, 0x2d, 0x0f, 0xd4, 0x84, 0xff, 0x73, 0x87, 0xba, 0x98, 0xef, - 0xb7, 0x4e, 0x38, 0x66, 0xfb, 0x5d, 0x4c, 0xf7, 0x59, 0x52, 0xa5, 0x5a, 0xac, 0x80, 0x5a, 0xd1, - 0x5a, 0x1c, 0xc4, 0xfa, 0x3f, 0x92, 0x61, 0x25, 0x84, 0x2d, 0x4c, 0x45, 0x13, 0xec, 0x49, 0x60, - 0xf5, 0x13, 0x80, 0x0b, 0x59, 0x8f, 0x58, 0x97, 0x84, 0x0c, 0xa3, 0x35, 0x38, 0x2d, 0xf4, 0x98, - 0x0a, 0x2a, 0x85, 0xda, 0xdc, 0xea, 0x7f, 0xc6, 0xf5, 0x61, 0x19, 0x82, 0x6f, 0x2d, 0x24, 0xd5, - 0x0e, 0x62, 0x3d, 0x25, 0xdb, 0xe9, 0x89, 0x9e, 0x41, 0x98, 0x0c, 0xc1, 0x63, 0xdc, 0x6b, 0x33, - 0xd1, 0x99, 0xb9, 0xd5, 0x79, 0x43, 0xce, 0xc5, 0xc6, 0x2c, 0xf2, 0xb9, 0x85, 0x52, 0xd7, 0x1c, - 0xd1, 0xce, 0xdd, 0xab, 0xef, 0x01, 0x2c, 0x89, 0x20, 0x68, 0x1d, 0x4e, 0xb7, 0x48, 0x14, 0x8a, - 0x5c, 0x12, 0x21, 0x75, 0x3c, 0x97, 0xfa, 0x96, 0x25, 0xec, 0xa3, 0x74, 0x24, 0xdf, 0x4e, 0x4f, - 0xb4, 0x06, 0x4b, 0x22, 0x76, 0x9a, 0xc9, 0xb2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, 0xcb, 0x0f, + 0x28, 0xbf, 0x96, 0x37, 0x06, 0x74, 0x73, 0x67, 0xab, 0x0a, 0xda, 0x10, 0x2d, 0xdd, 0x23, 0x7e, + 0x14, 0x60, 0x94, 0x0b, 0x28, 0x91, 0x4c, 0x45, 0xbd, 0x69, 0x18, 0x2a, 0x34, 0xe5, 0x50, 0xe4, + 0x07, 0xbc, 0x32, 0xf1, 0x7b, 0x1f, 0x66, 0xa3, 0xdd, 0x66, 0xce, 0x16, 0xc6, 0x7a, 0x71, 0x76, + 0xa1, 0x29, 0xe7, 0x17, 0x9a, 0x72, 0x75, 0xa1, 0x81, 0xb7, 0x7d, 0x0d, 0x7c, 0xe9, 0x6b, 0xe0, + 0xb4, 0xaf, 0x81, 0xb3, 0xbe, 0x06, 0xbe, 0xf5, 0x35, 0xf0, 0xbd, 0xaf, 0x29, 0x57, 0x7d, 0x0d, + 0x7c, 0xb8, 0xd4, 0x94, 0xb3, 0x4b, 0x4d, 0x39, 0xbf, 0xd4, 0x94, 0xe7, 0xf9, 0x5f, 0x4d, 0x97, + 0x3a, 0x87, 0x4e, 0xe8, 0x98, 0x3e, 0x39, 0xf2, 0xcc, 0xd7, 0x6b, 0x66, 0xfe, 0x7f, 0xa0, 0x35, + 0x2d, 0x8e, 0xb5, 0x9f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x1e, 0x17, 0x36, 0xcf, 0x65, 0x06, 0x00, + 0x00, } func (this *ShardsRequest) Equal(that interface{}) bool { diff --git a/pkg/logproto/indexgateway.proto b/pkg/logproto/indexgateway.proto index 33cfbec317d5..1b54542d8f5a 100644 --- a/pkg/logproto/indexgateway.proto +++ b/pkg/logproto/indexgateway.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "pkg/logproto/logproto.proto"; import "pkg/logqlmodel/stats/stats.proto"; -option go_package = "github.com/grafana/loki/pkg/logproto"; +option go_package = "github.com/grafana/loki/v3/pkg/logproto"; // This exists in a different file to retain proto namespacing compatibility with it's prior definition, but has been relocated to the logproto go pkg. service IndexGateway { diff --git a/pkg/logproto/logproto.pb.go b/pkg/logproto/logproto.pb.go index 11482676c0ef..7995f42735e6 100644 --- a/pkg/logproto/logproto.pb.go +++ b/pkg/logproto/logproto.pb.go @@ -10,13 +10,14 @@ import ( fmt "fmt" _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" + github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - github_com_grafana_loki_pkg_logql_syntax "github.com/grafana/loki/pkg/logql/syntax" - stats "github.com/grafana/loki/pkg/logqlmodel/stats" _ "github.com/grafana/loki/pkg/push" github_com_grafana_loki_pkg_push "github.com/grafana/loki/pkg/push" - github_com_grafana_loki_pkg_querier_plan "github.com/grafana/loki/pkg/querier/plan" + github_com_grafana_loki_v3_pkg_logql_syntax "github.com/grafana/loki/v3/pkg/logql/syntax" + stats "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + github_com_grafana_loki_v3_pkg_querier_plan "github.com/grafana/loki/v3/pkg/querier/plan" github_com_prometheus_common_model "github.com/prometheus/common/model" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -63,13 +64,99 @@ func (Direction) EnumDescriptor() ([]byte, []int) { return fileDescriptor_c28a5f14f1f4c79a, []int{0} } +type LabelToValuesResponse struct { + Labels map[string]*UniqueLabelValues `protobuf:"bytes,1,rep,name=labels,proto3" json:"labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *LabelToValuesResponse) Reset() { *m = LabelToValuesResponse{} } +func (*LabelToValuesResponse) ProtoMessage() {} +func (*LabelToValuesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_c28a5f14f1f4c79a, []int{0} +} +func (m *LabelToValuesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *LabelToValuesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_LabelToValuesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *LabelToValuesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_LabelToValuesResponse.Merge(m, src) +} +func (m *LabelToValuesResponse) XXX_Size() int { + return m.Size() +} +func (m *LabelToValuesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_LabelToValuesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_LabelToValuesResponse proto.InternalMessageInfo + +func (m *LabelToValuesResponse) GetLabels() map[string]*UniqueLabelValues { + if m != nil { + return m.Labels + } + return nil +} + +type UniqueLabelValues struct { + Values []string `protobuf:"bytes,1,rep,name=values,proto3" json:"values,omitempty"` +} + +func (m *UniqueLabelValues) Reset() { *m = UniqueLabelValues{} } +func (*UniqueLabelValues) ProtoMessage() {} +func (*UniqueLabelValues) Descriptor() ([]byte, []int) { + return fileDescriptor_c28a5f14f1f4c79a, []int{1} +} +func (m *UniqueLabelValues) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *UniqueLabelValues) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_UniqueLabelValues.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *UniqueLabelValues) XXX_Merge(src proto.Message) { + xxx_messageInfo_UniqueLabelValues.Merge(m, src) +} +func (m *UniqueLabelValues) XXX_Size() int { + return m.Size() +} +func (m *UniqueLabelValues) XXX_DiscardUnknown() { + xxx_messageInfo_UniqueLabelValues.DiscardUnknown(m) +} + +var xxx_messageInfo_UniqueLabelValues proto.InternalMessageInfo + +func (m *UniqueLabelValues) GetValues() []string { + if m != nil { + return m.Values + } + return nil +} + type StreamRatesRequest struct { } func (m *StreamRatesRequest) Reset() { *m = StreamRatesRequest{} } func (*StreamRatesRequest) ProtoMessage() {} func (*StreamRatesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{0} + return fileDescriptor_c28a5f14f1f4c79a, []int{2} } func (m *StreamRatesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -105,7 +192,7 @@ type StreamRatesResponse struct { func (m *StreamRatesResponse) Reset() { *m = StreamRatesResponse{} } func (*StreamRatesResponse) ProtoMessage() {} func (*StreamRatesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{1} + return fileDescriptor_c28a5f14f1f4c79a, []int{3} } func (m *StreamRatesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -152,7 +239,7 @@ type StreamRate struct { func (m *StreamRate) Reset() { *m = StreamRate{} } func (*StreamRate) ProtoMessage() {} func (*StreamRate) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{2} + return fileDescriptor_c28a5f14f1f4c79a, []int{4} } func (m *StreamRate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -217,20 +304,20 @@ func (m *StreamRate) GetPushes() uint32 { } type QueryRequest struct { - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // Deprecated: Do not use. - Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - Start time.Time `protobuf:"bytes,3,opt,name=start,proto3,stdtime" json:"start"` - End time.Time `protobuf:"bytes,4,opt,name=end,proto3,stdtime" json:"end"` - Direction Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` - Shards []string `protobuf:"bytes,7,rep,name=shards,proto3" json:"shards,omitempty"` - Deletes []*Delete `protobuf:"bytes,8,rep,name=deletes,proto3" json:"deletes,omitempty"` - Plan *github_com_grafana_loki_pkg_querier_plan.QueryPlan `protobuf:"bytes,9,opt,name=plan,proto3,customtype=github.com/grafana/loki/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // Deprecated: Do not use. + Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + Start time.Time `protobuf:"bytes,3,opt,name=start,proto3,stdtime" json:"start"` + End time.Time `protobuf:"bytes,4,opt,name=end,proto3,stdtime" json:"end"` + Direction Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` + Shards []string `protobuf:"bytes,7,rep,name=shards,proto3" json:"shards,omitempty"` + Deletes []*Delete `protobuf:"bytes,8,rep,name=deletes,proto3" json:"deletes,omitempty"` + Plan *github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `protobuf:"bytes,9,opt,name=plan,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` } func (m *QueryRequest) Reset() { *m = QueryRequest{} } func (*QueryRequest) ProtoMessage() {} func (*QueryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{3} + return fileDescriptor_c28a5f14f1f4c79a, []int{5} } func (m *QueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -310,18 +397,18 @@ func (m *QueryRequest) GetDeletes() []*Delete { } type SampleQueryRequest struct { - Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // Deprecated: Do not use. - Start time.Time `protobuf:"bytes,2,opt,name=start,proto3,stdtime" json:"start"` - End time.Time `protobuf:"bytes,3,opt,name=end,proto3,stdtime" json:"end"` - Shards []string `protobuf:"bytes,4,rep,name=shards,proto3" json:"shards,omitempty"` - Deletes []*Delete `protobuf:"bytes,5,rep,name=deletes,proto3" json:"deletes,omitempty"` - Plan *github_com_grafana_loki_pkg_querier_plan.QueryPlan `protobuf:"bytes,6,opt,name=plan,proto3,customtype=github.com/grafana/loki/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` + Selector string `protobuf:"bytes,1,opt,name=selector,proto3" json:"selector,omitempty"` // Deprecated: Do not use. + Start time.Time `protobuf:"bytes,2,opt,name=start,proto3,stdtime" json:"start"` + End time.Time `protobuf:"bytes,3,opt,name=end,proto3,stdtime" json:"end"` + Shards []string `protobuf:"bytes,4,rep,name=shards,proto3" json:"shards,omitempty"` + Deletes []*Delete `protobuf:"bytes,5,rep,name=deletes,proto3" json:"deletes,omitempty"` + Plan *github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `protobuf:"bytes,6,opt,name=plan,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` } func (m *SampleQueryRequest) Reset() { *m = SampleQueryRequest{} } func (*SampleQueryRequest) ProtoMessage() {} func (*SampleQueryRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{4} + return fileDescriptor_c28a5f14f1f4c79a, []int{6} } func (m *SampleQueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -394,7 +481,7 @@ type Plan struct { func (m *Plan) Reset() { *m = Plan{} } func (*Plan) ProtoMessage() {} func (*Plan) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{5} + return fileDescriptor_c28a5f14f1f4c79a, []int{7} } func (m *Plan) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -439,7 +526,7 @@ type Delete struct { func (m *Delete) Reset() { *m = Delete{} } func (*Delete) ProtoMessage() {} func (*Delete) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{6} + return fileDescriptor_c28a5f14f1f4c79a, []int{8} } func (m *Delete) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -497,7 +584,7 @@ type QueryResponse struct { func (m *QueryResponse) Reset() { *m = QueryResponse{} } func (*QueryResponse) ProtoMessage() {} func (*QueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{7} + return fileDescriptor_c28a5f14f1f4c79a, []int{9} } func (m *QueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -541,7 +628,7 @@ type SampleQueryResponse struct { func (m *SampleQueryResponse) Reset() { *m = SampleQueryResponse{} } func (*SampleQueryResponse) ProtoMessage() {} func (*SampleQueryResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{8} + return fileDescriptor_c28a5f14f1f4c79a, []int{10} } func (m *SampleQueryResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -588,7 +675,7 @@ type LabelRequest struct { func (m *LabelRequest) Reset() { *m = LabelRequest{} } func (*LabelRequest) ProtoMessage() {} func (*LabelRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{9} + return fileDescriptor_c28a5f14f1f4c79a, []int{11} } func (m *LabelRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -659,7 +746,7 @@ type LabelResponse struct { func (m *LabelResponse) Reset() { *m = LabelResponse{} } func (*LabelResponse) ProtoMessage() {} func (*LabelResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{10} + return fileDescriptor_c28a5f14f1f4c79a, []int{12} } func (m *LabelResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -704,7 +791,7 @@ type Sample struct { func (m *Sample) Reset() { *m = Sample{} } func (*Sample) ProtoMessage() {} func (*Sample) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{11} + return fileDescriptor_c28a5f14f1f4c79a, []int{13} } func (m *Sample) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -763,7 +850,7 @@ type LegacySample struct { func (m *LegacySample) Reset() { *m = LegacySample{} } func (*LegacySample) ProtoMessage() {} func (*LegacySample) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{12} + return fileDescriptor_c28a5f14f1f4c79a, []int{14} } func (m *LegacySample) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -815,7 +902,7 @@ type Series struct { func (m *Series) Reset() { *m = Series{} } func (*Series) ProtoMessage() {} func (*Series) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{13} + return fileDescriptor_c28a5f14f1f4c79a, []int{15} } func (m *Series) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -866,17 +953,17 @@ func (m *Series) GetStreamHash() uint64 { } type TailRequest struct { - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // Deprecated: Do not use. - DelayFor uint32 `protobuf:"varint,3,opt,name=delayFor,proto3" json:"delayFor,omitempty"` - Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` - Start time.Time `protobuf:"bytes,5,opt,name=start,proto3,stdtime" json:"start"` - Plan *github_com_grafana_loki_pkg_querier_plan.QueryPlan `protobuf:"bytes,6,opt,name=plan,proto3,customtype=github.com/grafana/loki/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // Deprecated: Do not use. + DelayFor uint32 `protobuf:"varint,3,opt,name=delayFor,proto3" json:"delayFor,omitempty"` + Limit uint32 `protobuf:"varint,4,opt,name=limit,proto3" json:"limit,omitempty"` + Start time.Time `protobuf:"bytes,5,opt,name=start,proto3,stdtime" json:"start"` + Plan *github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `protobuf:"bytes,6,opt,name=plan,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` } func (m *TailRequest) Reset() { *m = TailRequest{} } func (*TailRequest) ProtoMessage() {} func (*TailRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{14} + return fileDescriptor_c28a5f14f1f4c79a, []int{16} } func (m *TailRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -942,7 +1029,7 @@ type TailResponse struct { func (m *TailResponse) Reset() { *m = TailResponse{} } func (*TailResponse) ProtoMessage() {} func (*TailResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{15} + return fileDescriptor_c28a5f14f1f4c79a, []int{17} } func (m *TailResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -988,7 +1075,7 @@ type SeriesRequest struct { func (m *SeriesRequest) Reset() { *m = SeriesRequest{} } func (*SeriesRequest) ProtoMessage() {} func (*SeriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{16} + return fileDescriptor_c28a5f14f1f4c79a, []int{18} } func (m *SeriesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1052,7 +1139,7 @@ type SeriesResponse struct { func (m *SeriesResponse) Reset() { *m = SeriesResponse{} } func (*SeriesResponse) ProtoMessage() {} func (*SeriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{17} + return fileDescriptor_c28a5f14f1f4c79a, []int{19} } func (m *SeriesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1095,7 +1182,7 @@ type SeriesIdentifier struct { func (m *SeriesIdentifier) Reset() { *m = SeriesIdentifier{} } func (*SeriesIdentifier) ProtoMessage() {} func (*SeriesIdentifier) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{18} + return fileDescriptor_c28a5f14f1f4c79a, []int{20} } func (m *SeriesIdentifier) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1139,7 +1226,7 @@ type SeriesIdentifier_LabelsEntry struct { func (m *SeriesIdentifier_LabelsEntry) Reset() { *m = SeriesIdentifier_LabelsEntry{} } func (*SeriesIdentifier_LabelsEntry) ProtoMessage() {} func (*SeriesIdentifier_LabelsEntry) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{18, 0} + return fileDescriptor_c28a5f14f1f4c79a, []int{20, 0} } func (m *SeriesIdentifier_LabelsEntry) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1191,7 +1278,7 @@ type DroppedStream struct { func (m *DroppedStream) Reset() { *m = DroppedStream{} } func (*DroppedStream) ProtoMessage() {} func (*DroppedStream) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{19} + return fileDescriptor_c28a5f14f1f4c79a, []int{21} } func (m *DroppedStream) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1249,7 +1336,7 @@ type LabelPair struct { func (m *LabelPair) Reset() { *m = LabelPair{} } func (*LabelPair) ProtoMessage() {} func (*LabelPair) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{20} + return fileDescriptor_c28a5f14f1f4c79a, []int{22} } func (m *LabelPair) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1302,7 +1389,7 @@ type LegacyLabelPair struct { func (m *LegacyLabelPair) Reset() { *m = LegacyLabelPair{} } func (*LegacyLabelPair) ProtoMessage() {} func (*LegacyLabelPair) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{21} + return fileDescriptor_c28a5f14f1f4c79a, []int{23} } func (m *LegacyLabelPair) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1352,7 +1439,7 @@ type Chunk struct { func (m *Chunk) Reset() { *m = Chunk{} } func (*Chunk) ProtoMessage() {} func (*Chunk) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{22} + return fileDescriptor_c28a5f14f1f4c79a, []int{24} } func (m *Chunk) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1394,7 +1481,7 @@ type TailersCountRequest struct { func (m *TailersCountRequest) Reset() { *m = TailersCountRequest{} } func (*TailersCountRequest) ProtoMessage() {} func (*TailersCountRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{23} + return fileDescriptor_c28a5f14f1f4c79a, []int{25} } func (m *TailersCountRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1430,7 +1517,7 @@ type TailersCountResponse struct { func (m *TailersCountResponse) Reset() { *m = TailersCountResponse{} } func (*TailersCountResponse) ProtoMessage() {} func (*TailersCountResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{24} + return fileDescriptor_c28a5f14f1f4c79a, []int{26} } func (m *TailersCountResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1475,7 +1562,7 @@ type GetChunkIDsRequest struct { func (m *GetChunkIDsRequest) Reset() { *m = GetChunkIDsRequest{} } func (*GetChunkIDsRequest) ProtoMessage() {} func (*GetChunkIDsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{25} + return fileDescriptor_c28a5f14f1f4c79a, []int{27} } func (m *GetChunkIDsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1532,7 +1619,7 @@ type GetChunkIDsResponse struct { func (m *GetChunkIDsResponse) Reset() { *m = GetChunkIDsResponse{} } func (*GetChunkIDsResponse) ProtoMessage() {} func (*GetChunkIDsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{26} + return fileDescriptor_c28a5f14f1f4c79a, []int{28} } func (m *GetChunkIDsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1585,7 +1672,7 @@ type ChunkRef struct { func (m *ChunkRef) Reset() { *m = ChunkRef{} } func (*ChunkRef) ProtoMessage() {} func (*ChunkRef) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{27} + return fileDescriptor_c28a5f14f1f4c79a, []int{29} } func (m *ChunkRef) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1646,7 +1733,7 @@ type LabelValuesForMetricNameRequest struct { func (m *LabelValuesForMetricNameRequest) Reset() { *m = LabelValuesForMetricNameRequest{} } func (*LabelValuesForMetricNameRequest) ProtoMessage() {} func (*LabelValuesForMetricNameRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{28} + return fileDescriptor_c28a5f14f1f4c79a, []int{30} } func (m *LabelValuesForMetricNameRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1705,7 +1792,7 @@ type LabelNamesForMetricNameRequest struct { func (m *LabelNamesForMetricNameRequest) Reset() { *m = LabelNamesForMetricNameRequest{} } func (*LabelNamesForMetricNameRequest) ProtoMessage() {} func (*LabelNamesForMetricNameRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{29} + return fileDescriptor_c28a5f14f1f4c79a, []int{31} } func (m *LabelNamesForMetricNameRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1749,7 +1836,7 @@ type LineFilter struct { func (m *LineFilter) Reset() { *m = LineFilter{} } func (*LineFilter) ProtoMessage() {} func (*LineFilter) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{30} + return fileDescriptor_c28a5f14f1f4c79a, []int{32} } func (m *LineFilter) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1790,14 +1877,14 @@ type GetChunkRefRequest struct { Through github_com_prometheus_common_model.Time `protobuf:"varint,2,opt,name=through,proto3,customtype=github.com/prometheus/common/model.Time" json:"through"` Matchers string `protobuf:"bytes,3,opt,name=matchers,proto3" json:"matchers,omitempty"` // TODO(salvacorts): Delete this field once the weekly release is done. - Filters []github_com_grafana_loki_pkg_logql_syntax.LineFilter `protobuf:"bytes,4,rep,name=filters,proto3,customtype=github.com/grafana/loki/pkg/logql/syntax.LineFilter" json:"filters"` - Plan github_com_grafana_loki_pkg_querier_plan.QueryPlan `protobuf:"bytes,5,opt,name=plan,proto3,customtype=github.com/grafana/loki/pkg/querier/plan.QueryPlan" json:"plan"` + Filters []github_com_grafana_loki_v3_pkg_logql_syntax.LineFilter `protobuf:"bytes,4,rep,name=filters,proto3,customtype=github.com/grafana/loki/v3/pkg/logql/syntax.LineFilter" json:"filters"` + Plan github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `protobuf:"bytes,5,opt,name=plan,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan" json:"plan"` } func (m *GetChunkRefRequest) Reset() { *m = GetChunkRefRequest{} } func (*GetChunkRefRequest) ProtoMessage() {} func (*GetChunkRefRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{31} + return fileDescriptor_c28a5f14f1f4c79a, []int{33} } func (m *GetChunkRefRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1840,7 +1927,7 @@ type GetChunkRefResponse struct { func (m *GetChunkRefResponse) Reset() { *m = GetChunkRefResponse{} } func (*GetChunkRefResponse) ProtoMessage() {} func (*GetChunkRefResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{32} + return fileDescriptor_c28a5f14f1f4c79a, []int{34} } func (m *GetChunkRefResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1885,7 +1972,7 @@ type GetSeriesRequest struct { func (m *GetSeriesRequest) Reset() { *m = GetSeriesRequest{} } func (*GetSeriesRequest) ProtoMessage() {} func (*GetSeriesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{33} + return fileDescriptor_c28a5f14f1f4c79a, []int{35} } func (m *GetSeriesRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1928,7 +2015,7 @@ type GetSeriesResponse struct { func (m *GetSeriesResponse) Reset() { *m = GetSeriesResponse{} } func (*GetSeriesResponse) ProtoMessage() {} func (*GetSeriesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{34} + return fileDescriptor_c28a5f14f1f4c79a, []int{36} } func (m *GetSeriesResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1972,7 +2059,7 @@ type IndexSeries struct { func (m *IndexSeries) Reset() { *m = IndexSeries{} } func (*IndexSeries) ProtoMessage() {} func (*IndexSeries) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{35} + return fileDescriptor_c28a5f14f1f4c79a, []int{37} } func (m *IndexSeries) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2009,7 +2096,7 @@ type QueryIndexResponse struct { func (m *QueryIndexResponse) Reset() { *m = QueryIndexResponse{} } func (*QueryIndexResponse) ProtoMessage() {} func (*QueryIndexResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{36} + return fileDescriptor_c28a5f14f1f4c79a, []int{38} } func (m *QueryIndexResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2060,7 +2147,7 @@ type Row struct { func (m *Row) Reset() { *m = Row{} } func (*Row) ProtoMessage() {} func (*Row) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{37} + return fileDescriptor_c28a5f14f1f4c79a, []int{39} } func (m *Row) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2110,7 +2197,7 @@ type QueryIndexRequest struct { func (m *QueryIndexRequest) Reset() { *m = QueryIndexRequest{} } func (*QueryIndexRequest) ProtoMessage() {} func (*QueryIndexRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{38} + return fileDescriptor_c28a5f14f1f4c79a, []int{40} } func (m *QueryIndexRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2157,7 +2244,7 @@ type IndexQuery struct { func (m *IndexQuery) Reset() { *m = IndexQuery{} } func (*IndexQuery) ProtoMessage() {} func (*IndexQuery) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{39} + return fileDescriptor_c28a5f14f1f4c79a, []int{41} } func (m *IndexQuery) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2230,7 +2317,7 @@ type IndexStatsRequest struct { func (m *IndexStatsRequest) Reset() { *m = IndexStatsRequest{} } func (*IndexStatsRequest) ProtoMessage() {} func (*IndexStatsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{40} + return fileDescriptor_c28a5f14f1f4c79a, []int{42} } func (m *IndexStatsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2276,7 +2363,7 @@ type IndexStatsResponse struct { func (m *IndexStatsResponse) Reset() { *m = IndexStatsResponse{} } func (*IndexStatsResponse) ProtoMessage() {} func (*IndexStatsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{41} + return fileDescriptor_c28a5f14f1f4c79a, []int{43} } func (m *IndexStatsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2346,7 +2433,7 @@ type VolumeRequest struct { func (m *VolumeRequest) Reset() { *m = VolumeRequest{} } func (*VolumeRequest) ProtoMessage() {} func (*VolumeRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{42} + return fileDescriptor_c28a5f14f1f4c79a, []int{44} } func (m *VolumeRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2418,7 +2505,7 @@ type VolumeResponse struct { func (m *VolumeResponse) Reset() { *m = VolumeResponse{} } func (*VolumeResponse) ProtoMessage() {} func (*VolumeResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{43} + return fileDescriptor_c28a5f14f1f4c79a, []int{45} } func (m *VolumeResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2469,7 +2556,7 @@ type Volume struct { func (m *Volume) Reset() { *m = Volume{} } func (*Volume) ProtoMessage() {} func (*Volume) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{44} + return fileDescriptor_c28a5f14f1f4c79a, []int{46} } func (m *Volume) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2513,15 +2600,18 @@ func (m *Volume) GetVolume() uint64 { } type DetectedFieldsRequest struct { - Start *time.Time `protobuf:"bytes,1,opt,name=start,proto3,stdtime" json:"start,omitempty"` - End *time.Time `protobuf:"bytes,2,opt,name=end,proto3,stdtime" json:"end,omitempty"` - Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + Start time.Time `protobuf:"bytes,1,opt,name=start,proto3,stdtime" json:"start"` + End time.Time `protobuf:"bytes,2,opt,name=end,proto3,stdtime" json:"end"` + Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"` + LineLimit uint32 `protobuf:"varint,4,opt,name=lineLimit,proto3" json:"lineLimit,omitempty"` + FieldLimit uint32 `protobuf:"varint,5,opt,name=fieldLimit,proto3" json:"fieldLimit,omitempty"` + Step int64 `protobuf:"varint,6,opt,name=step,proto3" json:"step,omitempty"` } func (m *DetectedFieldsRequest) Reset() { *m = DetectedFieldsRequest{} } func (*DetectedFieldsRequest) ProtoMessage() {} func (*DetectedFieldsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{45} + return fileDescriptor_c28a5f14f1f4c79a, []int{47} } func (m *DetectedFieldsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2550,18 +2640,18 @@ func (m *DetectedFieldsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_DetectedFieldsRequest proto.InternalMessageInfo -func (m *DetectedFieldsRequest) GetStart() *time.Time { +func (m *DetectedFieldsRequest) GetStart() time.Time { if m != nil { return m.Start } - return nil + return time.Time{} } -func (m *DetectedFieldsRequest) GetEnd() *time.Time { +func (m *DetectedFieldsRequest) GetEnd() time.Time { if m != nil { return m.End } - return nil + return time.Time{} } func (m *DetectedFieldsRequest) GetQuery() string { @@ -2571,6 +2661,27 @@ func (m *DetectedFieldsRequest) GetQuery() string { return "" } +func (m *DetectedFieldsRequest) GetLineLimit() uint32 { + if m != nil { + return m.LineLimit + } + return 0 +} + +func (m *DetectedFieldsRequest) GetFieldLimit() uint32 { + if m != nil { + return m.FieldLimit + } + return 0 +} + +func (m *DetectedFieldsRequest) GetStep() int64 { + if m != nil { + return m.Step + } + return 0 +} + type DetectedFieldsResponse struct { Fields []*DetectedField `protobuf:"bytes,1,rep,name=fields,proto3" json:"fields,omitempty"` } @@ -2578,7 +2689,7 @@ type DetectedFieldsResponse struct { func (m *DetectedFieldsResponse) Reset() { *m = DetectedFieldsResponse{} } func (*DetectedFieldsResponse) ProtoMessage() {} func (*DetectedFieldsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{46} + return fileDescriptor_c28a5f14f1f4c79a, []int{48} } func (m *DetectedFieldsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2623,7 +2734,7 @@ type DetectedField struct { func (m *DetectedField) Reset() { *m = DetectedField{} } func (*DetectedField) ProtoMessage() {} func (*DetectedField) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{47} + return fileDescriptor_c28a5f14f1f4c79a, []int{49} } func (m *DetectedField) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2682,7 +2793,7 @@ type DetectedLabelsRequest struct { func (m *DetectedLabelsRequest) Reset() { *m = DetectedLabelsRequest{} } func (*DetectedLabelsRequest) ProtoMessage() {} func (*DetectedLabelsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{48} + return fileDescriptor_c28a5f14f1f4c79a, []int{50} } func (m *DetectedLabelsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2739,7 +2850,7 @@ type DetectedLabelsResponse struct { func (m *DetectedLabelsResponse) Reset() { *m = DetectedLabelsResponse{} } func (*DetectedLabelsResponse) ProtoMessage() {} func (*DetectedLabelsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{49} + return fileDescriptor_c28a5f14f1f4c79a, []int{51} } func (m *DetectedLabelsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2776,13 +2887,14 @@ func (m *DetectedLabelsResponse) GetDetectedLabels() []*DetectedLabel { } type DetectedLabel struct { - Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + Label string `protobuf:"bytes,1,opt,name=label,proto3" json:"label,omitempty"` + Cardinality uint64 `protobuf:"varint,2,opt,name=cardinality,proto3" json:"cardinality,omitempty"` } func (m *DetectedLabel) Reset() { *m = DetectedLabel{} } func (*DetectedLabel) ProtoMessage() {} func (*DetectedLabel) Descriptor() ([]byte, []int) { - return fileDescriptor_c28a5f14f1f4c79a, []int{50} + return fileDescriptor_c28a5f14f1f4c79a, []int{52} } func (m *DetectedLabel) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -2818,8 +2930,18 @@ func (m *DetectedLabel) GetLabel() string { return "" } +func (m *DetectedLabel) GetCardinality() uint64 { + if m != nil { + return m.Cardinality + } + return 0 +} + func init() { proto.RegisterEnum("logproto.Direction", Direction_name, Direction_value) + proto.RegisterType((*LabelToValuesResponse)(nil), "logproto.LabelToValuesResponse") + proto.RegisterMapType((map[string]*UniqueLabelValues)(nil), "logproto.LabelToValuesResponse.LabelsEntry") + proto.RegisterType((*UniqueLabelValues)(nil), "logproto.UniqueLabelValues") proto.RegisterType((*StreamRatesRequest)(nil), "logproto.StreamRatesRequest") proto.RegisterType((*StreamRatesResponse)(nil), "logproto.StreamRatesResponse") proto.RegisterType((*StreamRate)(nil), "logproto.StreamRate") @@ -2877,159 +2999,167 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/logproto.proto", fileDescriptor_c28a5f14f1f4c79a) } var fileDescriptor_c28a5f14f1f4c79a = []byte{ - // 2431 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x19,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2, 0x18, 0x29, 0x01, 0xfc, 0x4a, 0x77, 0x68, - 0xcf, 0xda, 0xb9, 0xe2, 0x7a, 0x82, 0xee, 0x14, 0x09, 0xe6, 0x61, 0xb2, 0x33, 0xc7, 0x26, 0xbb, - 0xec, 0xe4, 0x21, 0xf5, 0xbf, 0x18, 0xc0, 0xae, 0x99, 0x85, 0xf4, 0x4c, 0x06, 0xff, 0xde, 0x80, - 0xb2, 0x94, 0x5c, 0xb9, 0xdd, 0x0f, 0x21, 0x27, 0x15, 0x23, 0x64, 0x7f, 0x4e, 0x70, 0x79, 0x63, - 0x92, 0xc0, 0xa2, 0x68, 0xa2, 0xf7, 0x60, 0xba, 0xe3, 0xb9, 0x83, 0x01, 0xed, 0xac, 0xab, 0x10, - 0x96, 0x4e, 0x86, 0xb0, 0x95, 0xe8, 0x3a, 0x49, 0xa0, 0xe3, 0xbf, 0x18, 0x30, 0xa5, 0xa2, 0x85, - 0xb2, 0x55, 0xa0, 0x5f, 0xe3, 0xd0, 0x29, 0x2b, 0x3d, 0x69, 0xca, 0x9a, 0x83, 0x5c, 0xd7, 0x73, - 0x87, 0x03, 0xbf, 0x9a, 0x91, 0x77, 0x53, 0xce, 0x26, 0x4b, 0x65, 0xf8, 0x1a, 0x4c, 0x6b, 0x51, - 0x0e, 0x08, 0x99, 0xb5, 0x64, 0xc8, 0x5c, 0xed, 0x50, 0x87, 0xd9, 0x9b, 0x76, 0x10, 0x04, 0x15, - 0x3e, 0xfe, 0x99, 0x01, 0x33, 0x49, 0x14, 0xb4, 0x12, 0xb9, 0x67, 0x9c, 0xdc, 0xe9, 0x83, 0xc9, - 0x2d, 0x8a, 0xe0, 0xe3, 0xbf, 0xef, 0x30, 0x6f, 0x47, 0x93, 0x96, 0x7b, 0x6b, 0x6f, 0x43, 0x29, - 0xb2, 0xc8, 0x53, 0xd4, 0x36, 0x55, 0x37, 0x83, 0xf0, 0x61, 0x18, 0x12, 0xd2, 0x32, 0xa0, 0x89, - 0x09, 0xfe,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, 0x09, 0xe8, 0xf5, 0xa0, 0xe2, 0x09, 0xe6, 0xe8, 0x14, 0x98, - 0x9e, 0xfb, 0x50, 0x57, 0xb0, 0x53, 0xe1, 0x91, 0xc4, 0x7d, 0x48, 0xc4, 0x12, 0xbe, 0x04, 0x19, - 0xe2, 0x3e, 0x44, 0x75, 0x00, 0xcf, 0x72, 0xba, 0xf4, 0x6e, 0xd0, 0x38, 0x95, 0x49, 0x04, 0x72, - 0x40, 0xc9, 0xb0, 0x0c, 0x47, 0xa3, 0x1c, 0x49, 0x73, 0x2f, 0x42, 0xfe, 0xc3, 0x61, 0x54, 0x5d, - 0x95, 0x84, 0xba, 0x64, 0x0f, 0xae, 0x91, 0xb8, 0xcf, 0x40, 0x08, 0x47, 0x27, 0xa0, 0xc8, 0xac, - 0x8d, 0x1e, 0xbd, 0x19, 0x06, 0xb8, 0x10, 0xc0, 0x57, 0x79, 0xcf, 0x77, 0x37, 0x52, 0xfb, 0x84, - 0x00, 0x74, 0x06, 0x66, 0x42, 0x9e, 0x6f, 0x7b, 0x74, 0xd3, 0x7e, 0x24, 0x2c, 0x5c, 0x26, 0xfb, - 0xe0, 0x68, 0x01, 0x8e, 0x84, 0xb0, 0x75, 0x51, 0x63, 0x98, 0x02, 0x35, 0x09, 0xe6, 0xba, 0x11, - 0xe2, 0xbe, 0xff, 0x60, 0x68, 0xf5, 0xc4, 0xcd, 0x2b, 0x93, 0x08, 0x04, 0xff, 0xc9, 0x80, 0xa3, - 0xd2, 0xd4, 0xbc, 0xdb, 0x7f, 0x19, 0xbd, 0xfe, 0x33, 0x03, 0x50, 0x54, 0x02, 0xe5, 0x5a, 0xaf, - 0x45, 0x9f, 0x71, 0x78, 0x11, 0x53, 0x12, 0xad, 0xac, 0x04, 0x85, 0x2f, 0x31, 0x18, 0x72, 0xa2, - 0x10, 0x92, 0x3d, 0xb5, 0x29, 0x7b, 0x65, 0x09, 0x21, 0xea, 0xcb, 0x5b, 0xfc, 0x8d, 0x1d, 0x46,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 0xbf, 0xef, 0xd6, 0x53, 0x5f, 0xed, 0xd6, 0x8d, 0x4f, 0x9f, 0xd5, 0x53, 0x4f, 0x9e, 0xd5, - 0x53, 0x5f, 0x3c, 0xab, 0xa7, 0xee, 0xbd, 0xfa, 0x6f, 0x7a, 0x25, 0x19, 0x6a, 0x72, 0xe2, 0x73, - 0xfe, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa2, 0x75, 0x76, 0x03, 0x96, 0x1f, 0x00, 0x00, + // 2556 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x39, 0xcb, 0x6f, 0x1b, 0xc7, + 0xf9, 0x5c, 0x72, 0xf9, 0xfa, 0x48, 0xc9, 0xd2, 0x88, 0x96, 0x09, 0xda, 0x21, 0x95, 0xc1, 0xef, + 0x97, 0xa8, 0xb1, 0x23, 0xc6, 0x72, 0xed, 0x3a, 0x76, 0xdd, 0xd4, 0x94, 0x62, 0x45, 0xb6, 0xfc, + 0xc8, 0x48, 0x71, 0xd2, 0xa2, 0x86, 0xb1, 0x22, 0x47, 0xd4, 0xc2, 0xe4, 0x2e, 0xbd, 0x3b, 0xb4, + 0x4d, 0xa0, 0x87, 0xfe, 0x03, 0x45, 0x03, 0xf4, 0x50, 0xf4, 0x52, 0xb4, 0x40, 0x81, 0x16, 0x29, + 0x7a, 0x29, 0x7a, 0x6e, 0x2f, 0x3d, 0xb8, 0x37, 0xf7, 0x16, 0xe4, 0xc0, 0xd6, 0xf2, 0xa5, 0xd0, + 0x29, 0x40, 0x6f, 0x39, 0x15, 0xf3, 0xd8, 0xa7, 0xc8, 0x3a, 0x54, 0x1c, 0x04, 0xbe, 0x90, 0x33, + 0xdf, 0x7c, 0xf3, 0xcd, 0x7c, 0x8f, 0xf9, 0x5e, 0x0b, 0xc7, 0x7b, 0xf7, 0xda, 0xf5, 0x8e, 0xdd, + 0xee, 0x39, 0x36, 0xb3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, 0x23, 0xd8, 0x93, 0x21, 0x35, 0xd2, 0x4f, 0x09, 0x78, 0x6f, + 0x7c, 0x4f, 0x1d, 0x7e, 0xee, 0x39, 0x19, 0x91, 0xe8, 0x72, 0xd5, 0xdd, 0x81, 0xc5, 0x8c, 0x47, + 0xa1, 0xfd, 0xc4, 0x3b, 0x04, 0x19, 0x2a, 0xe9, 0x4a, 0x8f, 0x4c, 0xba, 0x2e, 0xa9, 0x63, 0xbe, + 0x52, 0xf1, 0x78, 0x29, 0xf0, 0x80, 0x42, 0x29, 0xca, 0x03, 0xbe, 0x06, 0xba, 0x43, 0x77, 0xbc, + 0x50, 0x8d, 0x82, 0x93, 0x7d, 0x4c, 0xb1, 0x8e, 0xff, 0xa2, 0xc1, 0xcc, 0x1a, 0x65, 0xd1, 0x24, + 0xe8, 0x25, 0x52, 0x29, 0x7e, 0x0f, 0x66, 0x43, 0xf7, 0x57, 0xdc, 0x9f, 0x89, 0x65, 0x3e, 0x47, + 0x03, 0xfe, 0xd7, 0xad, 0x16, 0x7d, 0xa4, 0x8a, 0xc6, 0x68, 0xd2, 0x73, 0x0b, 0x0a, 0xa1, 0x45, + 0x74, 0x39, 0x96, 0xee, 0xcc, 0xc5, 0xda, 0x8e, 0x3c, 0x64, 0x37, 0x4a, 0x8a, 0x27, 0x59, 0x36, + 0xaa, 0x64, 0xd6, 0x4f, 0x0d, 0x36, 0x01, 0x09, 0x75, 0x09, 0xb2, 0xe1, 0xe0, 0x24, 0xa0, 0xd7, + 0xfc, 0xbc, 0xc7, 0x9f, 0xa3, 0x57, 0x41, 0x77, 0xec, 0x87, 0x5e, 0x1e, 0x3b, 0x15, 0x1c, 0x49, + 0xec, 0x87, 0x44, 0x2c, 0xe1, 0x8b, 0x90, 0x22, 0xf6, 0x43, 0x54, 0x05, 0x70, 0x0c, 0xab, 0x4d, + 0x6f, 0xfb, 0x15, 0x54, 0x91, 0x84, 0x20, 0x63, 0x12, 0x87, 0x15, 0x98, 0x0d, 0xdf, 0x48, 0xaa, + 0x7b, 0x09, 0xb2, 0xef, 0xf7, 0xc3, 0xe2, 0x2a, 0xc5, 0xc4, 0x25, 0x8b, 0x71, 0x0f, 0x89, 0xdb, + 0x0c, 0x04, 0x70, 0x74, 0x02, 0xf2, 0xcc, 0xd8, 0xee, 0xd0, 0x1b, 0x81, 0x9b, 0x0b, 0x00, 0x7c, + 0x95, 0x17, 0x7f, 0xb7, 0x43, 0x19, 0x50, 0x00, 0x40, 0x6f, 0xc0, 0x4c, 0x70, 0xe7, 0x5b, 0x0e, + 0xdd, 0x31, 0x1f, 0x09, 0x0d, 0x17, 0xc9, 0x01, 0x38, 0x5a, 0x84, 0x23, 0x01, 0x6c, 0x53, 0x64, + 0x1a, 0xba, 0x40, 0x8d, 0x83, 0xb9, 0x6c, 0x04, 0xbb, 0xef, 0xde, 0xef, 0x1b, 0x1d, 0xf1, 0xf8, + 0x8a, 0x24, 0x04, 0xc1, 0x7f, 0xd5, 0x60, 0x56, 0xaa, 0x9a, 0x97, 0xfd, 0x2f, 0xa3, 0xd5, 0xff, + 0x4e, 0x03, 0x14, 0xe6, 0x40, 0x99, 0xd6, 0xff, 0x87, 0xfb, 0x39, 0x3c, 0x95, 0x29, 0x88, 0x9a, + 0x56, 0x82, 0x82, 0x96, 0x0c, 0x86, 0x8c, 0x48, 0x87, 0x64, 0x71, 0xad, 0xcb, 0xa2, 0x59, 0x42, + 0x88, 0xfa, 0xe7, 0xb5, 0xfe, 0xf6, 0x80, 0x51, 0x57, 0x95, 0xbc, 0xa2, 0xd6, 0x17, 0x00, 0x22, + 0xff, 0xf8, 0x59, 0xd4, 0x62, 0xc2, 0x6a, 0xf4, 0xe0, 0x2c, 0x05, 0x22, 0xde, 0x00, 0xff, 0x21, + 0x09, 0x53, 0xb7, 0xed, 0x4e, 0x3f, 0x08, 0x8c, 0x2f, 0x53, 0xc0, 0x88, 0xd4, 0xe1, 0x69, 0xaf, + 0x0e, 0x47, 0xa0, 0xbb, 0x8c, 0xf6, 0x84, 0x65, 0xa5, 0x88, 0x18, 0x23, 0x0c, 0x45, 0x66, 0x38, + 0x6d, 0xca, 0x64, 0x75, 0x53, 0xce, 0x88, 0xb4, 0x33, 0x02, 0x43, 0x0b, 0x50, 0x30, 0xda, 0x6d, + 0x87, 0xb6, 0x0d, 0x46, 0x1b, 0x83, 0x72, 0x56, 0x1c, 0x16, 0x06, 0xe1, 0x8f, 0x60, 0xda, 0x13, + 0x96, 0x52, 0xe9, 0x5b, 0x90, 0x7d, 0x20, 0x20, 0x23, 0x7a, 0x5f, 0x12, 0x55, 0xb9, 0x31, 0x0f, + 0x2d, 0xda, 0x2e, 0xf7, 0xee, 0x8c, 0xaf, 0x42, 0x46, 0xa2, 0xa3, 0x13, 0xe1, 0x1a, 0x45, 0x36, + 0x69, 0xf8, 0x5c, 0x15, 0x1c, 0x18, 0x32, 0x92, 0x90, 0x52, 0xbc, 0xb0, 0x0d, 0x09, 0x21, 0xea, + 0x1f, 0xff, 0x47, 0x83, 0xa3, 0xab, 0x94, 0xd1, 0x26, 0xa3, 0xad, 0x2b, 0x26, 0xed, 0xb4, 0xbe, + 0xd1, 0xf2, 0xd9, 0x6f, 0x82, 0xa5, 0x42, 0x4d, 0x30, 0xee, 0x77, 0x3a, 0xa6, 0x45, 0x37, 0x42, + 0x5d, 0x94, 0x00, 0xc0, 0x3d, 0xc4, 0x0e, 0xbf, 0xb8, 0x5c, 0x96, 0xdf, 0x27, 0x42, 0x10, 0x5f, + 0xc3, 0x99, 0x40, 0xc3, 0x78, 0x1d, 0xe6, 0xe3, 0x4c, 0x2b, 0x1d, 0xd5, 0x21, 0x23, 0xf6, 0x8e, + 0xe8, 0xa2, 0x46, 0x76, 0x10, 0x85, 0x86, 0x1d, 0x98, 0x8a, 0x2c, 0x08, 0x9d, 0x71, 0x1b, 0x51, + 0xfe, 0x53, 0x4e, 0xd0, 0xb7, 0x40, 0x67, 0x83, 0x9e, 0x72, 0x9b, 0x8d, 0xa3, 0x5f, 0x0c, 0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b, 0xaf, 0xaa, 0xfd, 0x7b, + 0xaf, 0x9a, 0xf8, 0x7c, 0xaf, 0xaa, 0x7d, 0xfc, 0xac, 0x9a, 0x78, 0xf2, 0xac, 0x9a, 0xf8, 0xf4, + 0x59, 0x35, 0xf1, 0xc3, 0xd7, 0x9f, 0x5f, 0xfe, 0x49, 0x47, 0x97, 0x11, 0x7f, 0x67, 0xfe, 0x1b, + 0x00, 0x00, 0xff, 0xff, 0xb1, 0x2e, 0x00, 0xb2, 0x59, 0x21, 0x00, 0x00, } func (x Direction) String() string { @@ -3039,6 +3169,64 @@ func (x Direction) String() string { } return strconv.Itoa(int(x)) } +func (this *LabelToValuesResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*LabelToValuesResponse) + if !ok { + that2, ok := that.(LabelToValuesResponse) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Labels) != len(that1.Labels) { + return false + } + for i := range this.Labels { + if !this.Labels[i].Equal(that1.Labels[i]) { + return false + } + } + return true +} +func (this *UniqueLabelValues) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*UniqueLabelValues) + if !ok { + that2, ok := that.(UniqueLabelValues) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Values) != len(that1.Values) { + return false + } + for i := range this.Values { + if this.Values[i] != that1.Values[i] { + return false + } + } + return true +} func (this *StreamRatesRequest) Equal(that interface{}) bool { if that == nil { return this == nil @@ -4532,28 +4720,29 @@ func (this *DetectedFieldsRequest) Equal(that interface{}) bool { } else if this == nil { return false } - if that1.Start == nil { - if this.Start != nil { - return false - } - } else if !this.Start.Equal(*that1.Start) { + if !this.Start.Equal(that1.Start) { return false } - if that1.End == nil { - if this.End != nil { - return false - } - } else if !this.End.Equal(*that1.End) { + if !this.End.Equal(that1.End) { return false } if this.Query != that1.Query { return false } - return true -} -func (this *DetectedFieldsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil + if this.LineLimit != that1.LineLimit { + return false + } + if this.FieldLimit != that1.FieldLimit { + return false + } + if this.Step != that1.Step { + return false + } + return true +} +func (this *DetectedFieldsResponse) Equal(that interface{}) bool { + if that == nil { + return this == nil } that1, ok := that.(*DetectedFieldsResponse) @@ -4699,8 +4888,43 @@ func (this *DetectedLabel) Equal(that interface{}) bool { if this.Label != that1.Label { return false } + if this.Cardinality != that1.Cardinality { + return false + } return true } +func (this *LabelToValuesResponse) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&logproto.LabelToValuesResponse{") + keysForLabels := make([]string, 0, len(this.Labels)) + for k, _ := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]*UniqueLabelValues{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%#v: %#v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + if this.Labels != nil { + s = append(s, "Labels: "+mapStringForLabels+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UniqueLabelValues) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&logproto.UniqueLabelValues{") + s = append(s, "Values: "+fmt.Sprintf("%#v", this.Values)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} func (this *StreamRatesRequest) GoString() string { if this == nil { return "nil" @@ -5286,11 +5510,14 @@ func (this *DetectedFieldsRequest) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 7) + s := make([]string, 0, 10) s = append(s, "&logproto.DetectedFieldsRequest{") s = append(s, "Start: "+fmt.Sprintf("%#v", this.Start)+",\n") s = append(s, "End: "+fmt.Sprintf("%#v", this.End)+",\n") s = append(s, "Query: "+fmt.Sprintf("%#v", this.Query)+",\n") + s = append(s, "LineLimit: "+fmt.Sprintf("%#v", this.LineLimit)+",\n") + s = append(s, "FieldLimit: "+fmt.Sprintf("%#v", this.FieldLimit)+",\n") + s = append(s, "Step: "+fmt.Sprintf("%#v", this.Step)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -5346,9 +5573,10 @@ func (this *DetectedLabel) GoString() string { if this == nil { return "nil" } - s := make([]string, 0, 5) + s := make([]string, 0, 6) s = append(s, "&logproto.DetectedLabel{") s = append(s, "Label: "+fmt.Sprintf("%#v", this.Label)+",\n") + s = append(s, "Cardinality: "+fmt.Sprintf("%#v", this.Cardinality)+",\n") s = append(s, "}") return strings.Join(s, "") } @@ -5387,6 +5615,7 @@ type QuerierClient interface { // indexgateway.proto on the IndexGateway service. GetVolume(ctx context.Context, in *VolumeRequest, opts ...grpc.CallOption) (*VolumeResponse, error) GetDetectedFields(ctx context.Context, in *DetectedFieldsRequest, opts ...grpc.CallOption) (*DetectedFieldsResponse, error) + GetDetectedLabels(ctx context.Context, in *DetectedLabelsRequest, opts ...grpc.CallOption) (*LabelToValuesResponse, error) } type querierClient struct { @@ -5556,6 +5785,15 @@ func (c *querierClient) GetDetectedFields(ctx context.Context, in *DetectedField return out, nil } +func (c *querierClient) GetDetectedLabels(ctx context.Context, in *DetectedLabelsRequest, opts ...grpc.CallOption) (*LabelToValuesResponse, error) { + out := new(LabelToValuesResponse) + err := c.cc.Invoke(ctx, "/logproto.Querier/GetDetectedLabels", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QuerierServer is the server API for Querier service. type QuerierServer interface { Query(*QueryRequest, Querier_QueryServer) error @@ -5572,6 +5810,7 @@ type QuerierServer interface { // indexgateway.proto on the IndexGateway service. GetVolume(context.Context, *VolumeRequest) (*VolumeResponse, error) GetDetectedFields(context.Context, *DetectedFieldsRequest) (*DetectedFieldsResponse, error) + GetDetectedLabels(context.Context, *DetectedLabelsRequest) (*LabelToValuesResponse, error) } // UnimplementedQuerierServer can be embedded to have forward compatible implementations. @@ -5608,6 +5847,9 @@ func (*UnimplementedQuerierServer) GetVolume(ctx context.Context, req *VolumeReq func (*UnimplementedQuerierServer) GetDetectedFields(ctx context.Context, req *DetectedFieldsRequest) (*DetectedFieldsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetDetectedFields not implemented") } +func (*UnimplementedQuerierServer) GetDetectedLabels(ctx context.Context, req *DetectedLabelsRequest) (*LabelToValuesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetDetectedLabels not implemented") +} func RegisterQuerierServer(s *grpc.Server, srv QuerierServer) { s.RegisterService(&_Querier_serviceDesc, srv) @@ -5802,6 +6044,24 @@ func _Querier_GetDetectedFields_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Querier_GetDetectedLabels_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(DetectedLabelsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QuerierServer).GetDetectedLabels(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/logproto.Querier/GetDetectedLabels", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QuerierServer).GetDetectedLabels(ctx, req.(*DetectedLabelsRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Querier_serviceDesc = grpc.ServiceDesc{ ServiceName: "logproto.Querier", HandlerType: (*QuerierServer)(nil), @@ -5834,6 +6094,10 @@ var _Querier_serviceDesc = grpc.ServiceDesc{ MethodName: "GetDetectedFields", Handler: _Querier_GetDetectedFields_Handler, }, + { + MethodName: "GetDetectedLabels", + Handler: _Querier_GetDetectedLabels_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -5927,6 +6191,87 @@ var _StreamData_serviceDesc = grpc.ServiceDesc{ Metadata: "pkg/logproto/logproto.proto", } +func (m *LabelToValuesResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LabelToValuesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *LabelToValuesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Labels) > 0 { + for k := range m.Labels { + v := m.Labels[k] + baseI := i + if v != nil { + { + size, err := v.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintLogproto(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintLogproto(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintLogproto(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *UniqueLabelValues) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UniqueLabelValues) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *UniqueLabelValues) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Values) > 0 { + for iNdEx := len(m.Values) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Values[iNdEx]) + copy(dAtA[i:], m.Values[iNdEx]) + i = encodeVarintLogproto(dAtA, i, uint64(len(m.Values[iNdEx]))) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func (m *StreamRatesRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -6097,21 +6442,21 @@ func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x28 } - n2, err2 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) - if err2 != nil { - return 0, err2 - } - i -= n2 - i = encodeVarintLogproto(dAtA, i, uint64(n2)) - i-- - dAtA[i] = 0x22 - n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + n3, err3 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) if err3 != nil { return 0, err3 } i -= n3 i = encodeVarintLogproto(dAtA, i, uint64(n3)) i-- + dAtA[i] = 0x22 + n4, err4 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + if err4 != nil { + return 0, err4 + } + i -= n4 + i = encodeVarintLogproto(dAtA, i, uint64(n4)) + i-- dAtA[i] = 0x1a if m.Limit != 0 { i = encodeVarintLogproto(dAtA, i, uint64(m.Limit)) @@ -6183,21 +6528,21 @@ func (m *SampleQueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x22 } } - n5, err5 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) - if err5 != nil { - return 0, err5 - } - i -= n5 - i = encodeVarintLogproto(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x1a - n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + n6, err6 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) if err6 != nil { return 0, err6 } i -= n6 i = encodeVarintLogproto(dAtA, i, uint64(n6)) i-- + dAtA[i] = 0x1a + n7, err7 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + if err7 != nil { + return 0, err7 + } + i -= n7 + i = encodeVarintLogproto(dAtA, i, uint64(n7)) + i-- dAtA[i] = 0x12 if len(m.Selector) > 0 { i -= len(m.Selector) @@ -6401,22 +6746,22 @@ func (m *LabelRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } if m.End != nil { - n9, err9 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.End):]) - if err9 != nil { - return 0, err9 + n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.End):]) + if err10 != nil { + return 0, err10 } - i -= n9 - i = encodeVarintLogproto(dAtA, i, uint64(n9)) + i -= n10 + i = encodeVarintLogproto(dAtA, i, uint64(n10)) i-- dAtA[i] = 0x22 } if m.Start != nil { - n10, err10 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start):]) - if err10 != nil { - return 0, err10 + n11, err11 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start):]) + if err11 != nil { + return 0, err11 } - i -= n10 - i = encodeVarintLogproto(dAtA, i, uint64(n10)) + i -= n11 + i = encodeVarintLogproto(dAtA, i, uint64(n11)) i-- dAtA[i] = 0x1a } @@ -6626,12 +6971,12 @@ func (m *TailRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x32 } - n12, err12 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) - if err12 != nil { - return 0, err12 + n13, err13 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + if err13 != nil { + return 0, err13 } - i -= n12 - i = encodeVarintLogproto(dAtA, i, uint64(n12)) + i -= n13 + i = encodeVarintLogproto(dAtA, i, uint64(n13)) i-- dAtA[i] = 0x2a if m.Limit != 0 { @@ -6741,21 +7086,21 @@ func (m *SeriesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } } - n14, err14 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) - if err14 != nil { - return 0, err14 - } - i -= n14 - i = encodeVarintLogproto(dAtA, i, uint64(n14)) - i-- - dAtA[i] = 0x12 - n15, err15 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + n15, err15 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) if err15 != nil { return 0, err15 } i -= n15 i = encodeVarintLogproto(dAtA, i, uint64(n15)) i-- + dAtA[i] = 0x12 + n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + if err16 != nil { + return 0, err16 + } + i -= n16 + i = encodeVarintLogproto(dAtA, i, uint64(n16)) + i-- dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -6898,21 +7243,21 @@ func (m *DroppedStream) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - n16, err16 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.To, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.To):]) - if err16 != nil { - return 0, err16 - } - i -= n16 - i = encodeVarintLogproto(dAtA, i, uint64(n16)) - i-- - dAtA[i] = 0x12 - n17, err17 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.From, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.From):]) + n17, err17 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.To, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.To):]) if err17 != nil { return 0, err17 } i -= n17 i = encodeVarintLogproto(dAtA, i, uint64(n17)) i-- + dAtA[i] = 0x12 + n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.From, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.From):]) + if err18 != nil { + return 0, err18 + } + i -= n18 + i = encodeVarintLogproto(dAtA, i, uint64(n18)) + i-- dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -7092,21 +7437,21 @@ func (m *GetChunkIDsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - n18, err18 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) - if err18 != nil { - return 0, err18 - } - i -= n18 - i = encodeVarintLogproto(dAtA, i, uint64(n18)) - i-- - dAtA[i] = 0x1a - n19, err19 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + n19, err19 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) if err19 != nil { return 0, err19 } i -= n19 i = encodeVarintLogproto(dAtA, i, uint64(n19)) i-- + dAtA[i] = 0x1a + n20, err20 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + if err20 != nil { + return 0, err20 + } + i -= n20 + i = encodeVarintLogproto(dAtA, i, uint64(n20)) + i-- dAtA[i] = 0x12 if len(m.Matchers) > 0 { i -= len(m.Matchers) @@ -7961,6 +8306,21 @@ func (m *DetectedFieldsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Step != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.Step)) + i-- + dAtA[i] = 0x30 + } + if m.FieldLimit != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.FieldLimit)) + i-- + dAtA[i] = 0x28 + } + if m.LineLimit != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.LineLimit)) + i-- + dAtA[i] = 0x20 + } if len(m.Query) > 0 { i -= len(m.Query) copy(dAtA[i:], m.Query) @@ -7968,26 +8328,22 @@ func (m *DetectedFieldsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if m.End != nil { - n21, err21 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.End):]) - if err21 != nil { - return 0, err21 - } - i -= n21 - i = encodeVarintLogproto(dAtA, i, uint64(n21)) - i-- - dAtA[i] = 0x12 + n22, err22 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.End):]) + if err22 != nil { + return 0, err22 } - if m.Start != nil { - n22, err22 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start):]) - if err22 != nil { - return 0, err22 - } - i -= n22 - i = encodeVarintLogproto(dAtA, i, uint64(n22)) - i-- - dAtA[i] = 0xa + i -= n22 + i = encodeVarintLogproto(dAtA, i, uint64(n22)) + i-- + dAtA[i] = 0x12 + n23, err23 := github_com_gogo_protobuf_types.StdTimeMarshalTo(m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(m.Start):]) + if err23 != nil { + return 0, err23 } + i -= n23 + i = encodeVarintLogproto(dAtA, i, uint64(n23)) + i-- + dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -8098,22 +8454,22 @@ func (m *DetectedLabelsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x1a } if m.End != nil { - n23, err23 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.End):]) - if err23 != nil { - return 0, err23 + n24, err24 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.End, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.End):]) + if err24 != nil { + return 0, err24 } - i -= n23 - i = encodeVarintLogproto(dAtA, i, uint64(n23)) + i -= n24 + i = encodeVarintLogproto(dAtA, i, uint64(n24)) i-- dAtA[i] = 0x12 } if m.Start != nil { - n24, err24 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start):]) - if err24 != nil { - return 0, err24 + n25, err25 := github_com_gogo_protobuf_types.StdTimeMarshalTo(*m.Start, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start):]) + if err25 != nil { + return 0, err25 } - i -= n24 - i = encodeVarintLogproto(dAtA, i, uint64(n24)) + i -= n25 + i = encodeVarintLogproto(dAtA, i, uint64(n25)) i-- dAtA[i] = 0xa } @@ -8177,6 +8533,11 @@ func (m *DetectedLabel) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Cardinality != 0 { + i = encodeVarintLogproto(dAtA, i, uint64(m.Cardinality)) + i-- + dAtA[i] = 0x10 + } if len(m.Label) > 0 { i -= len(m.Label) copy(dAtA[i:], m.Label) @@ -8198,6 +8559,43 @@ func encodeVarintLogproto(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } +func (m *LabelToValuesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Labels) > 0 { + for k, v := range m.Labels { + _ = k + _ = v + l = 0 + if v != nil { + l = v.Size() + l += 1 + sovLogproto(uint64(l)) + } + mapEntrySize := 1 + len(k) + sovLogproto(uint64(len(k))) + l + n += mapEntrySize + 1 + sovLogproto(uint64(mapEntrySize)) + } + } + return n +} + +func (m *UniqueLabelValues) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Values) > 0 { + for _, s := range m.Values { + l = len(s) + n += 1 + l + sovLogproto(uint64(l)) + } + } + return n +} + func (m *StreamRatesRequest) Size() (n int) { if m == nil { return 0 @@ -9086,18 +9484,23 @@ func (m *DetectedFieldsRequest) Size() (n int) { } var l int _ = l - if m.Start != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.Start) - n += 1 + l + sovLogproto(uint64(l)) - } - if m.End != nil { - l = github_com_gogo_protobuf_types.SizeOfStdTime(*m.End) - n += 1 + l + sovLogproto(uint64(l)) - } + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.Start) + n += 1 + l + sovLogproto(uint64(l)) + l = github_com_gogo_protobuf_types.SizeOfStdTime(m.End) + n += 1 + l + sovLogproto(uint64(l)) l = len(m.Query) if l > 0 { n += 1 + l + sovLogproto(uint64(l)) } + if m.LineLimit != 0 { + n += 1 + sovLogproto(uint64(m.LineLimit)) + } + if m.FieldLimit != 0 { + n += 1 + sovLogproto(uint64(m.FieldLimit)) + } + if m.Step != 0 { + n += 1 + sovLogproto(uint64(m.Step)) + } return n } @@ -9182,6 +9585,9 @@ func (m *DetectedLabel) Size() (n int) { if l > 0 { n += 1 + l + sovLogproto(uint64(l)) } + if m.Cardinality != 0 { + n += 1 + sovLogproto(uint64(m.Cardinality)) + } return n } @@ -9191,6 +9597,36 @@ func sovLogproto(x uint64) (n int) { func sozLogproto(x uint64) (n int) { return sovLogproto(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } +func (this *LabelToValuesResponse) String() string { + if this == nil { + return "nil" + } + keysForLabels := make([]string, 0, len(this.Labels)) + for k, _ := range this.Labels { + keysForLabels = append(keysForLabels, k) + } + github_com_gogo_protobuf_sortkeys.Strings(keysForLabels) + mapStringForLabels := "map[string]*UniqueLabelValues{" + for _, k := range keysForLabels { + mapStringForLabels += fmt.Sprintf("%v: %v,", k, this.Labels[k]) + } + mapStringForLabels += "}" + s := strings.Join([]string{`&LabelToValuesResponse{`, + `Labels:` + mapStringForLabels + `,`, + `}`, + }, "") + return s +} +func (this *UniqueLabelValues) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UniqueLabelValues{`, + `Values:` + fmt.Sprintf("%v", this.Values) + `,`, + `}`, + }, "") + return s +} func (this *StreamRatesRequest) String() string { if this == nil { return "nil" @@ -9793,9 +10229,12 @@ func (this *DetectedFieldsRequest) String() string { return "nil" } s := strings.Join([]string{`&DetectedFieldsRequest{`, - `Start:` + strings.Replace(fmt.Sprintf("%v", this.Start), "Timestamp", "types.Timestamp", 1) + `,`, - `End:` + strings.Replace(fmt.Sprintf("%v", this.End), "Timestamp", "types.Timestamp", 1) + `,`, + `Start:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Start), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, + `End:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.End), "Timestamp", "types.Timestamp", 1), `&`, ``, 1) + `,`, `Query:` + fmt.Sprintf("%v", this.Query) + `,`, + `LineLimit:` + fmt.Sprintf("%v", this.LineLimit) + `,`, + `FieldLimit:` + fmt.Sprintf("%v", this.FieldLimit) + `,`, + `Step:` + fmt.Sprintf("%v", this.Step) + `,`, `}`, }, "") return s @@ -9843,34 +10282,302 @@ func (this *DetectedLabelsResponse) String() string { if this == nil { return "nil" } - repeatedStringForDetectedLabels := "[]*DetectedLabel{" - for _, f := range this.DetectedLabels { - repeatedStringForDetectedLabels += strings.Replace(f.String(), "DetectedLabel", "DetectedLabel", 1) + "," + repeatedStringForDetectedLabels := "[]*DetectedLabel{" + for _, f := range this.DetectedLabels { + repeatedStringForDetectedLabels += strings.Replace(f.String(), "DetectedLabel", "DetectedLabel", 1) + "," + } + repeatedStringForDetectedLabels += "}" + s := strings.Join([]string{`&DetectedLabelsResponse{`, + `DetectedLabels:` + repeatedStringForDetectedLabels + `,`, + `}`, + }, "") + return s +} +func (this *DetectedLabel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DetectedLabel{`, + `Label:` + fmt.Sprintf("%v", this.Label) + `,`, + `Cardinality:` + fmt.Sprintf("%v", this.Cardinality) + `,`, + `}`, + }, "") + return s +} +func valueToStringLogproto(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *LabelToValuesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LabelToValuesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LabelToValuesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthLogproto + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthLogproto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = make(map[string]*UniqueLabelValues) + } + var mapkey string + var mapvalue *UniqueLabelValues + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthLogproto + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthLogproto + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapmsglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapmsglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if mapmsglen < 0 { + return ErrInvalidLengthLogproto + } + postmsgIndex := iNdEx + mapmsglen + if postmsgIndex < 0 { + return ErrInvalidLengthLogproto + } + if postmsgIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = &UniqueLabelValues{} + if err := mapvalue.Unmarshal(dAtA[iNdEx:postmsgIndex]); err != nil { + return err + } + iNdEx = postmsgIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipLogproto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLogproto + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Labels[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLogproto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLogproto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthLogproto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF } - repeatedStringForDetectedLabels += "}" - s := strings.Join([]string{`&DetectedLabelsResponse{`, - `DetectedLabels:` + repeatedStringForDetectedLabels + `,`, - `}`, - }, "") - return s + return nil } -func (this *DetectedLabel) String() string { - if this == nil { - return "nil" +func (m *UniqueLabelValues) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UniqueLabelValues: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UniqueLabelValues: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Values", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthLogproto + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthLogproto + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Values = append(m.Values, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipLogproto(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthLogproto + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthLogproto + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } } - s := strings.Join([]string{`&DetectedLabel{`, - `Label:` + fmt.Sprintf("%v", this.Label) + `,`, - `}`, - }, "") - return s -} -func valueToStringLogproto(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" + + if iNdEx > l { + return io.ErrUnexpectedEOF } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) + return nil } func (m *StreamRatesRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -10434,7 +11141,7 @@ func (m *QueryRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Plan == nil { - m.Plan = &github_com_grafana_loki_pkg_querier_plan.QueryPlan{} + m.Plan = &github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan{} } if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -10687,7 +11394,7 @@ func (m *SampleQueryRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Plan == nil { - m.Plan = &github_com_grafana_loki_pkg_querier_plan.QueryPlan{} + m.Plan = &github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan{} } if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -11946,7 +12653,7 @@ func (m *TailRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Plan == nil { - m.Plan = &github_com_grafana_loki_pkg_querier_plan.QueryPlan{} + m.Plan = &github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan{} } if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -14096,7 +14803,7 @@ func (m *GetChunkRefRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Filters = append(m.Filters, github_com_grafana_loki_pkg_logql_syntax.LineFilter{}) + m.Filters = append(m.Filters, github_com_grafana_loki_v3_pkg_logql_syntax.LineFilter{}) if err := m.Filters[len(m.Filters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -15833,10 +16540,7 @@ func (m *DetectedFieldsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Start == nil { - m.Start = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.Start, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.Start, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -15869,10 +16573,7 @@ func (m *DetectedFieldsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.End == nil { - m.End = new(time.Time) - } - if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(m.End, dAtA[iNdEx:postIndex]); err != nil { + if err := github_com_gogo_protobuf_types.StdTimeUnmarshal(&m.End, dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -15908,6 +16609,63 @@ func (m *DetectedFieldsRequest) Unmarshal(dAtA []byte) error { } m.Query = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LineLimit", wireType) + } + m.LineLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.LineLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FieldLimit", wireType) + } + m.FieldLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FieldLimit |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Step", wireType) + } + m.Step = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Step |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipLogproto(dAtA[iNdEx:]) @@ -16460,6 +17218,25 @@ func (m *DetectedLabel) Unmarshal(dAtA []byte) error { } m.Label = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cardinality", wireType) + } + m.Cardinality = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowLogproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Cardinality |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipLogproto(dAtA[iNdEx:]) diff --git a/pkg/logproto/logproto.proto b/pkg/logproto/logproto.proto index 9dd58a8b5f3a..eca6b0752f60 100644 --- a/pkg/logproto/logproto.proto +++ b/pkg/logproto/logproto.proto @@ -7,7 +7,7 @@ import "google/protobuf/timestamp.proto"; import "pkg/logqlmodel/stats/stats.proto"; import "pkg/push/push.proto"; -option go_package = "github.com/grafana/loki/pkg/logproto"; +option go_package = "github.com/grafana/loki/v3/pkg/logproto"; service Querier { rpc Query(QueryRequest) returns (stream QueryResponse) {} @@ -32,6 +32,16 @@ service Querier { rpc GetVolume(VolumeRequest) returns (VolumeResponse) {} rpc GetDetectedFields(DetectedFieldsRequest) returns (DetectedFieldsResponse) {} + + rpc GetDetectedLabels(DetectedLabelsRequest) returns (LabelToValuesResponse) {} +} + +message LabelToValuesResponse { + map labels = 1; +} + +message UniqueLabelValues { + repeated string values = 1; } service StreamData { @@ -67,7 +77,7 @@ message QueryRequest { reserved 6; repeated string shards = 7 [(gogoproto.jsontag) = "shards,omitempty"]; repeated Delete deletes = 8; - Plan plan = 9 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/plan.QueryPlan"]; + Plan plan = 9 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan"]; } message SampleQueryRequest { @@ -82,7 +92,7 @@ message SampleQueryRequest { ]; repeated string shards = 4 [(gogoproto.jsontag) = "shards,omitempty"]; repeated Delete deletes = 5; - Plan plan = 6 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/plan.QueryPlan"]; + Plan plan = 6 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan"]; } // TODO(owen-d): fix. This will break rollouts as soon as the internal repr is changed. @@ -165,7 +175,7 @@ message TailRequest { (gogoproto.stdtime) = true, (gogoproto.nullable) = false ]; - Plan plan = 6 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/plan.QueryPlan"]; + Plan plan = 6 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan"]; } message TailResponse { @@ -317,11 +327,11 @@ message GetChunkRefRequest { string matchers = 3; // TODO(salvacorts): Delete this field once the weekly release is done. repeated LineFilter filters = 4 [ - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logql/syntax.LineFilter", + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logql/syntax.LineFilter", (gogoproto.nullable) = false ]; Plan plan = 5 [ - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/plan.QueryPlan", + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan", (gogoproto.nullable) = false ]; } @@ -426,13 +436,16 @@ message Volume { message DetectedFieldsRequest { google.protobuf.Timestamp start = 1 [ (gogoproto.stdtime) = true, - (gogoproto.nullable) = true + (gogoproto.nullable) = false ]; google.protobuf.Timestamp end = 2 [ (gogoproto.stdtime) = true, - (gogoproto.nullable) = true + (gogoproto.nullable) = false ]; string query = 3; // Naming this query instead of match because this should be with queryrangebase.Request interface + uint32 lineLimit = 4; + uint32 fieldLimit = 5; + int64 step = 6; } message DetectedFieldsResponse { @@ -463,4 +476,5 @@ message DetectedLabelsResponse { message DetectedLabel { string label = 1; + uint64 cardinality = 2; } diff --git a/pkg/logproto/metrics.pb.go b/pkg/logproto/metrics.pb.go index 49e45e03a9b4..facb92220d05 100644 --- a/pkg/logproto/metrics.pb.go +++ b/pkg/logproto/metrics.pb.go @@ -342,46 +342,47 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/metrics.proto", fileDescriptor_d2388e514bd0aa0e) } var fileDescriptor_d2388e514bd0aa0e = []byte{ - // 623 bytes of a gzipped FileDescriptorProto + // 627 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x53, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xf6, 0x26, 0x69, 0x92, 0x4e, 0xff, 0xfc, 0xac, 0x55, 0xf5, 0xc3, 0x04, 0x69, 0x53, 0x0c, - 0x87, 0x1e, 0x50, 0x22, 0x15, 0x09, 0x04, 0xe2, 0x92, 0xa0, 0x34, 0x54, 0x34, 0x7f, 0x58, 0x3b, - 0x54, 0xf4, 0x12, 0x6d, 0xd3, 0xad, 0xbb, 0xaa, 0x1d, 0x1b, 0xdb, 0x41, 0xca, 0x8d, 0x17, 0x40, - 0xe2, 0xcc, 0x13, 0xf0, 0x04, 0x3c, 0x43, 0x8f, 0x3d, 0x56, 0x1c, 0x2a, 0xea, 0x5e, 0x7a, 0xec, - 0x23, 0x20, 0xaf, 0x9d, 0x38, 0x45, 0xe2, 0xc6, 0xc9, 0x33, 0xf3, 0x7d, 0xdf, 0xcc, 0xe8, 0x1b, - 0x2f, 0x54, 0xbc, 0x53, 0xab, 0x6e, 0xbb, 0x96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0x4a, 0x01, 0x7e, 0x02, 0x38, 0xf9, 0xe7, 0x86, 0x87, 0xcc, 0x11, + 0xf6, 0x54, 0xda, 0x29, 0xcf, 0xb9, 0x48, 0xd5, 0x04, 0xd9, 0x96, 0x40, 0xec, 0x22, 0xc6, 0x50, + 0x38, 0xe2, 0xb6, 0xa7, 0x15, 0x24, 0x2e, 0xe3, 0xb8, 0x36, 0x19, 0x8b, 0x50, 0x5b, 0x48, 0x6a, + 0x71, 0xac, 0x4f, 0x01, 0xb2, 0x49, 0x78, 0x09, 0x4a, 0x83, 0xee, 0x9b, 0x6e, 0x6f, 0xaf, 0xab, + 0x2a, 0x71, 0xf2, 0xaa, 0x37, 0xe8, 0x9a, 0x2d, 0xaa, 0x22, 0xbc, 0x08, 0x0b, 0xed, 0xc6, 0xa0, + 0xdd, 0x52, 0x73, 0x78, 0x05, 0x16, 0x5f, 0xef, 0x18, 0x66, 0xaf, 0x4d, 0x1b, 0x1d, 0x35, 0x8f, + 0x31, 0xac, 0x4a, 0x24, 0xab, 0x15, 0x62, 0xa9, 0x31, 0xe8, 0x74, 0x1a, 0xf4, 0xbd, 0xba, 0x10, + 0xdf, 0x6b, 0xa7, 0xbb, 0xdd, 0x53, 0x8b, 0x78, 0x19, 0xca, 0x86, 0xd9, 0x30, 0x5b, 0x46, 0xcb, + 0x54, 0x4b, 0xfa, 0x5b, 0x28, 0x26, 0xa3, 0xff, 0xd9, 0x9d, 0x9a, 0x1f, 0xcf, 0x2e, 0x89, 0x72, + 0x7e, 0x49, 0x94, 0x9b, 0x4b, 0x82, 0x3e, 0x47, 0x04, 0x7d, 0x8f, 0x08, 0x3a, 0x8d, 0x08, 0x3a, + 0x8b, 0x08, 0xfa, 0x15, 0x11, 0x74, 0x1d, 0x11, 0xe5, 0x26, 0x22, 0xe8, 0xeb, 0x15, 0x51, 0xce, + 0xae, 0x88, 0x72, 0x7e, 0x45, 0x94, 0x0f, 0x8f, 0x2d, 0x11, 0x1e, 0x4d, 0xf6, 0x6b, 0x23, 0xd7, + 0xa9, 0x5b, 0x3e, 0x3b, 0x64, 0x63, 0x56, 0xb7, 0xdd, 0x63, 0x51, 0x3f, 0xd9, 0xaa, 0xdf, 0x7e, + 0xb7, 0xfb, 0x45, 0xf9, 0xd9, 0xfa, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x39, 0xa1, 0x2c, 0xef, 0x0a, + 0x04, 0x00, 0x00, } func (x WriteRequest_SourceEnum) String() string { diff --git a/pkg/logproto/metrics.proto b/pkg/logproto/metrics.proto index d0cfef0a69f5..1fc92f836312 100644 --- a/pkg/logproto/metrics.proto +++ b/pkg/logproto/metrics.proto @@ -5,7 +5,7 @@ package logproto; import "gogoproto/gogo.proto"; import "pkg/logproto/logproto.proto"; -option go_package = "github.com/grafana/loki/pkg/logproto"; +option go_package = "github.com/grafana/loki/v3/pkg/logproto"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/pkg/logproto/sketch.pb.go b/pkg/logproto/sketch.pb.go index c555d64d5597..ef0fa986b1e3 100644 --- a/pkg/logproto/sketch.pb.go +++ b/pkg/logproto/sketch.pb.go @@ -656,46 +656,47 @@ func init() { func init() { proto.RegisterFile("pkg/logproto/sketch.proto", fileDescriptor_7f9fd40e59b87ff3) } var fileDescriptor_7f9fd40e59b87ff3 = []byte{ - // 623 bytes of a gzipped FileDescriptorProto + // 626 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x41, 0x4f, 0xd4, 0x4e, - 0x14, 0xef, 0xfc, 0x77, 0xff, 0xcb, 0xf2, 0x16, 0x88, 0x8e, 0xc4, 0xd4, 0xc5, 0x4c, 0xd6, 0xc6, - 0x28, 0xd1, 0xb8, 0x9b, 0x40, 0x42, 0x38, 0x83, 0x07, 0x12, 0x45, 0x71, 0x20, 0xc6, 0x70, 0x31, - 0x43, 0x3b, 0x74, 0x27, 0xdb, 0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be, 0x3b, 0x3d, 0x27, 0xce, 0xd9, + 0x39, 0x71, 0x2e, 0xcf, 0x09, 0xfa, 0x98, 0x13, 0xf4, 0x35, 0x27, 0xe8, 0x47, 0x4e, 0xd0, 0x69, + 0x4e, 0xd0, 0xcf, 0x9c, 0xa0, 0x5f, 0x39, 0x71, 0x2e, 0x73, 0x82, 0x3e, 0x5f, 0x10, 0xe7, 0xf4, + 0x82, 0x38, 0x67, 0x17, 0xc4, 0x79, 0xbb, 0x1c, 0x0a, 0x3d, 0x1c, 0x1f, 0xf4, 0x7d, 0x19, 0x0f, + 0xc2, 0x8c, 0x1d, 0xb2, 0x84, 0x0d, 0x22, 0x39, 0x12, 0x83, 0xa3, 0xb5, 0xc1, 0xf5, 0x3f, 0x9c, + 0x83, 0x96, 0xfd, 0x59, 0xfb, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x82, 0x05, 0x2f, 0xac, 0x04, + 0x00, 0x00, } func (this *QuantileSketchMatrix) Equal(that interface{}) bool { diff --git a/pkg/logproto/sketch.proto b/pkg/logproto/sketch.proto index d8ffeb011034..e551716db374 100644 --- a/pkg/logproto/sketch.proto +++ b/pkg/logproto/sketch.proto @@ -4,7 +4,7 @@ package logproto; import "pkg/logproto/logproto.proto"; -option go_package = "github.com/grafana/loki/pkg/logproto"; +option go_package = "github.com/grafana/loki/v3/pkg/logproto"; message QuantileSketchMatrix { repeated QuantileSketchVector values = 1; diff --git a/pkg/logql/accumulator.go b/pkg/logql/accumulator.go index 9e9784cb037e..613a99fc43fd 100644 --- a/pkg/logql/accumulator.go +++ b/pkg/logql/accumulator.go @@ -7,12 +7,12 @@ import ( "sort" "time" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/metadata" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" - "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/util/math" ) // NewBufferedAccumulator returns an accumulator which aggregates all query diff --git a/pkg/logql/accumulator_test.go b/pkg/logql/accumulator_test.go index d827e3ea02e7..b9b8b86760d0 100644 --- a/pkg/logql/accumulator_test.go +++ b/pkg/logql/accumulator_test.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/sketch" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/sketch" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func TestAccumulatedStreams(t *testing.T) { diff --git a/pkg/logql/blocker.go b/pkg/logql/blocker.go index 9a07113c40dd..eaa6e1d7b129 100644 --- a/pkg/logql/blocker.go +++ b/pkg/logql/blocker.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/regexp" - "github.com/grafana/loki/pkg/util" - logutil "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/util" + logutil "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/validation" ) type queryBlocker struct { diff --git a/pkg/logql/blocker_test.go b/pkg/logql/blocker_test.go index 9fa586a02db8..c39d77c07403 100644 --- a/pkg/logql/blocker_test.go +++ b/pkg/logql/blocker_test.go @@ -10,10 +10,10 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/validation" ) func TestEngine_ExecWithBlockedQueries(t *testing.T) { diff --git a/pkg/logql/downstream.go b/pkg/logql/downstream.go index 5dea1144d9a1..eea9b28d3059 100644 --- a/pkg/logql/downstream.go +++ b/pkg/logql/downstream.go @@ -10,14 +10,14 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/prometheus/promql" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/metadata" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) /* diff --git a/pkg/logql/downstream_test.go b/pkg/logql/downstream_test.go index 9dbf261668a4..fa179502d6b7 100644 --- a/pkg/logql/downstream_test.go +++ b/pkg/logql/downstream_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) var nilShardMetrics = NewShardMapperMetrics(nil) diff --git a/pkg/logql/engine.go b/pkg/logql/engine.go index a9f3dabe14ee..fd8959179435 100644 --- a/pkg/logql/engine.go +++ b/pkg/logql/engine.go @@ -13,7 +13,7 @@ import ( "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/logqlmodel/metadata" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" "github.com/go-kit/log" "github.com/go-kit/log/level" @@ -26,18 +26,18 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/httpreq" - logutil "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/server" - "github.com/grafana/loki/pkg/util/spanlogger" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/httpreq" + logutil "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/server" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/util/validation" ) const ( diff --git a/pkg/logql/engine_test.go b/pkg/logql/engine_test.go index 1391b40ff424..2e354bdf5b8d 100644 --- a/pkg/logql/engine_test.go +++ b/pkg/logql/engine_test.go @@ -11,9 +11,9 @@ import ( "testing" "time" - "github.com/grafana/loki/pkg/logqlmodel/metadata" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/logqlmodel/metadata" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" "github.com/go-kit/log" "github.com/grafana/dskit/user" @@ -24,13 +24,13 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) var ( diff --git a/pkg/logql/evaluator.go b/pkg/logql/evaluator.go index 903c4a5555b2..eb7958691ac6 100644 --- a/pkg/logql/evaluator.go +++ b/pkg/logql/evaluator.go @@ -13,12 +13,12 @@ import ( "github.com/prometheus/prometheus/promql" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/util" ) type QueryRangeType string diff --git a/pkg/logql/evaluator_test.go b/pkg/logql/evaluator_test.go index e31d58725206..7a9eae4e3506 100644 --- a/pkg/logql/evaluator_test.go +++ b/pkg/logql/evaluator_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) func TestDefaultEvaluator_DivideByZero(t *testing.T) { diff --git a/pkg/logql/explain_test.go b/pkg/logql/explain_test.go index 84364b633c22..d6984683aec1 100644 --- a/pkg/logql/explain_test.go +++ b/pkg/logql/explain_test.go @@ -10,7 +10,7 @@ import ( "github.com/grafana/dskit/user" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) func TestExplain(t *testing.T) { diff --git a/pkg/logql/limits.go b/pkg/logql/limits.go index 9075d9320ca4..f9742dac53ef 100644 --- a/pkg/logql/limits.go +++ b/pkg/logql/limits.go @@ -5,7 +5,7 @@ import ( "math" "time" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/util/validation" ) var ( diff --git a/pkg/logql/log/drop_labels.go b/pkg/logql/log/drop_labels.go index 7e6b5e0b1415..0f0fcdee942f 100644 --- a/pkg/logql/log/drop_labels.go +++ b/pkg/logql/log/drop_labels.go @@ -3,7 +3,7 @@ package log import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) type DropLabels struct { diff --git a/pkg/logql/log/drop_labels_test.go b/pkg/logql/log/drop_labels_test.go index 9eee5f55dd20..bce8487fd93a 100644 --- a/pkg/logql/log/drop_labels_test.go +++ b/pkg/logql/log/drop_labels_test.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func Test_DropLabels(t *testing.T) { diff --git a/pkg/logql/log/filter.go b/pkg/logql/log/filter.go index 8a9a16282863..dbe5c5e99ce2 100644 --- a/pkg/logql/log/filter.go +++ b/pkg/logql/log/filter.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logql/log/pattern" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logql/log/pattern" + "github.com/grafana/loki/v3/pkg/util" ) // LineMatchType is an enum for line matching types. diff --git a/pkg/logql/log/fmt.go b/pkg/logql/log/fmt.go index 34a1bb32c5e4..c69aa3d40bb0 100644 --- a/pkg/logql/log/fmt.go +++ b/pkg/logql/log/fmt.go @@ -13,7 +13,7 @@ import ( "github.com/Masterminds/sprig/v3" "github.com/grafana/regexp" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) const ( diff --git a/pkg/logql/log/fmt_test.go b/pkg/logql/log/fmt_test.go index 637caec29a46..2028d2e00bf8 100644 --- a/pkg/logql/log/fmt_test.go +++ b/pkg/logql/log/fmt_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func Test_lineFormatter_Format(t *testing.T) { diff --git a/pkg/logql/log/keep_labels.go b/pkg/logql/log/keep_labels.go index 43ed2ab666ab..67c93ecca8fd 100644 --- a/pkg/logql/log/keep_labels.go +++ b/pkg/logql/log/keep_labels.go @@ -3,7 +3,7 @@ package log import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) type KeepLabels struct { diff --git a/pkg/logql/log/keep_labels_test.go b/pkg/logql/log/keep_labels_test.go index 3f502e76c901..11d70f0ac654 100644 --- a/pkg/logql/log/keep_labels_test.go +++ b/pkg/logql/log/keep_labels_test.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func Test_KeepLabels(t *testing.T) { diff --git a/pkg/logql/log/label_filter.go b/pkg/logql/log/label_filter.go index e7e10b404d61..49e8cbf09237 100644 --- a/pkg/logql/log/label_filter.go +++ b/pkg/logql/log/label_filter.go @@ -10,7 +10,7 @@ import ( "github.com/dustin/go-humanize" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) var ( diff --git a/pkg/logql/log/label_filter_test.go b/pkg/logql/log/label_filter_test.go index 3a2e2480c33f..b6364dc0c3fd 100644 --- a/pkg/logql/log/label_filter_test.go +++ b/pkg/logql/log/label_filter_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func TestBinary_Filter(t *testing.T) { diff --git a/pkg/logql/log/labels.go b/pkg/logql/log/labels.go index d93af8a845e8..c68fe1af0e5b 100644 --- a/pkg/logql/log/labels.go +++ b/pkg/logql/log/labels.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) const MaxInternedStrings = 1024 diff --git a/pkg/logql/log/labels_test.go b/pkg/logql/log/labels_test.go index e42a330dcbc3..97c9a8899c22 100644 --- a/pkg/logql/log/labels_test.go +++ b/pkg/logql/log/labels_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func TestLabelsBuilder_Get(t *testing.T) { diff --git a/pkg/logql/log/parser.go b/pkg/logql/log/parser.go index afdc7f91a4f9..9a5ae1395069 100644 --- a/pkg/logql/log/parser.go +++ b/pkg/logql/log/parser.go @@ -8,10 +8,10 @@ import ( "github.com/grafana/jsonparser" - "github.com/grafana/loki/pkg/logql/log/jsonexpr" - "github.com/grafana/loki/pkg/logql/log/logfmt" - "github.com/grafana/loki/pkg/logql/log/pattern" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logql/log/jsonexpr" + "github.com/grafana/loki/v3/pkg/logql/log/logfmt" + "github.com/grafana/loki/v3/pkg/logql/log/pattern" + "github.com/grafana/loki/v3/pkg/logqlmodel" "github.com/grafana/regexp" jsoniter "github.com/json-iterator/go" diff --git a/pkg/logql/log/parser_hints.go b/pkg/logql/log/parser_hints.go index 3fd4cff2b332..32a789250df9 100644 --- a/pkg/logql/log/parser_hints.go +++ b/pkg/logql/log/parser_hints.go @@ -3,7 +3,7 @@ package log import ( "strings" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func NoParserHints() ParserHint { diff --git a/pkg/logql/log/parser_hints_test.go b/pkg/logql/log/parser_hints_test.go index 42d0134bc1d8..96bfc15b3863 100644 --- a/pkg/logql/log/parser_hints_test.go +++ b/pkg/logql/log/parser_hints_test.go @@ -4,12 +4,12 @@ package log_test import ( "testing" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) var ( diff --git a/pkg/logql/log/parser_test.go b/pkg/logql/log/parser_test.go index f8cf6373a152..3e5de0f70941 100644 --- a/pkg/logql/log/parser_test.go +++ b/pkg/logql/log/parser_test.go @@ -5,7 +5,7 @@ import ( "sort" "testing" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" diff --git a/pkg/logql/log/pipeline_test.go b/pkg/logql/log/pipeline_test.go index 9b2aff1332d4..ffa5df0d50b9 100644 --- a/pkg/logql/log/pipeline_test.go +++ b/pkg/logql/log/pipeline_test.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func TestNoopPipeline(t *testing.T) { diff --git a/pkg/logql/mapper_metrics.go b/pkg/logql/mapper_metrics.go index 4ec8cb8454c7..33cc406dd1ab 100644 --- a/pkg/logql/mapper_metrics.go +++ b/pkg/logql/mapper_metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) // expression type used in metrics diff --git a/pkg/logql/matchers.go b/pkg/logql/matchers.go index 2fbf14573069..f0bdef46a9d4 100644 --- a/pkg/logql/matchers.go +++ b/pkg/logql/matchers.go @@ -4,7 +4,7 @@ import ( "github.com/pkg/errors" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) // MatchForSeriesRequest extracts and parses multiple matcher groups from a slice of strings. diff --git a/pkg/logql/metrics.go b/pkg/logql/metrics.go index ee23dc8f3f5f..e9921a07c294 100644 --- a/pkg/logql/metrics.go +++ b/pkg/logql/metrics.go @@ -15,16 +15,16 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" promql_parser "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - logql_stats "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/httpreq" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + logql_stats "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/httpreq" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/logql/metrics_test.go b/pkg/logql/metrics_test.go index c08844eabeab..44094e27f5d4 100644 --- a/pkg/logql/metrics_test.go +++ b/pkg/logql/metrics_test.go @@ -15,13 +15,13 @@ import ( "github.com/stretchr/testify/require" "github.com/uber/jaeger-client-go" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/httpreq" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/httpreq" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func TestQueryType(t *testing.T) { diff --git a/pkg/logql/optimize.go b/pkg/logql/optimize.go index 9b885b0fd229..ef930be79966 100644 --- a/pkg/logql/optimize.go +++ b/pkg/logql/optimize.go @@ -1,6 +1,6 @@ package logql -import "github.com/grafana/loki/pkg/logql/syntax" +import "github.com/grafana/loki/v3/pkg/logql/syntax" // optimizeSampleExpr Attempt to optimize the SampleExpr to another that will run faster but will produce the same result. func optimizeSampleExpr(expr syntax.SampleExpr) (syntax.SampleExpr, error) { diff --git a/pkg/logql/optimize_test.go b/pkg/logql/optimize_test.go index b4005e6d1f15..a457f180d4fa 100644 --- a/pkg/logql/optimize_test.go +++ b/pkg/logql/optimize_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) func Test_optimizeSampleExpr(t *testing.T) { diff --git a/pkg/logql/quantile_over_time_sketch.go b/pkg/logql/quantile_over_time_sketch.go index 24a8a05d89ed..42288830c2dd 100644 --- a/pkg/logql/quantile_over_time_sketch.go +++ b/pkg/logql/quantile_over_time_sketch.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/prometheus/promql" promql_parser "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/sketch" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/sketch" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) const ( diff --git a/pkg/logql/quantile_over_time_sketch_test.go b/pkg/logql/quantile_over_time_sketch_test.go index 488ebdec26f0..5692575bd290 100644 --- a/pkg/logql/quantile_over_time_sketch_test.go +++ b/pkg/logql/quantile_over_time_sketch_test.go @@ -11,9 +11,9 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/sketch" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/sketch" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func TestProbabilisticMQuantileMatrixSerialization(t *testing.T) { diff --git a/pkg/logql/range_vector.go b/pkg/logql/range_vector.go index 484949718f09..44a865157754 100644 --- a/pkg/logql/range_vector.go +++ b/pkg/logql/range_vector.go @@ -11,9 +11,9 @@ import ( "github.com/prometheus/prometheus/promql" promql_parser "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logql/vector" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/vector" ) // BatchRangeVectorAggregator aggregates samples for a given range of samples. diff --git a/pkg/logql/range_vector_test.go b/pkg/logql/range_vector_test.go index c7176bed2ab9..fb28ea5c9c0c 100644 --- a/pkg/logql/range_vector_test.go +++ b/pkg/logql/range_vector_test.go @@ -13,11 +13,11 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/sketch" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logql/vector" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/sketch" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/vector" ) var samples = []logproto.Sample{ diff --git a/pkg/logql/rangemapper.go b/pkg/logql/rangemapper.go index f898e19d2ea1..bec171122610 100644 --- a/pkg/logql/rangemapper.go +++ b/pkg/logql/rangemapper.go @@ -9,8 +9,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/logql/syntax" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var splittableVectorOp = map[string]struct{}{ diff --git a/pkg/logql/rangemapper_test.go b/pkg/logql/rangemapper_test.go index 5e95486a8c8e..5365c7b2b73f 100644 --- a/pkg/logql/rangemapper_test.go +++ b/pkg/logql/rangemapper_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) func Test_SplitRangeInterval(t *testing.T) { diff --git a/pkg/logql/shardmapper.go b/pkg/logql/shardmapper.go index 3095fc0a1aaf..fbd0dbaa83eb 100644 --- a/pkg/logql/shardmapper.go +++ b/pkg/logql/shardmapper.go @@ -7,9 +7,9 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/logql/shardmapper_test.go b/pkg/logql/shardmapper_test.go index 9f5757b7d8ee..355f839bac55 100644 --- a/pkg/logql/shardmapper_test.go +++ b/pkg/logql/shardmapper_test.go @@ -7,10 +7,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func TestShardedStringer(t *testing.T) { diff --git a/pkg/logql/shards.go b/pkg/logql/shards.go index 9265dac5f0e8..75281aa3c95b 100644 --- a/pkg/logql/shards.go +++ b/pkg/logql/shards.go @@ -7,13 +7,13 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/astmapper" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" ) type Shards []Shard diff --git a/pkg/logql/shards_test.go b/pkg/logql/shards_test.go index 1a2d78889cc5..d9f5b62ebb17 100644 --- a/pkg/logql/shards_test.go +++ b/pkg/logql/shards_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func TestShardString(t *testing.T) { diff --git a/pkg/logql/sketch/quantile.go b/pkg/logql/sketch/quantile.go index 3b8b0f22fc8e..093923a59136 100644 --- a/pkg/logql/sketch/quantile.go +++ b/pkg/logql/sketch/quantile.go @@ -10,7 +10,7 @@ import ( "github.com/DataDog/sketches-go/ddsketch/store" "github.com/influxdata/tdigest" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // QuantileSketch estimates quantiles over time. diff --git a/pkg/logql/sketch/series.go b/pkg/logql/sketch/series.go index 684e3080d6df..0f434bd341c5 100644 --- a/pkg/logql/sketch/series.go +++ b/pkg/logql/sketch/series.go @@ -3,7 +3,7 @@ package sketch import ( "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) const ValueTypeTopKMatrix = "topk_matrix" diff --git a/pkg/logql/sketch/topk.go b/pkg/logql/sketch/topk.go index 021ab632ab55..e5efad409727 100644 --- a/pkg/logql/sketch/topk.go +++ b/pkg/logql/sketch/topk.go @@ -6,7 +6,7 @@ import ( "sort" "unsafe" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/axiomhq/hyperloglog" "github.com/go-kit/log" diff --git a/pkg/logql/syntax/ast.go b/pkg/logql/syntax/ast.go index 78b6330809e5..b0649570e833 100644 --- a/pkg/logql/syntax/ast.go +++ b/pkg/logql/syntax/ast.go @@ -8,7 +8,7 @@ import ( "strings" "time" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" "github.com/pkg/errors" "github.com/prometheus/common/model" @@ -17,8 +17,8 @@ import ( "github.com/grafana/regexp/syntax" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) // Expr is the root expression which can be a SampleExpr or LogSelectorExpr diff --git a/pkg/logql/syntax/ast_test.go b/pkg/logql/syntax/ast_test.go index ce2dca62f9d4..2ba435e0fe2d 100644 --- a/pkg/logql/syntax/ast_test.go +++ b/pkg/logql/syntax/ast_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" ) var labelBar, _ = ParseLabels("{app=\"bar\"}") diff --git a/pkg/logql/syntax/clone.go b/pkg/logql/syntax/clone.go index a93aa53d599a..d047218b0b60 100644 --- a/pkg/logql/syntax/clone.go +++ b/pkg/logql/syntax/clone.go @@ -3,7 +3,7 @@ package syntax import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" ) type cloneVisitor struct { diff --git a/pkg/logql/syntax/clone_test.go b/pkg/logql/syntax/clone_test.go index 58dc6efb03e2..cfed2134c6bb 100644 --- a/pkg/logql/syntax/clone_test.go +++ b/pkg/logql/syntax/clone_test.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" ) func TestClone(t *testing.T) { diff --git a/pkg/logql/syntax/expr.y b/pkg/logql/syntax/expr.y index 0386406a87f8..7f443831159b 100644 --- a/pkg/logql/syntax/expr.y +++ b/pkg/logql/syntax/expr.y @@ -4,7 +4,7 @@ package syntax import ( "time" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" ) %} diff --git a/pkg/logql/syntax/expr.y.go b/pkg/logql/syntax/expr.y.go index 48ba393ad5e2..2d322514a75f 100644 --- a/pkg/logql/syntax/expr.y.go +++ b/pkg/logql/syntax/expr.y.go @@ -5,7 +5,7 @@ package syntax import __yyfmt__ "fmt" import ( - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" "github.com/prometheus/prometheus/model/labels" "time" ) diff --git a/pkg/logql/syntax/extractor.go b/pkg/logql/syntax/extractor.go index 922cd25ce9a7..8d79202968da 100644 --- a/pkg/logql/syntax/extractor.go +++ b/pkg/logql/syntax/extractor.go @@ -4,7 +4,7 @@ import ( "fmt" "sort" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" ) const UnsupportedErr = "unsupported range vector aggregation operation: %s" diff --git a/pkg/logql/syntax/lex.go b/pkg/logql/syntax/lex.go index dc806c921090..dffb05ab0189 100644 --- a/pkg/logql/syntax/lex.go +++ b/pkg/logql/syntax/lex.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/util/strutil" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) var tokens = map[string]int{ diff --git a/pkg/logql/syntax/linefilter.go b/pkg/logql/syntax/linefilter.go index 9b07e95deb12..e48c847d79a6 100644 --- a/pkg/logql/syntax/linefilter.go +++ b/pkg/logql/syntax/linefilter.go @@ -1,8 +1,8 @@ package syntax import ( - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/util/encoding" ) // Binary encoding of the LineFilter diff --git a/pkg/logql/syntax/linefilter_test.go b/pkg/logql/syntax/linefilter_test.go index 55fc0fc39179..129aaac9d8a8 100644 --- a/pkg/logql/syntax/linefilter_test.go +++ b/pkg/logql/syntax/linefilter_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" ) func TestLineFilterSerialization(t *testing.T) { diff --git a/pkg/logql/syntax/parser.go b/pkg/logql/syntax/parser.go index 79213049f376..524c86109afb 100644 --- a/pkg/logql/syntax/parser.go +++ b/pkg/logql/syntax/parser.go @@ -10,8 +10,8 @@ import ( "github.com/prometheus/prometheus/model/labels" promql_parser "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/pkg/logql/syntax/parser_test.go b/pkg/logql/syntax/parser_test.go index faa55015e583..3851013f4be9 100644 --- a/pkg/logql/syntax/parser_test.go +++ b/pkg/logql/syntax/parser_test.go @@ -9,8 +9,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) func NewStringLabelFilter(s string) *string { diff --git a/pkg/logql/syntax/serialize.go b/pkg/logql/syntax/serialize.go index 84af7e803d0d..4e4362683543 100644 --- a/pkg/logql/syntax/serialize.go +++ b/pkg/logql/syntax/serialize.go @@ -8,7 +8,7 @@ import ( jsoniter "github.com/json-iterator/go" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" ) type JSONSerializer struct { diff --git a/pkg/logql/test_utils.go b/pkg/logql/test_utils.go index 8154b18fb691..d141f39bf077 100644 --- a/pkg/logql/test_utils.go +++ b/pkg/logql/test_utils.go @@ -14,11 +14,11 @@ import ( "github.com/prometheus/prometheus/model/labels" promql_parser "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func NewMockQuerier(shards int, streams []logproto.Stream) MockQuerier { diff --git a/pkg/logqlanalyzer/analyzer.go b/pkg/logqlanalyzer/analyzer.go index 5d3268074428..ceff726507f1 100644 --- a/pkg/logqlanalyzer/analyzer.go +++ b/pkg/logqlanalyzer/analyzer.go @@ -8,8 +8,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) type logQLAnalyzer struct { diff --git a/pkg/logqlanalyzer/http.go b/pkg/logqlanalyzer/http.go index 6f1324348892..c3cff9763a3f 100644 --- a/pkg/logqlanalyzer/http.go +++ b/pkg/logqlanalyzer/http.go @@ -9,7 +9,7 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func CorsMiddleware() mux.MiddlewareFunc { diff --git a/pkg/logqlmodel/logqlmodel.go b/pkg/logqlmodel/logqlmodel.go index 8ba0e198c403..8da990f0e74b 100644 --- a/pkg/logqlmodel/logqlmodel.go +++ b/pkg/logqlmodel/logqlmodel.go @@ -3,10 +3,11 @@ package logqlmodel import ( "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" - "github.com/grafana/loki/pkg/logqlmodel/stats" "github.com/grafana/loki/pkg/push" + + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) // ValueTypeStreams promql.ValueType for log streams diff --git a/pkg/logqlmodel/metadata/context.go b/pkg/logqlmodel/metadata/context.go index b819893679a4..f4d7dca265da 100644 --- a/pkg/logqlmodel/metadata/context.go +++ b/pkg/logqlmodel/metadata/context.go @@ -10,7 +10,7 @@ import ( "sort" "sync" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" ) type ( diff --git a/pkg/logqlmodel/metadata/context_test.go b/pkg/logqlmodel/metadata/context_test.go index 256abdb18ef7..2f4e3316ece1 100644 --- a/pkg/logqlmodel/metadata/context_test.go +++ b/pkg/logqlmodel/metadata/context_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" ) func TestHeaders(t *testing.T) { diff --git a/pkg/logqlmodel/stats/context_test.go b/pkg/logqlmodel/stats/context_test.go index b7e37e311718..55f5b93c70b0 100644 --- a/pkg/logqlmodel/stats/context_test.go +++ b/pkg/logqlmodel/stats/context_test.go @@ -7,7 +7,7 @@ import ( "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 TestResult(t *testing.T) { diff --git a/pkg/logqlmodel/stats/stats.pb.go b/pkg/logqlmodel/stats/stats.pb.go index facdcb2a910e..9a728c161267 100644 --- a/pkg/logqlmodel/stats/stats.pb.go +++ b/pkg/logqlmodel/stats/stats.pb.go @@ -864,92 +864,92 @@ func init() { func init() { proto.RegisterFile("pkg/logqlmodel/stats/stats.proto", fileDescriptor_6cdfe5d2aea33ebb) } var fileDescriptor_6cdfe5d2aea33ebb = []byte{ - // 1357 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0xdf, 0xcd, 0xd6, 0x9b, 0x74, 0xf2, 0xaf, 0x9d, 0xa4, 0x74, 0x4b, 0x2b, 0x3b, 0x2c, 0x54, - 0x14, 0x81, 0x12, 0x15, 0x90, 0x10, 0x88, 0x4a, 0xc8, 0x29, 0x91, 0x2a, 0xa5, 0xa2, 0xbc, 0x80, - 0x40, 0x70, 0xf2, 0xda, 0x93, 0x5d, 0xab, 0x5e, 0x7b, 0x63, 0x8f, 0x4b, 0x23, 0x21, 0xc1, 0x47, - 0xe0, 0xce, 0x1d, 0x71, 0xe1, 0xc4, 0x89, 0x33, 0x97, 0x1e, 0x7b, 0xec, 0xc9, 0xa2, 0xdb, 0x0b, - 0xf2, 0xa9, 0x1f, 0x80, 0x03, 0x9a, 0x37, 0xb3, 0xf6, 0xd8, 0xeb, 0x4d,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 0x3d, 0x0b, 0xcc, 0x65, 0xfe, 0xa3, 0xe2, 0x31, 0x88, 0xc4, 0x8a, 0x02, 0xaa, 0xa2, 0x78, - 0xd6, 0x21, 0x80, 0x2d, 0x49, 0xa6, 0x17, 0x3e, 0xeb, 0x0a, 0x10, 0xca, 0xa1, 0x78, 0x2d, 0xc6, - 0x72, 0xad, 0x32, 0x97, 0x0c, 0xf9, 0x5a, 0x9c, 0x61, 0x50, 0x8c, 0x44, 0x00, 0x3d, 0xbd, 0xc4, - 0x2f, 0x97, 0x4d, 0x52, 0xc7, 0xa1, 0x22, 0x89, 0x7c, 0xc3, 0x72, 0x7c, 0xc8, 0xc2, 0x21, 0x1f, - 0x1d, 0xb1, 0xf8, 0x51, 0xf1, 0x06, 0xc4, 0x7c, 0x9b, 0x53, 0xc2, 0x3c, 0x64, 0x0f, 0x9e, 0x3e, - 0x37, 0x5b, 0xcf, 0x9e, 0x9b, 0xad, 0x97, 0xcf, 0xcd, 0xf6, 0xcf, 0x53, 0xb3, 0xfd, 0xfb, 0xd4, - 0x6c, 0x3f, 0x99, 0x9a, 0xed, 0xa7, 0x53, 0xb3, 0xfd, 0xcf, 0xd4, 0x6c, 0xff, 0x3b, 0x35, 0x5b, - 0x2f, 0xa7, 0x66, 0xfb, 0x97, 0x17, 0x66, 0xeb, 0xe9, 0x0b, 0xb3, 0xf5, 0xec, 0x85, 0xd9, 0xfa, - 0xee, 0xbd, 0xa1, 0xcf, 0x47, 0xe9, 0x60, 0xd7, 0x8d, 0xc6, 0x7b, 0xc3, 0xd8, 0x39, 0x76, 0x42, - 0x67, 0x2f, 0x88, 0x1e, 0xfa, 0x7b, 0x4d, 0x7f, 0xfb, 0x07, 0x5d, 0xfc, 0x53, 0xff, 0xc1, 0xff, - 0x01, 0x00, 0x00, 0xff, 0xff, 0x44, 0xbc, 0x0a, 0x32, 0x15, 0x10, 0x00, 0x00, + // 1358 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x57, 0xcd, 0x6f, 0xdc, 0x44, + 0x14, 0xdf, 0xcd, 0xd6, 0x9b, 0x74, 0xf2, 0xd5, 0x4e, 0x52, 0xba, 0xa5, 0x95, 0x1d, 0x16, 0x2a, + 0x8a, 0x90, 0xb2, 0x2a, 0x45, 0x42, 0x20, 0x2a, 0x21, 0xa7, 0x44, 0xaa, 0x94, 0x8a, 0xf2, 0x16, + 0x04, 0x82, 0x93, 0x63, 0xbf, 0xec, 0x5a, 0xf5, 0xda, 0x8e, 0x3d, 0x0e, 0x8d, 0x84, 0x04, 0x7f, + 0x02, 0x77, 0xee, 0x88, 0x0b, 0x27, 0x4e, 0x9c, 0xb9, 0xf4, 0xd8, 0x63, 0x4f, 0x16, 0xdd, 0x5c, + 0x90, 0x4f, 0xfd, 0x03, 0x38, 0xa0, 0xf9, 0x58, 0x7f, 0xad, 0x37, 0xcd, 0x65, 0x3d, 0xef, 0xf7, + 0xde, 0xef, 0xcd, 0xcc, 0x9b, 0x79, 0xef, 0xcd, 0x92, 0x9d, 0xf0, 0xc9, 0x68, 0xe0, 0x05, 0xa3, + 0x63, 0x6f, 0x12, 0x38, 0xe8, 0x0d, 0x62, 0x66, 0xb1, 0x58, 0xfe, 0xee, 0x86, 0x51, 0xc0, 0x02, + 0xaa, 0x09, 0xe1, 0xcd, 0xed, 0x51, 0x30, 0x0a, 0x04, 0x32, 0xe0, 0x23, 0xa9, 0xec, 0xff, 0xb6, + 0x44, 0xba, 0x80, 0x71, 0xe2, 0x31, 0xfa, 0x31, 0x59, 0x8e, 0x93, 0xc9, 0xc4, 0x8a, 0x4e, 0x7b, + 0xed, 0x9d, 0xf6, 0x9d, 0xd5, 0x0f, 0x36, 0x76, 0xa5, 0x9b, 0xa1, 0x44, 0xcd, 0xcd, 0x67, 0xa9, + 0xd1, 0xca, 0x52, 0x63, 0x66, 0x06, 0xb3, 0x01, 0xa7, 0x1e, 0x27, 0x18, 0xb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, 0xa7, 0x7a, 0xfb, 0x9f, 0xa9, 0xde, 0xfe, 0x77, 0xaa, 0xb7, 0x5e, + 0x4d, 0xf5, 0xf6, 0x2f, 0x67, 0x7a, 0xeb, 0xf9, 0x99, 0xde, 0x7a, 0x71, 0xa6, 0xb7, 0xbe, 0x1b, + 0x8c, 0x5c, 0x36, 0x4e, 0x0e, 0x77, 0xed, 0x60, 0x32, 0x18, 0x45, 0xd6, 0x91, 0xe5, 0x5b, 0x03, + 0x2f, 0x78, 0xe2, 0x0e, 0x4e, 0xee, 0x0d, 0x9a, 0xfe, 0xf9, 0x1f, 0x76, 0xc5, 0xff, 0xfa, 0x7b, + 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x19, 0x80, 0x75, 0xde, 0x18, 0x10, 0x00, 0x00, } func (this *Result) Equal(that interface{}) bool { diff --git a/pkg/logqlmodel/stats/stats.proto b/pkg/logqlmodel/stats/stats.proto index df21e4a2ee9a..b53747b7941f 100644 --- a/pkg/logqlmodel/stats/stats.proto +++ b/pkg/logqlmodel/stats/stats.proto @@ -4,7 +4,7 @@ package stats; import "gogoproto/gogo.proto"; -option go_package = "github.com/grafana/loki/pkg/logqlmodel/stats"; +option go_package = "github.com/grafana/loki/v3/pkg/logqlmodel/stats"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/pkg/loki/common/common.go b/pkg/loki/common/common.go index 6f7fd1c768ed..b7bb08e2cd46 100644 --- a/pkg/loki/common/common.go +++ b/pkg/loki/common/common.go @@ -6,17 +6,17 @@ import ( "github.com/grafana/dskit/flagext" "github.com/grafana/dskit/netutil" - "github.com/grafana/loki/pkg/storage/chunk/client/alibaba" - "github.com/grafana/loki/pkg/storage/chunk/client/aws" - "github.com/grafana/loki/pkg/storage/chunk/client/azure" - "github.com/grafana/loki/pkg/storage/chunk/client/baidubce" - "github.com/grafana/loki/pkg/storage/chunk/client/congestion" - "github.com/grafana/loki/pkg/storage/chunk/client/gcp" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/storage/chunk/client/ibmcloud" - "github.com/grafana/loki/pkg/storage/chunk/client/openstack" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/alibaba" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/aws" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/azure" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/baidubce" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/congestion" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/gcp" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/ibmcloud" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/openstack" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/ring" ) // Config holds common config that can be shared between multiple other config sections. diff --git a/pkg/loki/config_compat.go b/pkg/loki/config_compat.go index 1e4f800c4647..fff357453be6 100644 --- a/pkg/loki/config_compat.go +++ b/pkg/loki/config_compat.go @@ -4,9 +4,9 @@ import ( "errors" "fmt" - "github.com/grafana/loki/pkg/ingester/index" - frontend "github.com/grafana/loki/pkg/lokifrontend/frontend/v2" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/ingester/index" + frontend "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2" + "github.com/grafana/loki/v3/pkg/storage/config" ) func ValidateConfigCompatibility(c Config) error { diff --git a/pkg/loki/config_test.go b/pkg/loki/config_test.go index 73fc2cbb46ab..7a29f80bf02b 100644 --- a/pkg/loki/config_test.go +++ b/pkg/loki/config_test.go @@ -8,8 +8,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/ingester" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/ingester" + "github.com/grafana/loki/v3/pkg/storage/config" ) func TestCrossComponentValidation(t *testing.T) { diff --git a/pkg/loki/config_wrapper.go b/pkg/loki/config_wrapper.go index c602f53cc6dd..e10618e88c4f 100644 --- a/pkg/loki/config_wrapper.go +++ b/pkg/loki/config_wrapper.go @@ -11,14 +11,14 @@ import ( "github.com/grafana/dskit/flagext" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/loki/common" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/cfg" - lokiring "github.com/grafana/loki/pkg/util/ring" - - "github.com/grafana/loki/pkg/ruler/rulestore/local" - loki_net "github.com/grafana/loki/pkg/util/net" + "github.com/grafana/loki/v3/pkg/loki/common" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/cfg" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + + "github.com/grafana/loki/v3/pkg/ruler/rulestore/local" + loki_net "github.com/grafana/loki/v3/pkg/util/net" ) const versionFlag = "version" diff --git a/pkg/loki/config_wrapper_test.go b/pkg/loki/config_wrapper_test.go index f6e22f74add5..1852846aa299 100644 --- a/pkg/loki/config_wrapper_test.go +++ b/pkg/loki/config_wrapper_test.go @@ -14,21 +14,21 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/distributor" - "github.com/grafana/loki/pkg/loki/common" - "github.com/grafana/loki/pkg/storage/bucket/swift" - "github.com/grafana/loki/pkg/storage/chunk/client/alibaba" - "github.com/grafana/loki/pkg/storage/chunk/client/aws" - "github.com/grafana/loki/pkg/storage/chunk/client/azure" - "github.com/grafana/loki/pkg/storage/chunk/client/baidubce" - "github.com/grafana/loki/pkg/storage/chunk/client/gcp" - "github.com/grafana/loki/pkg/storage/chunk/client/ibmcloud" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/openstack" - "github.com/grafana/loki/pkg/util/cfg" - util_log "github.com/grafana/loki/pkg/util/log" - loki_net "github.com/grafana/loki/pkg/util/net" - lokiring "github.com/grafana/loki/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/distributor" + "github.com/grafana/loki/v3/pkg/loki/common" + "github.com/grafana/loki/v3/pkg/storage/bucket/swift" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/alibaba" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/aws" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/azure" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/baidubce" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/gcp" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/ibmcloud" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/openstack" + "github.com/grafana/loki/v3/pkg/util/cfg" + util_log "github.com/grafana/loki/v3/pkg/util/log" + loki_net "github.com/grafana/loki/v3/pkg/util/net" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" ) // Can't use a totally empty yaml file or it causes weird behavior in the unmarshalling. diff --git a/pkg/loki/delete_store_listener.go b/pkg/loki/delete_store_listener.go index 10fbc88a9899..ec2d9978bab8 100644 --- a/pkg/loki/delete_store_listener.go +++ b/pkg/loki/delete_store_listener.go @@ -3,7 +3,7 @@ package loki import ( "github.com/grafana/dskit/services" - "github.com/grafana/loki/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/compactor/deletion" ) func deleteRequestsStoreListener(d deletion.DeleteRequestsClient) *listener { diff --git a/pkg/loki/format_query_handler.go b/pkg/loki/format_query_handler.go index 4e65999ebbb3..4b715215a283 100644 --- a/pkg/loki/format_query_handler.go +++ b/pkg/loki/format_query_handler.go @@ -4,8 +4,8 @@ import ( "encoding/json" "net/http" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util/server" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util/server" ) func formatQueryHandler() http.HandlerFunc { diff --git a/pkg/loki/loki.go b/pkg/loki/loki.go index 3d8bd9f9bec1..c77ef0789293 100644 --- a/pkg/loki/loki.go +++ b/pkg/loki/loki.go @@ -29,43 +29,43 @@ import ( "github.com/prometheus/client_golang/prometheus" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/bloomcompactor" - "github.com/grafana/loki/pkg/bloomgateway" - "github.com/grafana/loki/pkg/compactor" - compactorclient "github.com/grafana/loki/pkg/compactor/client" - "github.com/grafana/loki/pkg/compactor/deletion" - "github.com/grafana/loki/pkg/distributor" - "github.com/grafana/loki/pkg/ingester" - ingester_client "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/loki/common" - "github.com/grafana/loki/pkg/lokifrontend" - "github.com/grafana/loki/pkg/lokifrontend/frontend/transport" - "github.com/grafana/loki/pkg/querier" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/querier/worker" - "github.com/grafana/loki/pkg/ruler" - base_ruler "github.com/grafana/loki/pkg/ruler/base" - "github.com/grafana/loki/pkg/ruler/rulestore" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/scheduler" - internalserver "github.com/grafana/loki/pkg/server" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" - "github.com/grafana/loki/pkg/tracing" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/fakeauth" - "github.com/grafana/loki/pkg/util/limiter" - util_log "github.com/grafana/loki/pkg/util/log" - lokiring "github.com/grafana/loki/pkg/util/ring" - serverutil "github.com/grafana/loki/pkg/util/server" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/bloomcompactor" + "github.com/grafana/loki/v3/pkg/bloomgateway" + "github.com/grafana/loki/v3/pkg/compactor" + compactorclient "github.com/grafana/loki/v3/pkg/compactor/client" + "github.com/grafana/loki/v3/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/distributor" + "github.com/grafana/loki/v3/pkg/ingester" + ingester_client "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/loki/common" + "github.com/grafana/loki/v3/pkg/lokifrontend" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/transport" + "github.com/grafana/loki/v3/pkg/querier" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/worker" + "github.com/grafana/loki/v3/pkg/ruler" + base_ruler "github.com/grafana/loki/v3/pkg/ruler/base" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/scheduler" + internalserver "github.com/grafana/loki/v3/pkg/server" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/tracing" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/fakeauth" + "github.com/grafana/loki/v3/pkg/util/limiter" + util_log "github.com/grafana/loki/v3/pkg/util/log" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + serverutil "github.com/grafana/loki/v3/pkg/util/server" + "github.com/grafana/loki/v3/pkg/validation" ) // Config is the root config for Loki. diff --git a/pkg/loki/loki_test.go b/pkg/loki/loki_test.go index 81d7c0384d7d..a4e6ff73ca56 100644 --- a/pkg/loki/loki_test.go +++ b/pkg/loki/loki_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - internalserver "github.com/grafana/loki/pkg/server" + internalserver "github.com/grafana/loki/v3/pkg/server" ) func TestFlagDefaults(t *testing.T) { diff --git a/pkg/loki/modules.go b/pkg/loki/modules.go index cc616924c1f0..79c86836331a 100644 --- a/pkg/loki/modules.go +++ b/pkg/loki/modules.go @@ -33,52 +33,52 @@ import ( "github.com/prometheus/client_golang/prometheus/collectors/version" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/bloomcompactor" - "github.com/grafana/loki/pkg/logqlmodel/stats" - - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/bloomgateway" - "github.com/grafana/loki/pkg/compactor" - compactorclient "github.com/grafana/loki/pkg/compactor/client" - "github.com/grafana/loki/pkg/compactor/client/grpc" - "github.com/grafana/loki/pkg/compactor/deletion" - "github.com/grafana/loki/pkg/compactor/generationnumber" - "github.com/grafana/loki/pkg/distributor" - "github.com/grafana/loki/pkg/ingester" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/lokifrontend/frontend" - "github.com/grafana/loki/pkg/lokifrontend/frontend/transport" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v1/frontendv1pb" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v2/frontendv2pb" - "github.com/grafana/loki/pkg/querier" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/ruler" - base_ruler "github.com/grafana/loki/pkg/ruler/base" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/scheduler" - "github.com/grafana/loki/pkg/scheduler/schedulerpb" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - boltdbcompactor "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb/compactor" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/httpreq" - "github.com/grafana/loki/pkg/util/limiter" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/querylimits" - lokiring "github.com/grafana/loki/pkg/util/ring" - serverutil "github.com/grafana/loki/pkg/util/server" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/bloomcompactor" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/bloomgateway" + "github.com/grafana/loki/v3/pkg/compactor" + compactorclient "github.com/grafana/loki/v3/pkg/compactor/client" + "github.com/grafana/loki/v3/pkg/compactor/client/grpc" + "github.com/grafana/loki/v3/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/compactor/generationnumber" + "github.com/grafana/loki/v3/pkg/distributor" + "github.com/grafana/loki/v3/pkg/ingester" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/transport" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v1/frontendv1pb" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2/frontendv2pb" + "github.com/grafana/loki/v3/pkg/querier" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/ruler" + base_ruler "github.com/grafana/loki/v3/pkg/ruler/base" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/scheduler" + "github.com/grafana/loki/v3/pkg/scheduler/schedulerpb" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + boltdbcompactor "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb/compactor" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/limiter" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/querylimits" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" + serverutil "github.com/grafana/loki/v3/pkg/util/server" + "github.com/grafana/loki/v3/pkg/validation" ) const maxChunkAgeForTableManager = 12 * time.Hour diff --git a/pkg/loki/modules_test.go b/pkg/loki/modules_test.go index 4529eb7c23c8..989d8e588c0d 100644 --- a/pkg/loki/modules_test.go +++ b/pkg/loki/modules_test.go @@ -13,13 +13,13 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - bloomshipperconfig "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + bloomshipperconfig "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" ) func Test_calculateMaxLookBack(t *testing.T) { diff --git a/pkg/loki/runtime_config.go b/pkg/loki/runtime_config.go index 3432ee1b68b8..e8e3c7e31587 100644 --- a/pkg/loki/runtime_config.go +++ b/pkg/loki/runtime_config.go @@ -9,9 +9,9 @@ import ( "github.com/grafana/dskit/runtimeconfig" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/runtime" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/runtime" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) // runtimeConfigValues are values that can be reloaded from configuration file while Loki is running. diff --git a/pkg/loki/runtime_config_test.go b/pkg/loki/runtime_config_test.go index d0fd2ffa4103..cf604455929c 100644 --- a/pkg/loki/runtime_config_test.go +++ b/pkg/loki/runtime_config_test.go @@ -16,8 +16,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/runtime" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/runtime" + "github.com/grafana/loki/v3/pkg/validation" ) func Test_LoadRetentionRules(t *testing.T) { diff --git a/pkg/loki/version_handler.go b/pkg/loki/version_handler.go index 316d4825f700..ef49d1b0f7de 100644 --- a/pkg/loki/version_handler.go +++ b/pkg/loki/version_handler.go @@ -6,7 +6,7 @@ import ( prom "github.com/prometheus/prometheus/web/api/v1" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/build" ) func versionHandler() http.HandlerFunc { diff --git a/pkg/loki/version_handler_test.go b/pkg/loki/version_handler_test.go index c7b9094b4ae2..fb39b63f3756 100644 --- a/pkg/loki/version_handler_test.go +++ b/pkg/loki/version_handler_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/build" ) func TestVersionHandler(t *testing.T) { diff --git a/pkg/lokifrontend/config.go b/pkg/lokifrontend/config.go index 30ab5cd29fec..f53f17085c70 100644 --- a/pkg/lokifrontend/config.go +++ b/pkg/lokifrontend/config.go @@ -5,9 +5,9 @@ import ( "github.com/grafana/dskit/crypto/tls" - "github.com/grafana/loki/pkg/lokifrontend/frontend/transport" - v1 "github.com/grafana/loki/pkg/lokifrontend/frontend/v1" - v2 "github.com/grafana/loki/pkg/lokifrontend/frontend/v2" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/transport" + v1 "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v1" + v2 "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2" ) type Config struct { diff --git a/pkg/lokifrontend/frontend/config.go b/pkg/lokifrontend/frontend/config.go index 54eaa264d98f..fb61a482563f 100644 --- a/pkg/lokifrontend/frontend/config.go +++ b/pkg/lokifrontend/frontend/config.go @@ -9,11 +9,11 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/lokifrontend/frontend/transport" - v1 "github.com/grafana/loki/pkg/lokifrontend/frontend/v1" - v2 "github.com/grafana/loki/pkg/lokifrontend/frontend/v2" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/transport" + v1 "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v1" + v2 "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util" ) // This struct combines several configuration options together to preserve backwards compatibility. diff --git a/pkg/lokifrontend/frontend/downstream_roundtripper.go b/pkg/lokifrontend/frontend/downstream_roundtripper.go index 90f330900c32..86010e127621 100644 --- a/pkg/lokifrontend/frontend/downstream_roundtripper.go +++ b/pkg/lokifrontend/frontend/downstream_roundtripper.go @@ -10,7 +10,7 @@ import ( "github.com/grafana/dskit/user" "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) // RoundTripper that forwards requests to downstream URL. diff --git a/pkg/lokifrontend/frontend/transport/handler.go b/pkg/lokifrontend/frontend/transport/handler.go index 1c271805bbda..7c9e50daf8b5 100644 --- a/pkg/lokifrontend/frontend/transport/handler.go +++ b/pkg/lokifrontend/frontend/transport/handler.go @@ -23,11 +23,11 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - querier_stats "github.com/grafana/loki/pkg/querier/stats" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/server" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + querier_stats "github.com/grafana/loki/v3/pkg/querier/stats" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/server" ) const ( diff --git a/pkg/lokifrontend/frontend/transport/roundtripper.go b/pkg/lokifrontend/frontend/transport/roundtripper.go index c6e38315930a..d76512f5b00a 100644 --- a/pkg/lokifrontend/frontend/transport/roundtripper.go +++ b/pkg/lokifrontend/frontend/transport/roundtripper.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/dskit/httpgrpc" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) // GrpcRoundTripper is similar to http.RoundTripper, but works with HTTP requests converted to protobuf messages. diff --git a/pkg/lokifrontend/frontend/v1/frontend.go b/pkg/lokifrontend/frontend/v1/frontend.go index cf17b62b0318..3caae56955ca 100644 --- a/pkg/lokifrontend/frontend/v1/frontend.go +++ b/pkg/lokifrontend/frontend/v1/frontend.go @@ -18,12 +18,12 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v1/frontendv1pb" - "github.com/grafana/loki/pkg/querier/stats" - "github.com/grafana/loki/pkg/queue" - "github.com/grafana/loki/pkg/scheduler/limits" - "github.com/grafana/loki/pkg/util" - lokigrpc "github.com/grafana/loki/pkg/util/httpgrpc" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v1/frontendv1pb" + "github.com/grafana/loki/v3/pkg/querier/stats" + "github.com/grafana/loki/v3/pkg/queue" + "github.com/grafana/loki/v3/pkg/scheduler/limits" + "github.com/grafana/loki/v3/pkg/util" + lokigrpc "github.com/grafana/loki/v3/pkg/util/httpgrpc" ) var errTooManyRequest = httpgrpc.Errorf(http.StatusTooManyRequests, "too many outstanding requests") diff --git a/pkg/lokifrontend/frontend/v1/frontend_test.go b/pkg/lokifrontend/frontend/v1/frontend_test.go index a10a55b37984..2d26e9f188a3 100644 --- a/pkg/lokifrontend/frontend/v1/frontend_test.go +++ b/pkg/lokifrontend/frontend/v1/frontend_test.go @@ -28,15 +28,15 @@ import ( "go.uber.org/atomic" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/lokifrontend/frontend/transport" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v1/frontendv1pb" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - querier_worker "github.com/grafana/loki/pkg/querier/worker" - "github.com/grafana/loki/pkg/queue" - "github.com/grafana/loki/pkg/scheduler/limits" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/transport" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v1/frontendv1pb" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + querier_worker "github.com/grafana/loki/v3/pkg/querier/worker" + "github.com/grafana/loki/v3/pkg/queue" + "github.com/grafana/loki/v3/pkg/scheduler/limits" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/lokifrontend/frontend/v1/frontendv1pb/frontend.pb.go b/pkg/lokifrontend/frontend/v1/frontendv1pb/frontend.pb.go index 10d525a0a829..e31c88efa9e4 100644 --- a/pkg/lokifrontend/frontend/v1/frontendv1pb/frontend.pb.go +++ b/pkg/lokifrontend/frontend/v1/frontendv1pb/frontend.pb.go @@ -12,7 +12,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" httpgrpc "github.com/grafana/dskit/httpgrpc" - stats "github.com/grafana/loki/pkg/querier/stats" + stats "github.com/grafana/loki/v3/pkg/querier/stats" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/pkg/lokifrontend/frontend/v1/queue_test.go b/pkg/lokifrontend/frontend/v1/queue_test.go index a6f380afd492..bd429e11bccf 100644 --- a/pkg/lokifrontend/frontend/v1/queue_test.go +++ b/pkg/lokifrontend/frontend/v1/queue_test.go @@ -17,8 +17,8 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v1/frontendv1pb" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v1/frontendv1pb" + "github.com/grafana/loki/v3/pkg/util/constants" ) func setupFrontend(t *testing.T, config Config) *Frontend { diff --git a/pkg/lokifrontend/frontend/v2/frontend.go b/pkg/lokifrontend/frontend/v2/frontend.go index 99e3e05ad83c..531157302073 100644 --- a/pkg/lokifrontend/frontend/v2/frontend.go +++ b/pkg/lokifrontend/frontend/v2/frontend.go @@ -27,14 +27,14 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/lokifrontend/frontend/transport" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v2/frontendv2pb" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/querier/stats" - lokigrpc "github.com/grafana/loki/pkg/util/httpgrpc" - "github.com/grafana/loki/pkg/util/httpreq" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/transport" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2/frontendv2pb" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/stats" + lokigrpc "github.com/grafana/loki/v3/pkg/util/httpgrpc" + "github.com/grafana/loki/v3/pkg/util/httpreq" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/lokifrontend/frontend/v2/frontend_scheduler_worker.go b/pkg/lokifrontend/frontend/v2/frontend_scheduler_worker.go index b58c573b2913..b5cdf56f2d9a 100644 --- a/pkg/lokifrontend/frontend/v2/frontend_scheduler_worker.go +++ b/pkg/lokifrontend/frontend/v2/frontend_scheduler_worker.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/scheduler/schedulerpb" - "github.com/grafana/loki/pkg/util" - lokiutil "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/scheduler/schedulerpb" + "github.com/grafana/loki/v3/pkg/util" + lokiutil "github.com/grafana/loki/v3/pkg/util" ) type frontendSchedulerWorkers struct { diff --git a/pkg/lokifrontend/frontend/v2/frontend_test.go b/pkg/lokifrontend/frontend/v2/frontend_test.go index 9a87c5ff1c7c..41fa9653f694 100644 --- a/pkg/lokifrontend/frontend/v2/frontend_test.go +++ b/pkg/lokifrontend/frontend/v2/frontend_test.go @@ -19,14 +19,14 @@ import ( "go.uber.org/atomic" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v2/frontendv2pb" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/stats" - "github.com/grafana/loki/pkg/scheduler/schedulerpb" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/test" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2/frontendv2pb" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/stats" + "github.com/grafana/loki/v3/pkg/scheduler/schedulerpb" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/test" ) const testFrontendWorkerConcurrency = 5 diff --git a/pkg/lokifrontend/frontend/v2/frontendv2pb/frontend.pb.go b/pkg/lokifrontend/frontend/v2/frontendv2pb/frontend.pb.go index 3773159c0cc3..8fdae39bf525 100644 --- a/pkg/lokifrontend/frontend/v2/frontendv2pb/frontend.pb.go +++ b/pkg/lokifrontend/frontend/v2/frontendv2pb/frontend.pb.go @@ -9,8 +9,8 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" httpgrpc "github.com/grafana/dskit/httpgrpc" - queryrange "github.com/grafana/loki/pkg/querier/queryrange" - stats "github.com/grafana/loki/pkg/querier/stats" + queryrange "github.com/grafana/loki/v3/pkg/querier/queryrange" + stats "github.com/grafana/loki/v3/pkg/querier/stats" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/pkg/querier/astmapper/parallel.go b/pkg/querier/astmapper/parallel.go index 4ae5a5b5c7fb..e935f1420452 100644 --- a/pkg/querier/astmapper/parallel.go +++ b/pkg/querier/astmapper/parallel.go @@ -6,7 +6,7 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/prometheus/promql/parser" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var summableAggregates = map[parser.ItemType]struct{}{ diff --git a/pkg/querier/astmapper/shard_summer.go b/pkg/querier/astmapper/shard_summer.go index 8226f35804ee..12f7cf616f16 100644 --- a/pkg/querier/astmapper/shard_summer.go +++ b/pkg/querier/astmapper/shard_summer.go @@ -12,7 +12,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) const ( diff --git a/pkg/querier/handler.go b/pkg/querier/handler.go index f5415344ab0c..0f3feacc0087 100644 --- a/pkg/querier/handler.go +++ b/pkg/querier/handler.go @@ -7,10 +7,10 @@ import ( "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) type Handler struct { diff --git a/pkg/querier/http.go b/pkg/querier/http.go index 348de10d0e16..614fc5e46104 100644 --- a/pkg/querier/http.go +++ b/pkg/querier/http.go @@ -17,22 +17,22 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/loghttp" - loghttp_legacy "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange" - index_stats "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/util/httpreq" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/marshal" - marshal_legacy "github.com/grafana/loki/pkg/util/marshal/legacy" - serverutil "github.com/grafana/loki/pkg/util/server" - "github.com/grafana/loki/pkg/util/spanlogger" - util_validation "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/loghttp" + loghttp_legacy "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + index_stats "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/util/httpreq" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/marshal" + marshal_legacy "github.com/grafana/loki/v3/pkg/util/marshal/legacy" + serverutil "github.com/grafana/loki/v3/pkg/util/server" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + util_validation "github.com/grafana/loki/v3/pkg/util/validation" ) const ( @@ -382,6 +382,9 @@ func (q *QuerierAPI) DetectedFieldsHandler(ctx context.Context, req *logproto.De return nil, err } if resp == nil { // Some stores don't implement this + level.Debug(spanlogger.FromContext(ctx)).Log( + "msg", "queried store for detected fields that does not support it, no response from querier.DetectedFields", + ) return &logproto.DetectedFieldsResponse{ Fields: []*logproto.DetectedField{}, }, nil diff --git a/pkg/querier/http_test.go b/pkg/querier/http_test.go index 180e82c6b07d..a97e55f882ba 100644 --- a/pkg/querier/http_test.go +++ b/pkg/querier/http_test.go @@ -11,9 +11,9 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/mock" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/validation" "github.com/go-kit/log" "github.com/grafana/dskit/user" diff --git a/pkg/querier/ingester_querier.go b/pkg/querier/ingester_querier.go index fb57a415ba7f..68d88bbff450 100644 --- a/pkg/querier/ingester_querier.go +++ b/pkg/querier/ingester_querier.go @@ -6,7 +6,9 @@ import ( "strings" "time" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" + "golang.org/x/exp/slices" + + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" "github.com/gogo/status" "github.com/grafana/dskit/httpgrpc" @@ -18,15 +20,15 @@ import ( "github.com/prometheus/prometheus/model/labels" "google.golang.org/grpc/codes" - "github.com/grafana/loki/pkg/distributor/clientpool" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - index_stats "github.com/grafana/loki/pkg/storage/stores/index/stats" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/distributor/clientpool" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + index_stats "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type responseFromIngesters struct { @@ -356,6 +358,38 @@ func (q *IngesterQuerier) Volume(ctx context.Context, _ string, from, through mo return merged, nil } +func (q *IngesterQuerier) DetectedLabel(ctx context.Context, req *logproto.DetectedLabelsRequest) (*logproto.LabelToValuesResponse, error) { + ingesterResponses, err := q.forAllIngesters(ctx, func(ctx context.Context, client logproto.QuerierClient) (interface{}, error) { + return client.GetDetectedLabels(ctx, req) + }) + + if err != nil { + return nil, err + } + + labelMap := make(map[string][]string) + for _, resp := range ingesterResponses { + thisIngester := resp.response.(*logproto.LabelToValuesResponse) + for label, values := range thisIngester.Labels { + uniqueValues := make([]string, len(values.Values)) + allValues := thisIngester.Labels[label] + uniqueValues = append(uniqueValues, allValues.Values...) + + labelMap[label] = uniqueValues + } + } + mergedResult := make(map[string]*logproto.UniqueLabelValues) + for label, val := range labelMap { + uniqueValues := slices.CompactFunc(val, strings.EqualFold) + + mergedResult[label] = &logproto.UniqueLabelValues{ + Values: uniqueValues, + } + } + + return &logproto.LabelToValuesResponse{Labels: mergedResult}, nil +} + func convertMatchersToString(matchers []*labels.Matcher) string { out := strings.Builder{} out.WriteRune('{') diff --git a/pkg/querier/ingester_querier_test.go b/pkg/querier/ingester_querier_test.go index d5f4d872c508..d2cb00d82ec5 100644 --- a/pkg/querier/ingester_querier_test.go +++ b/pkg/querier/ingester_querier_test.go @@ -19,9 +19,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/util/constants" ) func TestIngesterQuerier_earlyExitOnQuorum(t *testing.T) { diff --git a/pkg/querier/limits/definitions.go b/pkg/querier/limits/definitions.go index cda30b116976..dec518a7fc7d 100644 --- a/pkg/querier/limits/definitions.go +++ b/pkg/querier/limits/definitions.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/grafana/loki/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql" ) type TimeRangeLimits interface { diff --git a/pkg/querier/multi_tenant_querier.go b/pkg/querier/multi_tenant_querier.go index 0643caeb7b31..fb90cb0ad447 100644 --- a/pkg/querier/multi_tenant_querier.go +++ b/pkg/querier/multi_tenant_querier.go @@ -3,22 +3,24 @@ package querier import ( "context" "fmt" + "strings" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/grafana/dskit/user" "github.com/prometheus/prometheus/model/labels" "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" ) const ( @@ -29,12 +31,14 @@ const ( // MultiTenantQuerier is able to query across different tenants. type MultiTenantQuerier struct { Querier + logger log.Logger } // NewMultiTenantQuerier returns a new querier able to query across different tenants. -func NewMultiTenantQuerier(querier Querier, _ log.Logger) *MultiTenantQuerier { +func NewMultiTenantQuerier(querier Querier, logger log.Logger) *MultiTenantQuerier { return &MultiTenantQuerier{ Querier: querier, + logger: logger, } } @@ -258,6 +262,26 @@ func (q *MultiTenantQuerier) Volume(ctx context.Context, req *logproto.VolumeReq return merged, nil } +func (q *MultiTenantQuerier) DetectedFields(ctx context.Context, req *logproto.DetectedFieldsRequest) (*logproto.DetectedFieldsResponse, error) { + tenantIDs, err := tenant.TenantIDs(ctx) + if err != nil { + return nil, err + } + + if len(tenantIDs) == 1 { + return q.Querier.DetectedFields(ctx, req) + } + + level.Debug(q.logger).Log( + "msg", "detected fields requested for multiple tenants, but not yet supported", + "tenantIDs", strings.Join(tenantIDs, ","), + ) + + return &logproto.DetectedFieldsResponse{ + Fields: []*logproto.DetectedField{}, + }, nil +} + func (q *MultiTenantQuerier) DetectedLabels(ctx context.Context, req *logproto.DetectedLabelsRequest) (*logproto.DetectedLabelsResponse, error) { // TODO(shantanu) tenantIDs, err := tenant.TenantID(ctx) @@ -308,7 +332,7 @@ func replaceMatchers(expr syntax.Expr, matchers []*labels.Matcher) syntax.Expr { } // See https://github.com/grafana/mimir/blob/114ab88b50638a2047e2ca2a60640f6ca6fe8c17/pkg/querier/tenantfederation/tenant_federation.go#L29-L69 -// filterValuesByMatchers applies matchers to inputed `idLabelName` and +// filterValuesByMatchers applies matchers to inputted `idLabelName` and // `ids`. A set of matched IDs is returned and also all label matchers not // targeting the `idLabelName` label. // diff --git a/pkg/querier/multi_tenant_querier_test.go b/pkg/querier/multi_tenant_querier_test.go index 0d17bcc9adff..38f190562ea1 100644 --- a/pkg/querier/multi_tenant_querier_test.go +++ b/pkg/querier/multi_tenant_querier_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" ) func TestMultiTenantQuerier_SelectLogs(t *testing.T) { diff --git a/pkg/querier/plan/plan.go b/pkg/querier/plan/plan.go index d6548537a394..ea872ac11cc5 100644 --- a/pkg/querier/plan/plan.go +++ b/pkg/querier/plan/plan.go @@ -3,8 +3,8 @@ package plan import ( "bytes" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/util" ) type QueryPlan struct { diff --git a/pkg/querier/plan/plan_test.go b/pkg/querier/plan/plan_test.go index 60f7d3fad180..5998448cfa56 100644 --- a/pkg/querier/plan/plan_test.go +++ b/pkg/querier/plan/plan_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) func TestMarshalTo(t *testing.T) { diff --git a/pkg/querier/querier.go b/pkg/querier/querier.go index 9527980e9d5f..dd550377d1a4 100644 --- a/pkg/querier/querier.go +++ b/pkg/querier/querier.go @@ -3,15 +3,24 @@ package querier import ( "context" "flag" + "fmt" "net/http" + "regexp" + "sort" + "strconv" "time" + "github.com/axiomhq/hyperloglog" + "github.com/dustin/go-humanize" "github.com/go-kit/log" "github.com/opentracing/opentracing-go" + "golang.org/x/exp/slices" - "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" + logql_log "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" "github.com/go-kit/log/level" "github.com/grafana/dskit/httpgrpc" @@ -23,19 +32,19 @@ import ( "golang.org/x/sync/errgroup" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/compactor/deletion" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - querier_limits "github.com/grafana/loki/pkg/querier/limits" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - listutil "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/spanlogger" - util_validation "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + querier_limits "github.com/grafana/loki/v3/pkg/querier/limits" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + listutil "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + util_validation "github.com/grafana/loki/v3/pkg/util/validation" ) const ( @@ -900,25 +909,283 @@ func (q *SingleTenantQuerier) Volume(ctx context.Context, req *logproto.VolumeRe return seriesvolume.Merge(responses, req.Limit), nil } -func (q *SingleTenantQuerier) DetectedFields(_ context.Context, _ *logproto.DetectedFieldsRequest) (*logproto.DetectedFieldsResponse, error) { - return &logproto.DetectedFieldsResponse{ - Fields: []*logproto.DetectedField{ - { - Label: "foo", - Type: logproto.DetectedFieldString, - Cardinality: 1, - }, - }, +func (q *SingleTenantQuerier) DetectedLabels(ctx context.Context, req *logproto.DetectedLabelsRequest) (*logproto.DetectedLabelsResponse, error) { + var ingesterLabels *logproto.LabelToValuesResponse + var detectedLabels []*logproto.DetectedLabel + + g, ctx := errgroup.WithContext(ctx) + ingesterQueryInterval, _ := q.buildQueryIntervals(*req.Start, *req.End) + if !q.cfg.QueryStoreOnly { + g.Go(func() error { + var err error + splitReq := *req + splitReq.Start = &ingesterQueryInterval.start + splitReq.End = &ingesterQueryInterval.end + + ingesterLabels, err = q.ingesterQuerier.DetectedLabel(ctx, &splitReq) + level.Info(q.logger).Log("msg", ingesterLabels) + return err + }) + } + + if err := g.Wait(); err != nil { + return nil, err + } + + for label, values := range ingesterLabels.Labels { + if q.isLabelRelevant(label, values) { + detectedLabels = append(detectedLabels, &logproto.DetectedLabel{Label: label, Cardinality: uint64(len(values.Values))}) + } + } + + return &logproto.DetectedLabelsResponse{ + DetectedLabels: detectedLabels, }, nil } -func (q *SingleTenantQuerier) DetectedLabels(_ context.Context, _ *logproto.DetectedLabelsRequest) (*logproto.DetectedLabelsResponse, error) { - return &logproto.DetectedLabelsResponse{ - DetectedLabels: []*logproto.DetectedLabel{ - {Label: "namespace"}, - {Label: "cluster"}, - {Label: "instance"}, - {Label: "pod"}, +func (q *SingleTenantQuerier) isLabelRelevant(label string, values *logproto.UniqueLabelValues) bool { + staticLabels := []string{"pod", "namespace", "cluster", "instance"} + cardinality := len(values.Values) + // TODO(shantanu) make these values configurable + if !slices.Contains(staticLabels, label) && + (cardinality < 1 || cardinality > 50) || + containsAllIDTypes(values.Values) { + return false + } + + return true +} + +// containsAllIDTypes filters out all UUID, GUID and numeric types. Returns false if even one value is not of the type +func containsAllIDTypes(values []string) bool { + pattern := `^(?:(?:[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})|(?:(?:\{)?[0-9a-fA-F]{8}(?:-?[0-9a-fA-F]{4}){3}-?[0-9a-fA-F]{12}(?:\})?)|(\d+(?:\.\d+)?))$` + + re := regexp.MustCompile(pattern) + + for _, v := range values { + if !re.MatchString(v) { + return false + } + } + + return true +} + +func (q *SingleTenantQuerier) DetectedFields(ctx context.Context, req *logproto.DetectedFieldsRequest) (*logproto.DetectedFieldsResponse, error) { + expr, err := syntax.ParseLogSelector(req.Query, true) + if err != nil { + return nil, err + } + params := logql.SelectLogParams{ + QueryRequest: &logproto.QueryRequest{ + Start: req.Start, + End: req.End, + Limit: req.LineLimit, + Direction: logproto.BACKWARD, + Selector: expr.String(), + Plan: &plan.QueryPlan{ + AST: expr, + }, }, + } + + iters, err := q.SelectLogs(ctx, params) + if err != nil { + return nil, err + } + + //TODO(twhitney): converting from a step to a duration should be abstracted and reused, + // doing this in a few places now. + streams, err := streamsForFieldDetection(iters, req.LineLimit, time.Duration(req.Step*1e6)) + if err != nil { + return nil, err + } + + detectedFields := parseDetectedFields(ctx, req.FieldLimit, streams) + + fields := make([]*logproto.DetectedField, len(detectedFields)) + fieldCount := 0 + for k, v := range detectedFields { + fields[fieldCount] = &logproto.DetectedField{ + Label: k, + Type: v.fieldType, + Cardinality: v.Estimate(), + } + + fieldCount++ + } + + return &logproto.DetectedFieldsResponse{ + Fields: fields, }, nil } + +type parsedFields struct { + sketch *hyperloglog.Sketch + isTypeDetected bool + fieldType logproto.DetectedFieldType +} + +func newParsedFields() *parsedFields { + return &parsedFields{ + sketch: hyperloglog.New(), + isTypeDetected: false, + fieldType: logproto.DetectedFieldString, + } +} + +func (p *parsedFields) Insert(value string) { + p.sketch.Insert([]byte(value)) +} + +func (p *parsedFields) Estimate() uint64 { + return p.sketch.Estimate() +} + +func (p *parsedFields) DetermineType(value string) { + p.fieldType = determineType(value) + p.isTypeDetected = true +} + +func determineType(value string) logproto.DetectedFieldType { + if _, err := strconv.ParseInt(value, 10, 64); err == nil { + return logproto.DetectedFieldInt + } + + if _, err := strconv.ParseFloat(value, 64); err == nil { + return logproto.DetectedFieldFloat + } + + if _, err := strconv.ParseBool(value); err == nil { + return logproto.DetectedFieldBoolean + } + + if _, err := time.ParseDuration(value); err == nil { + return logproto.DetectedFieldDuration + } + + if _, err := humanize.ParseBytes(value); err == nil { + return logproto.DetectedFieldBytes + } + + return logproto.DetectedFieldString +} + +func parseDetectedFields(ctx context.Context, limit uint32, streams logqlmodel.Streams) map[string]*parsedFields { + detectedFields := make(map[string]*parsedFields, limit) + fieldCount := uint32(0) + + for _, stream := range streams { + + level.Debug(spanlogger.FromContext(ctx)).Log( + "detected_fields", "true", + "msg", fmt.Sprintf("looking for detected fields in stream %d with %d lines", stream.Hash, len(stream.Entries))) + + for _, entry := range stream.Entries { + detected := parseLine(entry.Line) + for k, vals := range detected { + if fieldCount >= limit { + return detectedFields + } + + if _, ok := detectedFields[k]; !ok { + detectedFields[k] = newParsedFields() + } + + for _, v := range vals { + parsedFields := detectedFields[k] + if !parsedFields.isTypeDetected { + parsedFields.DetermineType(v) + } + + parsedFields.Insert(v) + } + + level.Debug(spanlogger.FromContext(ctx)).Log( + "detected_fields", "true", + "msg", fmt.Sprintf("detected field %s with %d values", k, len(vals))) + + fieldCount++ + } + } + } + + return detectedFields +} + +func parseLine(line string) map[string][]string { + logFmtParser := logql_log.NewLogfmtParser(true, false) + jsonParser := logql_log.NewJSONParser() + + lbls := logql_log.NewBaseLabelsBuilder().ForLabels(labels.EmptyLabels(), 0) + _, logfmtSuccess := logFmtParser.Process(0, []byte(line), lbls) + if !logfmtSuccess || lbls.HasErr() { + lbls.Reset() + _, jsonSuccess := jsonParser.Process(0, []byte(line), lbls) + if !jsonSuccess || lbls.HasErr() { + return map[string][]string{} + } + } + + parsedLabels := map[string]map[string]struct{}{} + for _, lbl := range lbls.LabelsResult().Labels() { + if values, ok := parsedLabels[lbl.Name]; ok { + values[lbl.Value] = struct{}{} + } else { + parsedLabels[lbl.Name] = map[string]struct{}{lbl.Value: {}} + } + } + + result := make(map[string][]string, len(parsedLabels)) + for lbl, values := range parsedLabels { + vals := make([]string, 0, len(values)) + for v := range values { + vals = append(vals, v) + } + result[lbl] = vals + } + + return result +} + +// readStreams reads the streams from the iterator and returns them sorted. +// If categorizeLabels is true, the stream labels contains just the stream labels and entries inside each stream have their +// structuredMetadata and parsed fields populated with structured metadata labels plus the parsed labels respectively. +// Otherwise, the stream labels are the whole series labels including the stream labels, structured metadata labels and parsed labels. +func streamsForFieldDetection(i iter.EntryIterator, size uint32, interval time.Duration) (logqlmodel.Streams, error) { + streams := map[string]*logproto.Stream{} + respSize := uint32(0) + // lastEntry should be a really old time so that the first comparison is always true, we use a negative + // value here because many unit tests start at time.Unix(0,0) + lastEntry := time.Unix(-100, 0) + for respSize < size && i.Next() { + streamLabels, entry := i.Labels(), i.Entry() + + // Always going backward + shouldOutput := entry.Timestamp.Equal(lastEntry.Add(-interval)) || + entry.Timestamp.Before(lastEntry.Add(-interval)) + + // If step == 0 output every line. + // If lastEntry.Unix < 0 this is the first pass through the loop and we should output the line. + // Then check to see if the entry is equal to, or past a forward step + if interval == 0 || lastEntry.Unix() < 0 || shouldOutput { + stream, ok := streams[streamLabels] + if !ok { + stream = &logproto.Stream{ + Labels: streamLabels, + } + streams[streamLabels] = stream + } + stream.Entries = append(stream.Entries, entry) + lastEntry = i.Entry().Timestamp + respSize++ + } + } + + result := make(logqlmodel.Streams, 0, len(streams)) + for _, stream := range streams { + result = append(result, *stream) + } + sort.Sort(result) + return result, i.Error() +} diff --git a/pkg/querier/querier_mock_test.go b/pkg/querier/querier_mock_test.go index 7be2c0cefed0..83b1b6e6a8a4 100644 --- a/pkg/querier/querier_mock_test.go +++ b/pkg/querier/querier_mock_test.go @@ -7,9 +7,9 @@ import ( "math" "time" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" "github.com/grafana/dskit/grpcclient" "github.com/grafana/dskit/ring" @@ -21,19 +21,19 @@ import ( "google.golang.org/grpc/health/grpc_health_v1" grpc_metadata "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/distributor/clientpool" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/distributor/clientpool" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/validation" ) // querierClientMock is a mockable version of QuerierClient, used in querier diff --git a/pkg/querier/querier_test.go b/pkg/querier/querier_test.go index e9c36f7ae91e..df87a72df366 100644 --- a/pkg/querier/querier_test.go +++ b/pkg/querier/querier_test.go @@ -19,15 +19,15 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/compactor/deletion" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) const ( @@ -1368,3 +1368,49 @@ func (d *mockDeleteGettter) GetAllDeleteRequestsForUser(_ context.Context, userI d.user = userID return d.results, nil } + +func TestQuerier_isLabelRelevant(t *testing.T) { + for _, tc := range []struct { + name string + label string + values *logproto.UniqueLabelValues + expected bool + }{ + { + label: "uuidv4 values are not relevant", + values: &logproto.UniqueLabelValues{Values: []string{"751e8ee6-b377-4b2e-b7b5-5508fbe980ef", "6b7e2663-8ecb-42e1-8bdc-0c5de70185b3", "2e1e67ff-be4f-47b8-aee1-5d67ff1ddabf", "c95b2d62-74ed-4ed7-a8a1-eb72fc67946e"}}, + expected: false, + }, + { + label: "guid values are not relevant", + values: &logproto.UniqueLabelValues{Values: []string{"57808f62-f117-4a22-84a0-bc3282c7f106", "5076e837-cd8d-4dd7-95ff-fecb087dccf6", "2e2a6554-1744-4399-b89a-88ae79c27096", "d3c31248-ec0c-4bc4-b11c-8fb1cfb42e62"}}, + expected: false, + }, + { + label: "integer values are not relevant", + values: &logproto.UniqueLabelValues{Values: []string{"1", "2", "3", "4"}}, + expected: false, + }, + { + label: "string values are relevant", + values: &logproto.UniqueLabelValues{Values: []string{"ingester", "querier", "query-frontend", "index-gateway"}}, + expected: true, + }, + { + label: "guid with braces are not relevant", + values: &logproto.UniqueLabelValues{Values: []string{"{E9550CF7-58D9-48B9-8845-D9800C651AAC}", "{1617921B-1749-4FF0-A058-31AFB5D98149}", "{C119D92E-A4B9-48A3-A92C-6CA8AA8A6CCC}", "{228AAF1D-2DE7-4909-A4E9-246A7FA9D988}"}}, + expected: false, + }, + { + label: "float values are not relevant", + values: &logproto.UniqueLabelValues{Values: []string{"1.2", "2.5", "3.3", "4.1"}}, + expected: false, + }, + } { + t.Run(tc.name, func(t *testing.T) { + querier := &SingleTenantQuerier{cfg: mockQuerierConfig()} + assert.Equal(t, tc.expected, querier.isLabelRelevant(tc.label, tc.values)) + }) + + } +} diff --git a/pkg/querier/queryrange/benchmarkutils_test.go b/pkg/querier/queryrange/benchmarkutils_test.go index 80552f552d20..afe5f2866c04 100644 --- a/pkg/querier/queryrange/benchmarkutils_test.go +++ b/pkg/querier/queryrange/benchmarkutils_test.go @@ -3,7 +3,7 @@ package queryrange import ( "sort" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) type entry struct { diff --git a/pkg/querier/queryrange/codec.go b/pkg/querier/queryrange/codec.go index 6bcfb03b3336..7bc1913745ab 100644 --- a/pkg/querier/queryrange/codec.go +++ b/pkg/querier/queryrange/codec.go @@ -14,8 +14,8 @@ import ( "strings" "time" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" "github.com/grafana/dskit/httpgrpc" "github.com/grafana/dskit/user" @@ -25,20 +25,20 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/timestamp" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - indexStats "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/httpreq" - "github.com/grafana/loki/pkg/util/marshal" - marshal_legacy "github.com/grafana/loki/pkg/util/marshal/legacy" - "github.com/grafana/loki/pkg/util/querylimits" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + indexStats "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/marshal" + marshal_legacy "github.com/grafana/loki/v3/pkg/util/marshal/legacy" + "github.com/grafana/loki/v3/pkg/util/querylimits" ) var DefaultCodec = &Codec{} @@ -469,6 +469,11 @@ func (Codec) DecodeRequest(_ context.Context, r *http.Request, _ []string) (quer return nil, httpgrpc.Errorf(http.StatusBadRequest, err.Error()) } + _, err = syntax.ParseExpr(req.Query) + if err != nil { + return nil, httpgrpc.Errorf(http.StatusBadRequest, err.Error()) + } + return &DetectedFieldsRequest{ DetectedFieldsRequest: *req, path: r.URL.Path, @@ -520,7 +525,7 @@ func (Codec) DecodeHTTPGrpcRequest(ctx context.Context, r *httpgrpc.HTTPRequest) ctx = httpreq.InjectQueryTags(ctx, queryTags) } - // Add disable pipleine wrappers + // Add disable pipeline wrappers if disableWrappers := httpReq.Header.Get(httpreq.LokiDisablePipelineWrappersHeader); disableWrappers != "" { httpreq.InjectHeader(ctx, httpreq.LokiDisablePipelineWrappersHeader, disableWrappers) } @@ -1070,7 +1075,6 @@ func decodeResponseJSON(r *http.Response, req queryrangebase.Request) (queryrang } func decodeResponseJSONFrom(buf []byte, req queryrangebase.Request, headers http.Header) (queryrangebase.Response, error) { - switch req := req.(type) { case *LokiSeriesRequest: var resp LokiSeriesResponse @@ -1131,6 +1135,15 @@ func decodeResponseJSONFrom(buf []byte, req queryrangebase.Request, headers http Response: &resp, Headers: httpResponseHeadersToPromResponseHeaders(headers), }, nil + case *DetectedLabelsRequest: + var resp logproto.DetectedLabelsResponse + if err := json.Unmarshal(buf, &resp); err != nil { + return nil, httpgrpc.Errorf(http.StatusInternalServerError, "error decoding response: %v", err) + } + return &DetectedLabelsResponse{ + Response: &resp, + Headers: httpResponseHeadersToPromResponseHeaders(headers), + }, nil default: var resp loghttp.QueryResponse if err := resp.UnmarshalJSON(buf); err != nil { @@ -1744,9 +1757,11 @@ func (p paramsRangeWrapper) End() time.Time { func (p paramsRangeWrapper) Step() time.Duration { return time.Duration(p.GetStep() * 1e6) } + func (p paramsRangeWrapper) Interval() time.Duration { return time.Duration(p.GetInterval() * 1e6) } + func (p paramsRangeWrapper) Direction() logproto.Direction { return p.GetDirection() } @@ -1992,8 +2007,8 @@ type DetectedFieldsRequest struct { func NewDetectedFieldsRequest(start, end time.Time, query, path string) *DetectedFieldsRequest { return &DetectedFieldsRequest{ DetectedFieldsRequest: logproto.DetectedFieldsRequest{ - Start: &start, - End: &end, + Start: start, + End: end, Query: query, }, path: path, @@ -2005,19 +2020,19 @@ func (r *DetectedFieldsRequest) AsProto() *logproto.DetectedFieldsRequest { } func (r *DetectedFieldsRequest) GetEnd() time.Time { - return *r.End + return r.End } func (r *DetectedFieldsRequest) GetEndTs() time.Time { - return *r.End + return r.End } func (r *DetectedFieldsRequest) GetStart() time.Time { - return *r.Start + return r.Start } func (r *DetectedFieldsRequest) GetStartTs() time.Time { - return *r.Start + return r.Start } func (r *DetectedFieldsRequest) GetStep() int64 { @@ -2030,8 +2045,8 @@ func (r *DetectedFieldsRequest) Path() string { func (r *DetectedFieldsRequest) WithStartEnd(s, e time.Time) queryrangebase.Request { clone := *r - clone.Start = &s - clone.End = &e + clone.Start = s + clone.End = e return &clone } diff --git a/pkg/querier/queryrange/codec_test.go b/pkg/querier/queryrange/codec_test.go index cdc95865e12c..35a101cb590a 100644 --- a/pkg/querier/queryrange/codec_test.go +++ b/pkg/querier/queryrange/codec_test.go @@ -24,16 +24,16 @@ import ( "github.com/prometheus/prometheus/promql/parser" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) func init() { diff --git a/pkg/querier/queryrange/downstreamer.go b/pkg/querier/queryrange/downstreamer.go index 4db8034291f6..3d1485d5a77e 100644 --- a/pkg/querier/queryrange/downstreamer.go +++ b/pkg/querier/queryrange/downstreamer.go @@ -14,12 +14,12 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/querier/queryrange/downstreamer_test.go b/pkg/querier/queryrange/downstreamer_test.go index 95b79d72d30a..0dddddab9b00 100644 --- a/pkg/querier/queryrange/downstreamer_test.go +++ b/pkg/querier/queryrange/downstreamer_test.go @@ -17,13 +17,13 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func testSampleStreams() []queryrangebase.SampleStream { diff --git a/pkg/querier/queryrange/extensions.go b/pkg/querier/queryrange/extensions.go index 40e5321e9db6..6e377295283f 100644 --- a/pkg/querier/queryrange/extensions.go +++ b/pkg/querier/queryrange/extensions.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/jsonparser" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) // To satisfy queryrange.Response interface(https://github.com/cortexproject/cortex/blob/21bad57b346c730d684d6d0205efef133422ab28/pkg/querier/queryrange/query_range.go#L88) diff --git a/pkg/querier/queryrange/extensions_test.go b/pkg/querier/queryrange/extensions_test.go index a7354d57eb05..727931bed458 100644 --- a/pkg/querier/queryrange/extensions_test.go +++ b/pkg/querier/queryrange/extensions_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) func Test_setHeader(t *testing.T) { diff --git a/pkg/querier/queryrange/index_stats_cache.go b/pkg/querier/queryrange/index_stats_cache.go index a91721bf3687..b536fe7963ef 100644 --- a/pkg/querier/queryrange/index_stats_cache.go +++ b/pkg/querier/queryrange/index_stats_cache.go @@ -11,12 +11,12 @@ import ( "github.com/grafana/dskit/tenant" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/validation" ) type IndexStatsSplitter struct { diff --git a/pkg/querier/queryrange/index_stats_cache_test.go b/pkg/querier/queryrange/index_stats_cache_test.go index 1127b88576e1..4d0f4124788a 100644 --- a/pkg/querier/queryrange/index_stats_cache_test.go +++ b/pkg/querier/queryrange/index_stats_cache_test.go @@ -11,13 +11,13 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) func TestIndexStatsCache(t *testing.T) { diff --git a/pkg/querier/queryrange/ingester_query_window.go b/pkg/querier/queryrange/ingester_query_window.go index 7a161f40c007..d2bae2233c38 100644 --- a/pkg/querier/queryrange/ingester_query_window.go +++ b/pkg/querier/queryrange/ingester_query_window.go @@ -3,8 +3,8 @@ package queryrange import ( "time" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/validation" ) // SplitIntervalForTimeRange returns the correct split interval to use. It accounts for the given upperBound value being diff --git a/pkg/querier/queryrange/instant_metric_cache.go b/pkg/querier/queryrange/instant_metric_cache.go index 6f505ebf8016..37f97a3d032b 100644 --- a/pkg/querier/queryrange/instant_metric_cache.go +++ b/pkg/querier/queryrange/instant_metric_cache.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" ) type InstantMetricSplitter struct { diff --git a/pkg/querier/queryrange/instrument.go b/pkg/querier/queryrange/instrument.go index 497cfb2dd8a1..a2c3be1a733c 100644 --- a/pkg/querier/queryrange/instrument.go +++ b/pkg/querier/queryrange/instrument.go @@ -12,7 +12,7 @@ import ( "github.com/grafana/dskit/server" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) const ( diff --git a/pkg/querier/queryrange/labels_cache.go b/pkg/querier/queryrange/labels_cache.go index 3a940e34fa03..5979a0c2f91e 100644 --- a/pkg/querier/queryrange/labels_cache.go +++ b/pkg/querier/queryrange/labels_cache.go @@ -8,10 +8,10 @@ import ( "github.com/go-kit/log" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util/validation" ) type cacheKeyLabels struct { diff --git a/pkg/querier/queryrange/labels_cache_test.go b/pkg/querier/queryrange/labels_cache_test.go index 90b85cb1faf8..22e967a11376 100644 --- a/pkg/querier/queryrange/labels_cache_test.go +++ b/pkg/querier/queryrange/labels_cache_test.go @@ -11,12 +11,12 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util" ) func TestCacheKeyLabels_GenerateCacheKey(t *testing.T) { diff --git a/pkg/querier/queryrange/limits.go b/pkg/querier/queryrange/limits.go index ab7818460738..e1b11fde3449 100644 --- a/pkg/querier/queryrange/limits.go +++ b/pkg/querier/queryrange/limits.go @@ -22,18 +22,18 @@ import ( "github.com/prometheus/prometheus/model/timestamp" "golang.org/x/sync/semaphore" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - queryrange_limits "github.com/grafana/loki/pkg/querier/queryrange/limits" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + queryrange_limits "github.com/grafana/loki/v3/pkg/querier/queryrange/limits" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/util/validation" ) const ( diff --git a/pkg/querier/queryrange/limits/definitions.go b/pkg/querier/queryrange/limits/definitions.go index f2e55728a594..be366fdc10a4 100644 --- a/pkg/querier/queryrange/limits/definitions.go +++ b/pkg/querier/queryrange/limits/definitions.go @@ -4,8 +4,8 @@ import ( "context" "time" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) // Limits extends the cortex limits interface with support for per tenant splitby parameters diff --git a/pkg/querier/queryrange/limits_test.go b/pkg/querier/queryrange/limits_test.go index 07bf4d1f30a7..7591d5d170f7 100644 --- a/pkg/querier/queryrange/limits_test.go +++ b/pkg/querier/queryrange/limits_test.go @@ -17,16 +17,16 @@ import ( "go.uber.org/atomic" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/querier/plan" - base "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/querier/plan" + base "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/math" ) func TestLimits(t *testing.T) { diff --git a/pkg/querier/queryrange/log_result_cache.go b/pkg/querier/queryrange/log_result_cache.go index fd26b67412a6..4a74b71d8d76 100644 --- a/pkg/querier/queryrange/log_result_cache.go +++ b/pkg/querier/queryrange/log_result_cache.go @@ -17,13 +17,13 @@ import ( "github.com/prometheus/common/model" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/validation" ) // LogResultCacheMetrics is the metrics wrapper used in log result cache. diff --git a/pkg/querier/queryrange/log_result_cache_test.go b/pkg/querier/queryrange/log_result_cache_test.go index 5da4aee7c4be..608820d08f8a 100644 --- a/pkg/querier/queryrange/log_result_cache_test.go +++ b/pkg/querier/queryrange/log_result_cache_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" ) const ( diff --git a/pkg/querier/queryrange/marshal.go b/pkg/querier/queryrange/marshal.go index 3640012f88a2..cc8602d1ce87 100644 --- a/pkg/querier/queryrange/marshal.go +++ b/pkg/querier/queryrange/marshal.go @@ -17,17 +17,17 @@ import ( "github.com/prometheus/prometheus/promql" "google.golang.org/grpc/codes" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/sketch" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util/httpreq" - "github.com/grafana/loki/pkg/util/querylimits" - "github.com/grafana/loki/pkg/util/server" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/sketch" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/querylimits" + "github.com/grafana/loki/v3/pkg/util/server" ) const ( @@ -214,6 +214,8 @@ func QueryResponseUnwrap(res *QueryResponse) (queryrangebase.Response, error) { return concrete.QuantileSketches, nil case *QueryResponse_DetectedLabels: return concrete.DetectedLabels, nil + case *QueryResponse_DetectedFields: + return concrete.DetectedFields, nil default: return nil, fmt.Errorf("unsupported QueryResponse response type, got (%T)", res.Response) } @@ -251,6 +253,8 @@ func QueryResponseWrap(res queryrangebase.Response) (*QueryResponse, error) { p.Response = &QueryResponse_ShardsResponse{response} case *DetectedLabelsResponse: p.Response = &QueryResponse_DetectedLabels{response} + case *DetectedFieldsResponse: + p.Response = &QueryResponse_DetectedFields{response} default: return nil, fmt.Errorf("invalid response format, got (%T)", res) } @@ -343,6 +347,10 @@ func (Codec) QueryRequestUnwrap(ctx context.Context, req *QueryRequest) (queryra return &DetectedLabelsRequest{ DetectedLabelsRequest: *concrete.DetectedLabels, }, ctx, nil + case *QueryRequest_DetectedFields: + return &DetectedFieldsRequest{ + DetectedFieldsRequest: *concrete.DetectedFields, + }, ctx, nil default: return nil, ctx, fmt.Errorf("unsupported request type while unwrapping, got (%T)", req.Request) } @@ -371,6 +379,8 @@ func (Codec) QueryRequestWrap(ctx context.Context, r queryrangebase.Request) (*Q result.Request = &QueryRequest_ShardsRequest{ShardsRequest: req} case *DetectedLabelsRequest: result.Request = &QueryRequest_DetectedLabels{DetectedLabels: &req.DetectedLabelsRequest} + case *DetectedFieldsRequest: + result.Request = &QueryRequest_DetectedFields{DetectedFields: &req.DetectedFieldsRequest} default: return nil, fmt.Errorf("unsupported request type while wrapping, got (%T)", r) } diff --git a/pkg/querier/queryrange/marshal_test.go b/pkg/querier/queryrange/marshal_test.go index 6fa9bbe23897..43d02f1071b6 100644 --- a/pkg/querier/queryrange/marshal_test.go +++ b/pkg/querier/queryrange/marshal_test.go @@ -6,12 +6,12 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) func TestResultToResponse(t *testing.T) { diff --git a/pkg/querier/queryrange/metrics.go b/pkg/querier/queryrange/metrics.go index 9482becf9881..bd9ce6fa79ba 100644 --- a/pkg/querier/queryrange/metrics.go +++ b/pkg/querier/queryrange/metrics.go @@ -6,9 +6,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) type Metrics struct { diff --git a/pkg/querier/queryrange/ordering.go b/pkg/querier/queryrange/ordering.go index 761ec9cc3faf..7eb61a604ef0 100644 --- a/pkg/querier/queryrange/ordering.go +++ b/pkg/querier/queryrange/ordering.go @@ -3,7 +3,7 @@ package queryrange import ( "sort" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) /* diff --git a/pkg/querier/queryrange/prometheus.go b/pkg/querier/queryrange/prometheus.go index 2a8ff78c164e..22ee8b3c1d4d 100644 --- a/pkg/querier/queryrange/prometheus.go +++ b/pkg/querier/queryrange/prometheus.go @@ -11,10 +11,10 @@ import ( otlog "github.com/opentracing/opentracing-go/log" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" ) var ( diff --git a/pkg/querier/queryrange/prometheus_test.go b/pkg/querier/queryrange/prometheus_test.go index a5bea2868425..6e3a4ac3e4d4 100644 --- a/pkg/querier/queryrange/prometheus_test.go +++ b/pkg/querier/queryrange/prometheus_test.go @@ -7,9 +7,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) var emptyStats = `"stats": { diff --git a/pkg/querier/queryrange/queryrange.pb.go b/pkg/querier/queryrange/queryrange.pb.go index 2312afbd71e7..a602dcafcd80 100644 --- a/pkg/querier/queryrange/queryrange.pb.go +++ b/pkg/querier/queryrange/queryrange.pb.go @@ -12,15 +12,15 @@ import ( github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" - github_com_grafana_loki_pkg_logproto "github.com/grafana/loki/pkg/logproto" - logproto "github.com/grafana/loki/pkg/logproto" - stats "github.com/grafana/loki/pkg/logqlmodel/stats" _ "github.com/grafana/loki/pkg/push" github_com_grafana_loki_pkg_push "github.com/grafana/loki/pkg/push" - github_com_grafana_loki_pkg_querier_plan "github.com/grafana/loki/pkg/querier/plan" - queryrangebase "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - _ "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" - github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" + github_com_grafana_loki_v3_pkg_logproto "github.com/grafana/loki/v3/pkg/logproto" + logproto "github.com/grafana/loki/v3/pkg/logproto" + stats "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + github_com_grafana_loki_v3_pkg_querier_plan "github.com/grafana/loki/v3/pkg/querier/plan" + queryrangebase "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + _ "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" + github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" io "io" math "math" math_bits "math/bits" @@ -42,16 +42,16 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type LokiRequest struct { - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - Step int64 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` - Interval int64 `protobuf:"varint,9,opt,name=interval,proto3" json:"interval,omitempty"` - StartTs time.Time `protobuf:"bytes,4,opt,name=startTs,proto3,stdtime" json:"startTs"` - EndTs time.Time `protobuf:"bytes,5,opt,name=endTs,proto3,stdtime" json:"endTs"` - Direction logproto.Direction `protobuf:"varint,6,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` - Path string `protobuf:"bytes,7,opt,name=path,proto3" json:"path,omitempty"` - Shards []string `protobuf:"bytes,8,rep,name=shards,proto3" json:"shards"` - Plan *github_com_grafana_loki_pkg_querier_plan.QueryPlan `protobuf:"bytes,10,opt,name=plan,proto3,customtype=github.com/grafana/loki/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + Step int64 `protobuf:"varint,3,opt,name=step,proto3" json:"step,omitempty"` + Interval int64 `protobuf:"varint,9,opt,name=interval,proto3" json:"interval,omitempty"` + StartTs time.Time `protobuf:"bytes,4,opt,name=startTs,proto3,stdtime" json:"startTs"` + EndTs time.Time `protobuf:"bytes,5,opt,name=endTs,proto3,stdtime" json:"endTs"` + Direction logproto.Direction `protobuf:"varint,6,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` + Path string `protobuf:"bytes,7,opt,name=path,proto3" json:"path,omitempty"` + Shards []string `protobuf:"bytes,8,rep,name=shards,proto3" json:"shards"` + Plan *github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `protobuf:"bytes,10,opt,name=plan,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` } func (m *LokiRequest) Reset() { *m = LokiRequest{} } @@ -150,13 +150,13 @@ func (m *LokiRequest) GetShards() []string { } type LokiInstantRequest struct { - Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` - Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` - TimeTs time.Time `protobuf:"bytes,3,opt,name=timeTs,proto3,stdtime" json:"timeTs"` - Direction logproto.Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` - Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` - Shards []string `protobuf:"bytes,6,rep,name=shards,proto3" json:"shards"` - Plan *github_com_grafana_loki_pkg_querier_plan.QueryPlan `protobuf:"bytes,7,opt,name=plan,proto3,customtype=github.com/grafana/loki/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` + Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` + Limit uint32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` + TimeTs time.Time `protobuf:"bytes,3,opt,name=timeTs,proto3,stdtime" json:"timeTs"` + Direction logproto.Direction `protobuf:"varint,4,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` + Path string `protobuf:"bytes,5,opt,name=path,proto3" json:"path,omitempty"` + Shards []string `protobuf:"bytes,6,rep,name=shards,proto3" json:"shards"` + Plan *github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan `protobuf:"bytes,7,opt,name=plan,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan" json:"plan,omitempty"` } func (m *LokiInstantRequest) Reset() { *m = LokiInstantRequest{} } @@ -277,15 +277,15 @@ func (m *Plan) GetRaw() []byte { } type LokiResponse struct { - Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` - Data LokiData `protobuf:"bytes,2,opt,name=Data,proto3" json:"data,omitempty"` - ErrorType string `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"` - Error string `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"` - Direction logproto.Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` - Limit uint32 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"` - Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` - Statistics stats.Result `protobuf:"bytes,8,opt,name=statistics,proto3" json:"statistics"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,9,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` + Data LokiData `protobuf:"bytes,2,opt,name=Data,proto3" json:"data,omitempty"` + ErrorType string `protobuf:"bytes,3,opt,name=ErrorType,proto3" json:"errorType,omitempty"` + Error string `protobuf:"bytes,4,opt,name=Error,proto3" json:"error,omitempty"` + Direction logproto.Direction `protobuf:"varint,5,opt,name=direction,proto3,enum=logproto.Direction" json:"direction,omitempty"` + Limit uint32 `protobuf:"varint,6,opt,name=limit,proto3" json:"limit,omitempty"` + Version uint32 `protobuf:"varint,7,opt,name=version,proto3" json:"version,omitempty"` + Statistics stats.Result `protobuf:"bytes,8,opt,name=statistics,proto3" json:"statistics"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,9,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *LokiResponse) Reset() { *m = LokiResponse{} } @@ -452,11 +452,11 @@ func (m *LokiSeriesRequest) GetShards() []string { } type LokiSeriesResponse struct { - Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` - Data []logproto.SeriesIdentifier `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,4,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` - Statistics stats.Result `protobuf:"bytes,5,opt,name=statistics,proto3" json:"statistics"` + Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` + Data []logproto.SeriesIdentifier `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,4,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Statistics stats.Result `protobuf:"bytes,5,opt,name=statistics,proto3" json:"statistics"` } func (m *LokiSeriesResponse) Reset() { *m = LokiSeriesResponse{} } @@ -520,11 +520,11 @@ func (m *LokiSeriesResponse) GetStatistics() stats.Result { } type LokiLabelNamesResponse struct { - Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` - Data []string `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"` - Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,4,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` - Statistics stats.Result `protobuf:"bytes,5,opt,name=statistics,proto3" json:"statistics"` + Status string `protobuf:"bytes,1,opt,name=Status,proto3" json:"status"` + Data []string `protobuf:"bytes,2,rep,name=Data,proto3" json:"data,omitempty"` + Version uint32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,4,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Statistics stats.Result `protobuf:"bytes,5,opt,name=statistics,proto3" json:"statistics"` } func (m *LokiLabelNamesResponse) Reset() { *m = LokiLabelNamesResponse{} } @@ -684,8 +684,8 @@ func (m *LokiPromResponse) GetStatistics() stats.Result { } type IndexStatsResponse struct { - Response *github_com_grafana_loki_pkg_logproto.IndexStatsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.IndexStatsResponse" json:"response,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Response *github_com_grafana_loki_v3_pkg_logproto.IndexStatsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.IndexStatsResponse" json:"response,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *IndexStatsResponse) Reset() { *m = IndexStatsResponse{} } @@ -721,8 +721,8 @@ func (m *IndexStatsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_IndexStatsResponse proto.InternalMessageInfo type VolumeResponse struct { - Response *github_com_grafana_loki_pkg_logproto.VolumeResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.VolumeResponse" json:"response,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Response *github_com_grafana_loki_v3_pkg_logproto.VolumeResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.VolumeResponse" json:"response,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *VolumeResponse) Reset() { *m = VolumeResponse{} } @@ -758,8 +758,8 @@ func (m *VolumeResponse) XXX_DiscardUnknown() { var xxx_messageInfo_VolumeResponse proto.InternalMessageInfo type TopKSketchesResponse struct { - Response *github_com_grafana_loki_pkg_logproto.TopKMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.TopKMatrix" json:"response,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Response *github_com_grafana_loki_v3_pkg_logproto.TopKMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.TopKMatrix" json:"response,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *TopKSketchesResponse) Reset() { *m = TopKSketchesResponse{} } @@ -795,8 +795,8 @@ func (m *TopKSketchesResponse) XXX_DiscardUnknown() { var xxx_messageInfo_TopKSketchesResponse proto.InternalMessageInfo type QuantileSketchResponse struct { - Response *github_com_grafana_loki_pkg_logproto.QuantileSketchMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.QuantileSketchMatrix" json:"response,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Response *github_com_grafana_loki_v3_pkg_logproto.QuantileSketchMatrix `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.QuantileSketchMatrix" json:"response,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *QuantileSketchResponse) Reset() { *m = QuantileSketchResponse{} } @@ -832,8 +832,8 @@ func (m *QuantileSketchResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QuantileSketchResponse proto.InternalMessageInfo type ShardsResponse struct { - Response *github_com_grafana_loki_pkg_logproto.ShardsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.ShardsResponse" json:"response,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Response *github_com_grafana_loki_v3_pkg_logproto.ShardsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.ShardsResponse" json:"response,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *ShardsResponse) Reset() { *m = ShardsResponse{} } @@ -869,8 +869,8 @@ func (m *ShardsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_ShardsResponse proto.InternalMessageInfo type DetectedFieldsResponse struct { - Response *github_com_grafana_loki_pkg_logproto.DetectedFieldsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.DetectedFieldsResponse" json:"response,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Response *github_com_grafana_loki_v3_pkg_logproto.DetectedFieldsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.DetectedFieldsResponse" json:"response,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *DetectedFieldsResponse) Reset() { *m = DetectedFieldsResponse{} } @@ -906,8 +906,8 @@ func (m *DetectedFieldsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_DetectedFieldsResponse proto.InternalMessageInfo type DetectedLabelsResponse struct { - Response *github_com_grafana_loki_pkg_logproto.DetectedLabelsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/pkg/logproto.DetectedLabelsResponse" json:"response,omitempty"` - Headers []github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` + Response *github_com_grafana_loki_v3_pkg_logproto.DetectedLabelsResponse `protobuf:"bytes,1,opt,name=response,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.DetectedLabelsResponse" json:"response,omitempty"` + Headers []github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader `protobuf:"bytes,2,rep,name=Headers,proto3,customtype=github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" json:"-"` } func (m *DetectedLabelsResponse) Reset() { *m = DetectedLabelsResponse{} } @@ -1363,114 +1363,115 @@ func init() { } var fileDescriptor_51b9d53b40d11902 = []byte{ - // 1712 bytes of a gzipped FileDescriptorProto + // 1720 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6f, 0xdb, 0x46, 0x1a, 0x16, 0xf5, 0x69, 0x8d, 0x3f, 0xd6, 0x3b, 0x36, 0x1c, 0xae, 0x93, 0x88, 0x82, 0x80, 0x4d, - 0xbc, 0x8b, 0x5d, 0x6a, 0x63, 0x67, 0xf3, 0xbd, 0xdb, 0x86, 0x75, 0x02, 0x19, 0x4d, 0x8a, 0x84, - 0x36, 0x7a, 0x28, 0x7a, 0x19, 0x4b, 0x63, 0x99, 0x35, 0x25, 0xd2, 0x9c, 0x91, 0x13, 0x1f, 0x0a, - 0xf4, 0x07, 0xb4, 0x40, 0x80, 0xfe, 0x87, 0xa2, 0x40, 0x83, 0x9c, 0x7a, 0xea, 0xad, 0x3d, 0xb4, - 0x39, 0xe6, 0x18, 0x08, 0xa8, 0xda, 0x38, 0x97, 0xc2, 0xa7, 0xfc, 0x84, 0x62,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 0xee, 0xc6, 0xbe, 0x37, 0x98, 0xf0, 0x6b, 0xc9, 0x01, 0x9e, 0x87, - 0x7f, 0x06, 0x6b, 0x29, 0x3b, 0x81, 0x86, 0xab, 0x60, 0x86, 0xc4, 0x92, 0xb0, 0xbc, 0xe7, 0x8b, - 0xbd, 0x57, 0x3c, 0x4d, 0xd7, 0x52, 0xf6, 0x00, 0x06, 0xde, 0x02, 0x33, 0x8d, 0x58, 0x26, 0xd2, - 0x27, 0x93, 0xbb, 0x1a, 0x9e, 0xab, 0xd8, 0x6a, 0x71, 0xac, 0xba, 0x9a, 0x08, 0x47, 0x7d, 0xea, - 0xe8, 0xd5, 0xe2, 0x01, 0xab, 0xae, 0x26, 0x66, 0x2c, 0xd0, 0xcf, 0x1b, 0x95, 0x6f, 0x73, 0x60, - 0x4a, 0x46, 0x85, 0xb8, 0xd6, 0xb8, 0x18, 0x09, 0x5d, 0x04, 0xc5, 0xe9, 0xa3, 0x84, 0xce, 0xcd, - 0x15, 0x9d, 0xff, 0x27, 0xd2, 0xb9, 0x88, 0x90, 0x85, 0x7e, 0x2e, 0xe2, 0xcf, 0x55, 0x10, 0x52, - 0xdb, 0x2b, 0xa1, 0xb6, 0x45, 0x60, 0x9c, 0x1c, 0x7e, 0x44, 0x08, 0x51, 0x52, 0xd8, 0x57, 0x40, - 0xc1, 0x11, 0x37, 0xa3, 0xc3, 0x42, 0x22, 0x79, 0x71, 0xca, 0xa4, 0x2a, 0x01, 0x70, 0xa5, 0x2f, - 0x70, 0x11, 0x17, 0x27, 0x92, 0x02, 0x8f, 0x40, 0xa1, 0xbe, 0xcf, 0x45, 0xfa, 0xce, 0x4b, 0x4c, - 0xa2, 0xae, 0x8e, 0x5e, 0x4c, 0x8a, 0xfb, 0x06, 0x98, 0x0e, 0xe5, 0xc0, 0xa7, 0xa4, 0xba, 0x4f, - 0x1f, 0x55, 0x25, 0x84, 0xf8, 0x38, 0x0a, 0xae, 0x25, 0x34, 0x24, 0x94, 0x6d, 0x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7, 0xc4, 0x54, 0x51, 0x4c, 0xed, 0x5b, + 0x6d, 0xa7, 0x81, 0x2d, 0xb6, 0x58, 0x9f, 0xff, 0x0a, 0x8b, 0x05, 0x6a, 0xe1, 0x76, 0xfc, 0x16, + 0xfb, 0x11, 0x83, 0xff, 0x3d, 0x95, 0xaf, 0x1d, 0xe4, 0xe3, 0x4a, 0x03, 0xef, 0x9a, 0xb6, 0x49, + 0x4c, 0xc7, 0xf6, 0xe5, 0xb6, 0x70, 0xb2, 0x36, 0x9e, 0x93, 0xc1, 0x18, 0x94, 0x3e, 0x4b, 0x81, + 0xe9, 0xfb, 0xce, 0x9e, 0x69, 0xe0, 0xfd, 0x0e, 0xf6, 0x09, 0x5c, 0x04, 0x19, 0x66, 0xa3, 0x2a, + 0x45, 0x65, 0x25, 0x6f, 0xf0, 0x0e, 0x1d, 0xb5, 0xcc, 0xb6, 0x49, 0xd4, 0x64, 0x51, 0x59, 0x99, + 0x35, 0x78, 0x07, 0x42, 0x90, 0xf6, 0x09, 0x76, 0xd5, 0x54, 0x51, 0x59, 0x49, 0x19, 0xac, 0x0d, + 0x97, 0xc1, 0x94, 0x69, 0x13, 0xec, 0x1d, 0x20, 0x4b, 0xcd, 0xb3, 0xf1, 0xb0, 0x0f, 0x6f, 0x81, + 0x9c, 0x4f, 0x90, 0x47, 0xb6, 0x7d, 0x35, 0x5d, 0x54, 0x56, 0xa6, 0xab, 0xcb, 0x65, 0x1e, 0xab, + 0x72, 0x10, 0xab, 0xf2, 0x76, 0x10, 0x2b, 0x7d, 0xea, 0xa8, 0xa7, 0x25, 0x9e, 0x7d, 0xaf, 0x29, + 0x46, 0x00, 0x82, 0xeb, 0x20, 0x83, 0xed, 0xc6, 0xb6, 0xaf, 0x66, 0x26, 0x40, 0x73, 0x08, 0xbc, + 0x02, 0xf2, 0x0d, 0xd3, 0xc3, 0x75, 0xca, 0x99, 0x9a, 0x2d, 0x2a, 0x2b, 0x73, 0xd5, 0x85, 0x72, + 0x18, 0x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0x08, 0x85, 0xf2, 0x65, 0x84, 0xbb, + 0x53, 0x8e, 0x22, 0x26, 0x4b, 0xde, 0x28, 0xf6, 0x4c, 0x93, 0xf7, 0x6d, 0x12, 0x2c, 0x6d, 0x60, + 0x82, 0xeb, 0x04, 0x37, 0xee, 0x99, 0xd8, 0x92, 0x48, 0x7c, 0xaa, 0xc4, 0x58, 0x2c, 0x4a, 0x47, + 0x99, 0xa1, 0x20, 0x5d, 0xef, 0xf6, 0xb4, 0x5b, 0xe3, 0xf2, 0x38, 0xdc, 0xc7, 0xef, 0x86, 0x4f, + 0x56, 0x39, 0x4e, 0xca, 0x67, 0x14, 0xf4, 0x66, 0x7c, 0x46, 0x7d, 0x9c, 0x69, 0x3e, 0x3f, 0xcc, + 0x82, 0x59, 0x76, 0xad, 0x10, 0xd2, 0xf8, 0x77, 0x20, 0x4a, 0x6d, 0xc1, 0x21, 0x0c, 0x8e, 0x67, + 0x9e, 0x5b, 0x2f, 0x6f, 0x89, 0x22, 0x9c, 0x5b, 0xc0, 0xeb, 0x20, 0xeb, 0xb3, 0x43, 0x90, 0xa8, + 0xa2, 0x0a, 0x83, 0x77, 0x06, 0xd1, 0xe3, 0x56, 0x2d, 0x61, 0x08, 0x7b, 0x78, 0x13, 0x64, 0x2d, + 0xc6, 0xa2, 0x38, 0x04, 0x96, 0x06, 0x91, 0xf1, 0x63, 0x01, 0x45, 0x73, 0x0c, 0x5c, 0x03, 0x19, + 0x56, 0xae, 0x89, 0xbb, 0xb8, 0xc8, 0x63, 0xe3, 0x45, 0x53, 0x2d, 0x61, 0x70, 0x73, 0x58, 0x05, + 0x69, 0xd7, 0x73, 0xda, 0xa2, 0x74, 0xbe, 0x30, 0xf8, 0x4c, 0xb9, 0xd6, 0xac, 0x25, 0x0c, 0x66, + 0x0b, 0xaf, 0xd2, 0xd3, 0x2e, 0x2d, 0x52, 0x7d, 0x76, 0x81, 0x40, 0x2b, 0x94, 0x01, 0x98, 0x04, + 0x09, 0x4c, 0xe1,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+ 0xed, 0x2b, 0x13, 0x7f, 0x84, 0x76, 0xb2, 0x8c, 0xa9, 0xd5, 0x9f, 0x03, 0x00, 0x00, 0xff, 0xff, + 0x84, 0x24, 0xe9, 0xad, 0x3c, 0x1b, 0x00, 0x00, } func (this *LokiRequest) Equal(that interface{}) bool { @@ -5933,7 +5934,7 @@ func (m *LokiRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Plan == nil { - m.Plan = &github_com_grafana_loki_pkg_querier_plan.QueryPlan{} + m.Plan = &github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan{} } if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -6189,7 +6190,7 @@ func (m *LokiInstantRequest) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Plan == nil { - m.Plan = &github_com_grafana_loki_pkg_querier_plan.QueryPlan{} + m.Plan = &github_com_grafana_loki_v3_pkg_querier_plan.QueryPlan{} } if err := m.Plan.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -6583,7 +6584,7 @@ func (m *LokiResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -6970,7 +6971,7 @@ func (m *LokiSeriesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7173,7 +7174,7 @@ func (m *LokiLabelNamesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7535,7 +7536,7 @@ func (m *IndexStatsResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &github_com_grafana_loki_pkg_logproto.IndexStatsResponse{} + m.Response = &github_com_grafana_loki_v3_pkg_logproto.IndexStatsResponse{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -7570,7 +7571,7 @@ func (m *IndexStatsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7658,7 +7659,7 @@ func (m *VolumeResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &github_com_grafana_loki_pkg_logproto.VolumeResponse{} + m.Response = &github_com_grafana_loki_v3_pkg_logproto.VolumeResponse{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -7693,7 +7694,7 @@ func (m *VolumeResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7781,7 +7782,7 @@ func (m *TopKSketchesResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &github_com_grafana_loki_pkg_logproto.TopKMatrix{} + m.Response = &github_com_grafana_loki_v3_pkg_logproto.TopKMatrix{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -7816,7 +7817,7 @@ func (m *TopKSketchesResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -7904,7 +7905,7 @@ func (m *QuantileSketchResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &github_com_grafana_loki_pkg_logproto.QuantileSketchMatrix{} + m.Response = &github_com_grafana_loki_v3_pkg_logproto.QuantileSketchMatrix{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -7939,7 +7940,7 @@ func (m *QuantileSketchResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8027,7 +8028,7 @@ func (m *ShardsResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &github_com_grafana_loki_pkg_logproto.ShardsResponse{} + m.Response = &github_com_grafana_loki_v3_pkg_logproto.ShardsResponse{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -8062,7 +8063,7 @@ func (m *ShardsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8150,7 +8151,7 @@ func (m *DetectedFieldsResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &github_com_grafana_loki_pkg_logproto.DetectedFieldsResponse{} + m.Response = &github_com_grafana_loki_v3_pkg_logproto.DetectedFieldsResponse{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -8185,7 +8186,7 @@ func (m *DetectedFieldsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -8273,7 +8274,7 @@ func (m *DetectedLabelsResponse) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Response == nil { - m.Response = &github_com_grafana_loki_pkg_logproto.DetectedLabelsResponse{} + m.Response = &github_com_grafana_loki_v3_pkg_logproto.DetectedLabelsResponse{} } if err := m.Response.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err @@ -8308,7 +8309,7 @@ func (m *DetectedLabelsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Headers = append(m.Headers, github_com_grafana_loki_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) + m.Headers = append(m.Headers, github_com_grafana_loki_v3_pkg_querier_queryrange_queryrangebase_definitions.PrometheusResponseHeader{}) if err := m.Headers[len(m.Headers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pkg/querier/queryrange/queryrange.proto b/pkg/querier/queryrange/queryrange.proto index 2513d1debb5e..01f48298521c 100644 --- a/pkg/querier/queryrange/queryrange.proto +++ b/pkg/querier/queryrange/queryrange.proto @@ -13,7 +13,7 @@ import "pkg/push/push.proto"; import "pkg/querier/queryrange/queryrangebase/definitions/definitions.proto"; import "pkg/querier/queryrange/queryrangebase/queryrange.proto"; -option go_package = "github.com/grafana/loki/pkg/querier/queryrange"; +option go_package = "github.com/grafana/loki/v3/pkg/querier/queryrange"; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; @@ -34,7 +34,7 @@ message LokiRequest { logproto.Direction direction = 6; string path = 7; repeated string shards = 8 [(gogoproto.jsontag) = "shards"]; - Plan plan = 10 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/plan.QueryPlan"]; + Plan plan = 10 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan"]; } message LokiInstantRequest { @@ -47,7 +47,7 @@ message LokiInstantRequest { logproto.Direction direction = 4; string path = 5; repeated string shards = 6 [(gogoproto.jsontag) = "shards"]; - Plan plan = 7 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/plan.QueryPlan"]; + Plan plan = 7 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/plan.QueryPlan"]; } message Plan { @@ -71,7 +71,7 @@ message LokiResponse { ]; repeated definitions.PrometheusResponseHeader Headers = 9 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } @@ -98,7 +98,7 @@ message LokiSeriesResponse { uint32 version = 3; repeated definitions.PrometheusResponseHeader Headers = 4 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; stats.Result statistics = 5 [ (gogoproto.nullable) = false, @@ -112,7 +112,7 @@ message LokiLabelNamesResponse { uint32 version = 3; repeated definitions.PrometheusResponseHeader Headers = 4 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; stats.Result statistics = 5 [ (gogoproto.nullable) = false, @@ -136,58 +136,58 @@ message LokiPromResponse { } message IndexStatsResponse { - logproto.IndexStatsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.IndexStatsResponse"]; + logproto.IndexStatsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.IndexStatsResponse"]; repeated definitions.PrometheusResponseHeader Headers = 2 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } message VolumeResponse { - logproto.VolumeResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.VolumeResponse"]; + logproto.VolumeResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.VolumeResponse"]; repeated definitions.PrometheusResponseHeader Headers = 2 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } message TopKSketchesResponse { - logproto.TopKMatrix response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.TopKMatrix"]; + logproto.TopKMatrix response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.TopKMatrix"]; repeated definitions.PrometheusResponseHeader Headers = 2 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } message QuantileSketchResponse { - logproto.QuantileSketchMatrix response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.QuantileSketchMatrix"]; + logproto.QuantileSketchMatrix response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.QuantileSketchMatrix"]; repeated definitions.PrometheusResponseHeader Headers = 2 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } message ShardsResponse { - indexgatewaypb.ShardsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.ShardsResponse"]; + indexgatewaypb.ShardsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.ShardsResponse"]; repeated definitions.PrometheusResponseHeader Headers = 2 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } message DetectedFieldsResponse { - logproto.DetectedFieldsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.DetectedFieldsResponse"]; + logproto.DetectedFieldsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.DetectedFieldsResponse"]; repeated definitions.PrometheusResponseHeader Headers = 2 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } message DetectedLabelsResponse { - logproto.DetectedLabelsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.DetectedLabelsResponse"]; + logproto.DetectedLabelsResponse response = 1 [(gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.DetectedLabelsResponse"]; repeated definitions.PrometheusResponseHeader Headers = 2 [ (gogoproto.jsontag) = "-", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions.PrometheusResponseHeader" ]; } diff --git a/pkg/querier/queryrange/queryrangebase/alias.go b/pkg/querier/queryrange/queryrangebase/alias.go index 4b4e219202f0..7aab7a200eb0 100644 --- a/pkg/querier/queryrange/queryrangebase/alias.go +++ b/pkg/querier/queryrange/queryrangebase/alias.go @@ -1,8 +1,8 @@ package queryrangebase import ( - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" ) // Helpful aliases for refactoring circular imports diff --git a/pkg/querier/queryrange/queryrangebase/definitions/definitions.pb.go b/pkg/querier/queryrange/queryrangebase/definitions/definitions.pb.go index d4eb4fb83b25..1f2b484f640a 100644 --- a/pkg/querier/queryrange/queryrangebase/definitions/definitions.pb.go +++ b/pkg/querier/queryrange/queryrangebase/definitions/definitions.pb.go @@ -137,7 +137,7 @@ func init() { } var fileDescriptor_d1a37772b6ae2c5c = []byte{ - // 262 bytes of a gzipped FileDescriptorProto + // 266 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x72, 0x2e, 0xc8, 0x4e, 0xd7, 0x2f, 0x2c, 0x4d, 0x2d, 0xca, 0x4c, 0x2d, 0x02, 0xd3, 0x95, 0x45, 0x89, 0x79, 0xe9, 0xa9, 0x48, 0xcc, 0xa4, 0xc4, 0xe2, 0x54, 0xfd, 0x94, 0xd4, 0xb4, 0xcc, 0xbc, 0xcc, 0x92, 0xcc, 0xfc, 0xbc, @@ -147,14 +147,14 @@ var fileDescriptor_d1a37772b6ae2c5c = []byte{ 0x4d, 0x4c, 0x49, 0x2d, 0x12, 0x92, 0xe4, 0x62, 0xf1, 0x4b, 0xcc, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x74, 0x62, 0x7d, 0x75, 0x4f, 0x9e, 0x51, 0x37, 0x08, 0x2c, 0x24, 0x24, 0xcb, 0xc5, 0x16, 0x96, 0x98, 0x53, 0x9a, 0x5a, 0x2c, 0xc1, 0xa4, 0xc0, 0x8c, 0x90, 0x84, 0x0a, 0x2a, 0x85, - 0x70, 0x49, 0x20, 0x1b, 0x5a, 0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e5, 0x18, 0xa2, 0x7c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, + 0x92, 0xf3, 0x73, 0xf5, 0xd3, 0x8b, 0x12, 0xd3, 0x12, 0xf3, 0x12, 0xf5, 0x73, 0xf2, 0xb3, 0x33, + 0xf5, 0xcb, 0x8c, 0xf5, 0x49, 0x0e, 0xe4, 0x24, 0x36, 0x70, 0xb0, 0x19, 0x03, 0x02, 0x00, 0x00, + 0xff, 0xff, 0xf5, 0x9e, 0x05, 0x86, 0xa0, 0x01, 0x00, 0x00, } func (this *PrometheusRequestHeader) Equal(that interface{}) bool { diff --git a/pkg/querier/queryrange/queryrangebase/definitions/definitions.proto b/pkg/querier/queryrange/queryrangebase/definitions/definitions.proto index 9f5e7967c852..d5064e3aaad3 100644 --- a/pkg/querier/queryrange/queryrangebase/definitions/definitions.proto +++ b/pkg/querier/queryrange/queryrangebase/definitions/definitions.proto @@ -4,7 +4,7 @@ package definitions; import "gogoproto/gogo.proto"; -option go_package = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions"; +option go_package = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/pkg/querier/queryrange/queryrangebase/definitions/interface.go b/pkg/querier/queryrange/queryrangebase/definitions/interface.go index f8c9a0f5531f..6f303f387dfa 100644 --- a/pkg/querier/queryrange/queryrangebase/definitions/interface.go +++ b/pkg/querier/queryrange/queryrangebase/definitions/interface.go @@ -8,7 +8,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" ) // Codec is used to encode/decode query range requests and responses so they can be passed down to middlewares. diff --git a/pkg/querier/queryrange/queryrangebase/marshaling_test.go b/pkg/querier/queryrange/queryrangebase/marshaling_test.go index 4fcba1804c3a..c2d9f432a451 100644 --- a/pkg/querier/queryrange/queryrangebase/marshaling_test.go +++ b/pkg/querier/queryrange/queryrangebase/marshaling_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func BenchmarkPrometheusCodec_DecodeResponse(b *testing.B) { diff --git a/pkg/querier/queryrange/queryrangebase/middleware.go b/pkg/querier/queryrange/queryrangebase/middleware.go index 10e80ddf8a2e..44d0ad65582e 100644 --- a/pkg/querier/queryrange/queryrangebase/middleware.go +++ b/pkg/querier/queryrange/queryrangebase/middleware.go @@ -7,7 +7,7 @@ import ( "github.com/grafana/dskit/middleware" "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" ) const ( diff --git a/pkg/querier/queryrange/queryrangebase/promql_test.go b/pkg/querier/queryrange/queryrangebase/promql_test.go index 8e84304e6411..6ab7f460a99c 100644 --- a/pkg/querier/queryrange/queryrangebase/promql_test.go +++ b/pkg/querier/queryrange/queryrangebase/promql_test.go @@ -18,7 +18,7 @@ import ( "github.com/prometheus/prometheus/util/annotations" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/querier/astmapper" ) var ( diff --git a/pkg/querier/queryrange/queryrangebase/query_range.go b/pkg/querier/queryrange/queryrangebase/query_range.go index 5e8f0dd855ed..6b33097c0033 100644 --- a/pkg/querier/queryrange/queryrangebase/query_range.go +++ b/pkg/querier/queryrange/queryrangebase/query_range.go @@ -19,9 +19,9 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/timestamp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) // StatusSuccess Prometheus success result. diff --git a/pkg/querier/queryrange/queryrangebase/query_range_test.go b/pkg/querier/queryrange/queryrangebase/query_range_test.go index ada34f5aba89..4a723403fe1c 100644 --- a/pkg/querier/queryrange/queryrangebase/query_range_test.go +++ b/pkg/querier/queryrange/queryrangebase/query_range_test.go @@ -15,7 +15,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestResponse(t *testing.T) { diff --git a/pkg/querier/queryrange/queryrangebase/queryrange.pb.go b/pkg/querier/queryrange/queryrangebase/queryrange.pb.go index f908b3621dcf..caf71d1f8320 100644 --- a/pkg/querier/queryrange/queryrangebase/queryrange.pb.go +++ b/pkg/querier/queryrange/queryrangebase/queryrange.pb.go @@ -10,10 +10,10 @@ import ( _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/duration" - github_com_grafana_loki_pkg_logproto "github.com/grafana/loki/pkg/logproto" - logproto "github.com/grafana/loki/pkg/logproto" - definitions "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" - resultscache "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + github_com_grafana_loki_v3_pkg_logproto "github.com/grafana/loki/v3/pkg/logproto" + logproto "github.com/grafana/loki/v3/pkg/logproto" + definitions "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" + resultscache "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" io "io" math "math" math_bits "math/bits" @@ -260,8 +260,8 @@ func (m *PrometheusData) GetResult() []SampleStream { } type SampleStream struct { - Labels []github_com_grafana_loki_pkg_logproto.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=github.com/grafana/loki/pkg/logproto.LabelAdapter" json:"metric"` - Samples []logproto.LegacySample `protobuf:"bytes,2,rep,name=samples,proto3" json:"values"` + Labels []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,1,rep,name=labels,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"metric"` + Samples []logproto.LegacySample `protobuf:"bytes,2,rep,name=samples,proto3" json:"values"` } func (m *SampleStream) Reset() { *m = SampleStream{} } @@ -315,54 +315,54 @@ func init() { } var fileDescriptor_4cc6a0c1d6b614c4 = []byte{ - // 739 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x4f, 0xdb, 0x48, - 0x18, 0x8d, 0xc9, 0x2f, 0x32, 0xac, 0xb2, 0xda, 0x01, 0xb1, 0x5e, 0x16, 0x8d, 0xa3, 0x68, 0x57, - 0xca, 0x4a, 0x5b, 0xbb, 0xa5, 0x2a, 0x87, 0x4a, 0x48, 0xad, 0x81, 0xaa, 0x42, 0x48, 0x45, 0x86, - 0x53, 0x6f, 0x93, 0x64, 0x70, 0x2c, 0x6c, 0x8f, 0x99, 0x19, 0x23, 0xe5, 0xd6, 0x53, 0xcf, 0xdc, - 0xda, 0x3f, 0xa1, 0xa7, 0xfe, 0x1d, 0x1c, 0x39, 0xa2, 0x1e, 0xdc, 0x12, 0x2e, 0x55, 0x4e, 0xfc, - 0x09, 0xd5, 0xcc, 0x38, 0xe0, 0x04, 0xd1, 0x1f, 0xa7, 0xcc, 0xe7, 0xef, 0xbd, 0x37, 0xef, 0x7b, - 0x9f, 0x63, 0xb0, 0x9e, 0x1c, 0xf9, 0xce, 0x71, 0x4a, 0x58, 0x40, 0x98, 0xfa, 0x1d, 0x32, 0x1c, - 0xfb, 0xa4, 0x70, 0xec, 0x62, 0x5e, 0x2c, 0xed, 0x84, 0x51, 0x41, 0x61, 0x73, 0x1a, 0xb0, 0xb2, - 0xe4, 0x53, 0x9f, 0xaa, 0x96, 0x23, 0x4f, 0x1a, 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1b, 0x21, - 0xe3, 0x7c, 0x84, 0x8c, 0x2f, 0x23, 0x64, 0x7c, 0x1d, 0xa1, 0xd2, 0xf5, 0x08, 0x19, 0xa7, 0x57, - 0xa8, 0x74, 0x7e, 0x85, 0x4a, 0x17, 0x57, 0xa8, 0xf4, 0x7a, 0xe3, 0x7b, 0xe6, 0x7f, 0xf8, 0x8d, - 0xeb, 0xd6, 0x94, 0xc3, 0xc7, 0xdf, 0x02, 0x00, 0x00, 0xff, 0xff, 0xfe, 0xcd, 0xe4, 0x4f, 0xcf, - 0x05, 0x00, 0x00, + // 740 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcf, 0x4f, 0xd4, 0x40, + 0x18, 0xdd, 0xb2, 0xbf, 0xd8, 0xc1, 0xac, 0x71, 0x20, 0x58, 0x91, 0xb4, 0x9b, 0x8d, 0x26, 0x6b, + 0xa2, 0xad, 0x01, 0xe5, 0x60, 0x62, 0x82, 0xe5, 0x47, 0x0c, 0x21, 0x91, 0x14, 0x4e, 0xde, 0x66, + 0x77, 0x87, 0x6e, 0x43, 0xdb, 0x29, 0x33, 0x53, 0x92, 0xbd, 0x79, 0xf2, 0xcc, 0x4d, 0xff, 0x04, + 0x4f, 0xfe, 0x1d, 0x24, 0x5e, 0x38, 0x12, 0x0f, 0x55, 0x96, 0x8b, 0xd9, 0x13, 0x7f, 0x82, 0x99, + 0x99, 0x2e, 0x74, 0x97, 0x10, 0xf4, 0xb4, 0xf3, 0xf5, 0x7b, 0xef, 0xcd, 0xfb, 0xde, 0xd7, 0x2d, + 0x58, 0x89, 0x0f, 0x3c, 0xfb, 0x30, 0xc1, 0xd4, 0xc7, 0x54, 0xfe, 0xf6, 0x29, 0x8a, 0x3c, 0x9c, + 0x3b, 0xb6, 0x11, 0xcb, 0x97, 0x56, 0x4c, 0x09, 0x27, 0xb0, 0x3e, 0x0e, 0x58, 0x98, 0xf3, 0x88, + 0x47, 0x64, 0xcb, 0x16, 0x27, 0x85, 0x5a, 0x30, 0x3c, 0x42, 0xbc, 0x00, 0xdb, 0xb2, 0x6a, 0x27, + 0xfb, 0x76, 0x37, 0xa1, 0x88, 0xfb, 0x24, 0xca, 0xfa, 0xe6, 0x64, 0x9f, 0xfb, 0x21, 0x66, 0x1c, + 0x85, 0x71, 0x06, 0x78, 0x2c, 0xec, 0x05, 0xc4, 0x53, 0xca, 0xa3, 0x43, 0xd6, 0x5c, 0xfb, 0x37, + 0xef, 0x5d, 0xbc, 0xef, 0x47, 0xbe, 0xb8, 0x95, 0xe5, 0xcf, 0x99, 0xc8, 0x4b, 0x21, 0xc2, 0x38, + 0xa1, 0xc8, 0xc3, 0x76, 0xa7, 0x97, 0x44, 0x07, 0x76, 0x07, 0x75, 0x7a, 0xd8, 0xa6, 0x98, 0x25, + 0x01, 0x67, 0xaa, 0xe0, 0xfd, 0x18, 0x67, 0x8c, 0xe6, 0x97, 0x22, 0x78, 0xb0, 0x43, 0x49, 0x88, + 0x79, 0x0f, 0x27, 0xcc, 0xc5, 0x87, 0x09, 0x66, 0x1c, 0x42, 0x50, 0x8a, 0x11, 0xef, 0xe9, 0x5a, + 0x43, 0x6b, 0xd5, 0x5c, 0x79, 0x86, 0x6f, 0x40, 0x99, 0x71, 0x44, 0xb9, 0x3e, 0xd5, 0xd0, 0x5a, + 0x33, 0x4b, 0x0b, 0x96, 0x1a, 0xd7, 0x1a, 0x8d, 0x6b, 0xed, 0x8d, 0xc6, 0x75, 0xa6, 0x4f, 0x52, + 0xb3, 0x70, 0xfc, 0xcb, 0xd4, 0x5c, 0x45, 0x81, 0x2b, 0xa0, 0x88, 0xa3, 0xae, 0x5e, 0xfc, 0x0f, + 0xa6, 0x20, 0x08, 0x1f, 0x8c, 0xe3, 0x58, 0x2f, 0x35, 0xb4, 0x56, 0xd1, 0x95, 0x67, 0xf8, 0x16, + 0x54, 0x45, 0xb0, 0x24, 0xe1, 0x7a, 0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, 0x51, 0xb8, 0x3c, 0x37, 0xb4, 0x4f, 0x03, 0x43, 0xfb, 0x36, 0x30, 0xb4, 0x93, 0x81, + 0xa1, 0x9d, 0x0e, 0x0c, 0xed, 0xf7, 0xc0, 0xd0, 0xfe, 0x0c, 0x8c, 0xc2, 0xe5, 0xc0, 0xd0, 0x8e, + 0x2f, 0x8c, 0xc2, 0xe9, 0x85, 0x51, 0x38, 0xbb, 0x30, 0x0a, 0x1f, 0x57, 0xef, 0xf0, 0x7f, 0xe7, + 0x97, 0xae, 0x5d, 0x91, 0x26, 0x97, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xae, 0xb0, 0xf3, 0xf9, + 0xd5, 0x05, 0x00, 0x00, } func (this *PrometheusRequest) Equal(that interface{}) bool { @@ -1751,7 +1751,7 @@ func (m *SampleStream) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = append(m.Labels, github_com_grafana_loki_pkg_logproto.LabelAdapter{}) + m.Labels = append(m.Labels, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{}) if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pkg/querier/queryrange/queryrangebase/queryrange.proto b/pkg/querier/queryrange/queryrangebase/queryrange.proto index 98ddaa2b7d2d..4d8e42016cc2 100644 --- a/pkg/querier/queryrange/queryrangebase/queryrange.proto +++ b/pkg/querier/queryrange/queryrangebase/queryrange.proto @@ -9,7 +9,7 @@ import "pkg/logproto/logproto.proto"; import "pkg/querier/queryrange/queryrangebase/definitions/definitions.proto"; import "pkg/storage/chunk/cache/resultscache/types.proto"; -option go_package = "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase"; +option go_package = "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; @@ -56,7 +56,7 @@ message SampleStream { repeated logproto.LegacyLabelPair labels = 1 [ (gogoproto.nullable) = false, (gogoproto.jsontag) = "metric", - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" ]; repeated logproto.LegacySample samples = 2 [ (gogoproto.nullable) = false, diff --git a/pkg/querier/queryrange/queryrangebase/results_cache.go b/pkg/querier/queryrange/queryrangebase/results_cache.go index 3511fe0b7dd3..e519ae74f075 100644 --- a/pkg/querier/queryrange/queryrangebase/results_cache.go +++ b/pkg/querier/queryrange/queryrangebase/results_cache.go @@ -15,10 +15,10 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util/constants" ) var ( diff --git a/pkg/querier/queryrange/queryrangebase/results_cache_test.go b/pkg/querier/queryrange/queryrangebase/results_cache_test.go index 2ee599fab30a..fa1d9c81ef4f 100644 --- a/pkg/querier/queryrange/queryrangebase/results_cache_test.go +++ b/pkg/querier/queryrange/queryrangebase/results_cache_test.go @@ -14,11 +14,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/querier/queryrange/queryrangebase/retry.go b/pkg/querier/queryrange/queryrangebase/retry.go index d051363771bb..f02b5d73cd6c 100644 --- a/pkg/querier/queryrange/queryrangebase/retry.go +++ b/pkg/querier/queryrange/queryrangebase/retry.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type RetryMiddlewareMetrics struct { diff --git a/pkg/querier/queryrange/queryrangebase/retry_test.go b/pkg/querier/queryrange/queryrangebase/retry_test.go index 2c4a15bb9f48..7476fa21a06b 100644 --- a/pkg/querier/queryrange/queryrangebase/retry_test.go +++ b/pkg/querier/queryrange/queryrangebase/retry_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) func TestRetry(t *testing.T) { diff --git a/pkg/querier/queryrange/queryrangebase/series_test.go b/pkg/querier/queryrange/queryrangebase/series_test.go index 0bfdfaefcced..db574403fffb 100644 --- a/pkg/querier/queryrange/queryrangebase/series_test.go +++ b/pkg/querier/queryrange/queryrangebase/series_test.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func Test_ResponseToSamples(t *testing.T) { diff --git a/pkg/querier/queryrange/queryrangebase/test_utils.go b/pkg/querier/queryrange/queryrangebase/test_utils.go index fdc02d87a909..64be6cc0b48e 100644 --- a/pkg/querier/queryrange/queryrangebase/test_utils.go +++ b/pkg/querier/queryrange/queryrangebase/test_utils.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/annotations" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/querier/series" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/querier/series" ) // genLabels will create a slice of labels where each label has an equal chance to occupy a value from [0,labelBuckets]. It returns a slice of length labelBuckets^len(labelSet) diff --git a/pkg/querier/queryrange/queryrangebase/test_utils_test.go b/pkg/querier/queryrange/queryrangebase/test_utils_test.go index 0eacb0019937..5cf748dd7dbc 100644 --- a/pkg/querier/queryrange/queryrangebase/test_utils_test.go +++ b/pkg/querier/queryrange/queryrangebase/test_utils_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/querier/astmapper" ) func TestGenLabelsCorrectness(t *testing.T) { diff --git a/pkg/querier/queryrange/queryrangebase/util.go b/pkg/querier/queryrange/queryrangebase/util.go index 5073b715bc26..a47753013c60 100644 --- a/pkg/querier/queryrange/queryrangebase/util.go +++ b/pkg/querier/queryrange/queryrangebase/util.go @@ -3,7 +3,7 @@ package queryrangebase import ( "context" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" ) // RequestResponse contains a request response and the respective request that was used. diff --git a/pkg/querier/queryrange/queryrangebase/value.go b/pkg/querier/queryrange/queryrangebase/value.go index b0d96f100eac..e798233dcea3 100644 --- a/pkg/querier/queryrange/queryrangebase/value.go +++ b/pkg/querier/queryrange/queryrangebase/value.go @@ -8,8 +8,8 @@ import ( "github.com/prometheus/prometheus/promql/parser" "github.com/prometheus/prometheus/storage" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/series" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/series" ) // FromResult transforms a promql query result into a samplestream diff --git a/pkg/querier/queryrange/queryrangebase/value_test.go b/pkg/querier/queryrange/queryrangebase/value_test.go index 249fe5eaeb81..965effa30d7a 100644 --- a/pkg/querier/queryrange/queryrangebase/value_test.go +++ b/pkg/querier/queryrange/queryrangebase/value_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestFromValue(t *testing.T) { diff --git a/pkg/querier/queryrange/querysharding.go b/pkg/querier/queryrange/querysharding.go index 8a11c546a7b6..c67cd753a693 100644 --- a/pkg/querier/queryrange/querysharding.go +++ b/pkg/querier/queryrange/querysharding.go @@ -15,18 +15,18 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/marshal" - "github.com/grafana/loki/pkg/util/spanlogger" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/util/validation" ) var errInvalidShardingRange = errors.New("Query does not fit in a single sharding configuration") diff --git a/pkg/querier/queryrange/querysharding_test.go b/pkg/querier/queryrange/querysharding_test.go index b17dfc4d3678..cb080c279a4d 100644 --- a/pkg/querier/queryrange/querysharding_test.go +++ b/pkg/querier/queryrange/querysharding_test.go @@ -16,17 +16,17 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) var ( diff --git a/pkg/querier/queryrange/roundtrip.go b/pkg/querier/queryrange/roundtrip.go index fed95d0110aa..3d64c50231d0 100644 --- a/pkg/querier/queryrange/roundtrip.go +++ b/pkg/querier/queryrange/roundtrip.go @@ -16,17 +16,17 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - logqllog "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - base "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - logutil "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + logqllog "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + base "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + logutil "github.com/grafana/loki/v3/pkg/util/log" ) const ( @@ -374,7 +374,7 @@ func (r roundTripper) Do(ctx context.Context, req base.Request) (base.Response, "msg", "executing query", "type", "detected fields", "query", op.Query, - "length", op.End.Sub(*op.Start), + "length", op.End.Sub(op.Start), "start", op.Start, "end", op.End, ) diff --git a/pkg/querier/queryrange/roundtrip_test.go b/pkg/querier/queryrange/roundtrip_test.go index 9996790a5114..27d3ff781b0b 100644 --- a/pkg/querier/queryrange/roundtrip_test.go +++ b/pkg/querier/queryrange/roundtrip_test.go @@ -20,23 +20,23 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - base "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/validation" - valid "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + base "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/validation" + valid "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/pkg/querier/queryrange/serialize.go b/pkg/querier/queryrange/serialize.go index b85f707a692b..d7a5eb125d30 100644 --- a/pkg/querier/queryrange/serialize.go +++ b/pkg/querier/queryrange/serialize.go @@ -5,10 +5,10 @@ import ( "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util/httpreq" - serverutil "github.com/grafana/loki/pkg/util/server" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util/httpreq" + serverutil "github.com/grafana/loki/v3/pkg/util/server" ) type serializeRoundTripper struct { diff --git a/pkg/querier/queryrange/serialize_test.go b/pkg/querier/queryrange/serialize_test.go index f926da9f19b5..0bd6c36aa4bd 100644 --- a/pkg/querier/queryrange/serialize_test.go +++ b/pkg/querier/queryrange/serialize_test.go @@ -11,10 +11,10 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) func TestResponseFormat(t *testing.T) { diff --git a/pkg/querier/queryrange/series_cache.go b/pkg/querier/queryrange/series_cache.go index 5120d61fb0b4..c7bf2e165117 100644 --- a/pkg/querier/queryrange/series_cache.go +++ b/pkg/querier/queryrange/series_cache.go @@ -14,10 +14,10 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util/validation" ) type cacheKeySeries struct { diff --git a/pkg/querier/queryrange/series_cache_test.go b/pkg/querier/queryrange/series_cache_test.go index 6ba869a69411..97a5eabb9ae2 100644 --- a/pkg/querier/queryrange/series_cache_test.go +++ b/pkg/querier/queryrange/series_cache_test.go @@ -11,13 +11,13 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util" ) var ( diff --git a/pkg/querier/queryrange/shard_resolver.go b/pkg/querier/queryrange/shard_resolver.go index 2808a4ae2eb2..f6bed294eaae 100644 --- a/pkg/querier/queryrange/shard_resolver.go +++ b/pkg/querier/queryrange/shard_resolver.go @@ -17,16 +17,16 @@ import ( "github.com/opentracing/opentracing-go" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - logqlstats "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util/spanlogger" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + logqlstats "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/util/validation" ) func shardResolverForConf( diff --git a/pkg/querier/queryrange/split_by_interval.go b/pkg/querier/queryrange/split_by_interval.go index 2f693b438dbd..92c956bbfed8 100644 --- a/pkg/querier/queryrange/split_by_interval.go +++ b/pkg/querier/queryrange/split_by_interval.go @@ -12,16 +12,16 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/math" "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/validation" ) type lokiResult struct { diff --git a/pkg/querier/queryrange/split_by_interval_test.go b/pkg/querier/queryrange/split_by_interval_test.go index 6c6d66e3bb66..c74ec05c252c 100644 --- a/pkg/querier/queryrange/split_by_interval_test.go +++ b/pkg/querier/queryrange/split_by_interval_test.go @@ -15,15 +15,15 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util" ) var nilMetrics = NewSplitByMetrics(nil) diff --git a/pkg/querier/queryrange/split_by_range.go b/pkg/querier/queryrange/split_by_range.go index 16076cd94859..380466d04408 100644 --- a/pkg/querier/queryrange/split_by_range.go +++ b/pkg/querier/queryrange/split_by_range.go @@ -11,13 +11,13 @@ import ( "github.com/grafana/dskit/tenant" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/marshal" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/util/validation" ) type splitByRange struct { diff --git a/pkg/querier/queryrange/split_by_range_test.go b/pkg/querier/queryrange/split_by_range_test.go index af66c10a2f08..0f61c3c276b1 100644 --- a/pkg/querier/queryrange/split_by_range_test.go +++ b/pkg/querier/queryrange/split_by_range_test.go @@ -11,11 +11,11 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) func Test_RangeVectorSplitAlign(t *testing.T) { diff --git a/pkg/querier/queryrange/splitters.go b/pkg/querier/queryrange/splitters.go index e9f2de5b4103..30bc3da18392 100644 --- a/pkg/querier/queryrange/splitters.go +++ b/pkg/querier/queryrange/splitters.go @@ -5,10 +5,10 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/validation" ) type splitter interface { diff --git a/pkg/querier/queryrange/stats.go b/pkg/querier/queryrange/stats.go index 7cc2943fecaf..4e5b646e7429 100644 --- a/pkg/querier/queryrange/stats.go +++ b/pkg/querier/queryrange/stats.go @@ -14,14 +14,14 @@ import ( "github.com/grafana/dskit/middleware" promql_parser "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/logproto" - - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/logproto" + + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) type ctxKeyType string diff --git a/pkg/querier/queryrange/stats_test.go b/pkg/querier/queryrange/stats_test.go index 28f8d12de7f6..8c48a9ece853 100644 --- a/pkg/querier/queryrange/stats_test.go +++ b/pkg/querier/queryrange/stats_test.go @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) func TestStatsCollectorMiddleware(t *testing.T) { diff --git a/pkg/querier/queryrange/views.go b/pkg/querier/queryrange/views.go index be9eee016b4b..b34020934c1c 100644 --- a/pkg/querier/queryrange/views.go +++ b/pkg/querier/queryrange/views.go @@ -11,8 +11,8 @@ import ( "github.com/richardartoul/molecule" "github.com/richardartoul/molecule/src/codec" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) // Pull fiel numbers from protobuf message descriptions. diff --git a/pkg/querier/queryrange/views_test.go b/pkg/querier/queryrange/views_test.go index c4c28fe462c0..7d1938dacb77 100644 --- a/pkg/querier/queryrange/views_test.go +++ b/pkg/querier/queryrange/views_test.go @@ -12,11 +12,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util/marshal" ) func TestGetLokiSeriesResponse(t *testing.T) { diff --git a/pkg/querier/queryrange/volume.go b/pkg/querier/queryrange/volume.go index b12fbd48d245..d4c40964d142 100644 --- a/pkg/querier/queryrange/volume.go +++ b/pkg/querier/queryrange/volume.go @@ -9,14 +9,14 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase/definitions" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase/definitions" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util" ) func NewVolumeMiddleware() queryrangebase.Middleware { diff --git a/pkg/querier/queryrange/volume_cache.go b/pkg/querier/queryrange/volume_cache.go index 5ae2af411115..6f4f73de568e 100644 --- a/pkg/querier/queryrange/volume_cache.go +++ b/pkg/querier/queryrange/volume_cache.go @@ -12,12 +12,12 @@ import ( "github.com/grafana/dskit/tenant" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/validation" ) type VolumeSplitter struct { diff --git a/pkg/querier/queryrange/volume_cache_test.go b/pkg/querier/queryrange/volume_cache_test.go index 038d8fa925f5..cdf492ee3b1b 100644 --- a/pkg/querier/queryrange/volume_cache_test.go +++ b/pkg/querier/queryrange/volume_cache_test.go @@ -10,15 +10,15 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache" - - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache" + + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) func TestVolumeCache(t *testing.T) { diff --git a/pkg/querier/queryrange/volume_test.go b/pkg/querier/queryrange/volume_test.go index 8d8b8d48a3f2..7327a58e15d9 100644 --- a/pkg/querier/queryrange/volume_test.go +++ b/pkg/querier/queryrange/volume_test.go @@ -9,11 +9,12 @@ import ( "github.com/grafana/dskit/user" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/push" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" + + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" ) const forRangeQuery = false diff --git a/pkg/querier/stats/stats.pb.go b/pkg/querier/stats/stats.pb.go index bb56bb26c49c..bae01dd0eeed 100644 --- a/pkg/querier/stats/stats.pb.go +++ b/pkg/querier/stats/stats.pb.go @@ -98,26 +98,27 @@ func init() { func init() { proto.RegisterFile("pkg/querier/stats/stats.proto", fileDescriptor_8ca2404f80bab2e8) } var fileDescriptor_8ca2404f80bab2e8 = []byte{ - // 302 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0xd0, 0xb1, 0x4e, 0x3a, 0x31, - 0x1c, 0xc0, 0xf1, 0xfe, 0xfe, 0x7f, 0x31, 0x78, 0x4e, 0x9e, 0x0c, 0x48, 0xe2, 0x0f, 0xe2, 0x84, - 0xcb, 0xd5, 0xe8, 0x0b, 0x18, 0xf0, 0x09, 0xc0, 0xc9, 0xe5, 0xd2, 0x3b, 0x4a, 0x69, 0x38, 0xae, - 0x78, 0xd7, 0xc6, 0xb8, 0xf9, 0x08, 0x8e, 0x3e, 0x82, 0x89, 0x2f, 0xc2, 0xc8, 0xc8, 0xa4, 0x52, - 0x16, 0x47, 0x1e, 0xc1, 0xb4, 0x07, 0x93, 0x4b, 0xd3, 0x5f, 0x3f, 0xf9, 0x26, 0x6d, 0x83, 0xf3, - 0xf9, 0x54, 0xd0, 0x47, 0xc3, 0x0b, 0xc9, 0x0b, 0x5a, 0x6a, 0xa6, 0xcb, 0x6a, 0x8d, 0xe6, 0x85, - 0xd2, 0x2a, 0xac, 0xf9, 0xa1, 0xd5, 0x10, 0x4a, 0x28, 0x7f, 0x42, 0xdd,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 0x01, 0x00, 0x00, 0xff, 0xff, 0xb4, 0xe6, 0x22, 0x2b, 0x73, 0x01, 0x00, 0x00, + // 305 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0xd0, 0x31, 0x4e, 0xf3, 0x30, + 0x14, 0xc0, 0x71, 0xbf, 0xef, 0xa3, 0xa8, 0x84, 0x89, 0xd0, 0xa1, 0x54, 0xe2, 0xb5, 0x62, 0xea, + 0x80, 0x62, 0x44, 0x2f, 0x80, 0x5a, 0x4e, 0xd0, 0x32, 0xb1, 0x44, 0x49, 0xea, 0xba, 0x56, 0xd3, + 0xb8, 0x24, 0x36, 0x88, 0x8d, 0x23, 0x30, 0x72, 0x04, 0x24, 0x2e, 0xd2, 0xb1, 0x63, 0x27, 0xa0, + 0xee, 0xc2, 0xd8, 0x23, 0x20, 0x3b, 0xe9, 0xc4, 0x62, 0xf9, 0xf9, 0xa7, 0xbf, 0x64, 0xdb, 0x3b, + 0x5f, 0xcc, 0x38, 0x7d, 0xd0, 0x2c, 0x17, 0x2c, 0xa7, 0x85, 0x8a, 0x54, 0x51, 0xae, 0xc1, 0x22, + 0x97, 0x4a, 0xfa, 0x35, 0x37, 0xb4, 0x1a, 0x5c, 0x72, 0xe9, 0x4e, 0xa8, 0xdd, 0x95, 0xd8, 0x42, + 0x2e, 0x25, 0x4f, 0x19, 0x75, 0x53, 0xac, 0x27, 0x74, 0xac, 0xf3, 0x48, 0x09, 0x99, 0x95, 0x7e, + 0xf1, 0x01, 0x5e, 0x6d, 0x64, 0x7b, 0xff, 0xc6, 0x3b, 0x7a, 0x8a, 0xd2, 0x34, 0x54, 0x62, 0xce, + 0x9a, 0xd0, 0x81, 0xee, 0xf1, 0xf5, 0x59, 0x50, 0xd6, 0xc1, 0xbe, 0x0e, 0x6e, 0xab, 0xba, 0x5f, + 0x5f, 0x7e, 0xb6, 0xc9, 0xdb, 0x57, 0x1b, 0x86, 0x75, 0x5b, 0xdd, 0x89, 0x39, 0xf3, 0xaf, 0xbc, + 0xc6, 0x84, 0xa9, 0x64, 0xca, 0xc6, 0x61, 0x61, 0x2f, 0x5b, 0x84, 0x89, 0xd4, 0x99, 0x6a, 0xfe, + 0xeb, 0x40, 0xf7, 0x60, 0xe8, 0x57, 0x36, 0x72, 0x34, 0xb0, 0xe2, 0x07, 0xde, 0xe9, 0xbe, 0x48, + 0xa6, 0x3a, 0x9b, 0x85, 0xf1, 0xb3, 0x62, 0x45, 0xf3, 0xbf, 0x0b, 0x4e, 0x2a, 0x1a, 0x58, 0xe9, + 0x5b, 0xe8, 0xc7, 0xab, 0x0d, 0x92, 0xf5, 0x06, 0xc9, 0x6e, 0x83, 0xf0, 0x62, 0x10, 0xde, 0x0d, + 0xc2, 0xd2, 0x20, 0xac, 0x0c, 0xc2, 0xb7, 0x41, 0xf8, 0x31, 0x48, 0x76, 0x06, 0xe1, 0x75, 0x8b, + 0x64, 0xb5, 0x45, 0xb2, 0xde, 0x22, 0xb9, 0xbf, 0xe4, 0x42, 0x4d, 0x75, 0x1c, 0x24, 0x72, 0x4e, + 0x79, 0x1e, 0x4d, 0xa2, 0x2c, 0xa2, 0xa9, 0x9c, 0x09, 0xfa, 0xd8, 0xa3, 0x7f, 0xbe, 0x36, 0x3e, + 0x74, 0x8f, 0xed, 0xfd, 0x06, 0x00, 0x00, 0xff, 0xff, 0x67, 0x51, 0xd3, 0x06, 0x76, 0x01, 0x00, + 0x00, } func (this *Stats) Equal(that interface{}) bool { diff --git a/pkg/querier/stats/stats.proto b/pkg/querier/stats/stats.proto index 1315ef7774ce..2aa02df7351d 100644 --- a/pkg/querier/stats/stats.proto +++ b/pkg/querier/stats/stats.proto @@ -5,7 +5,7 @@ package stats; import "gogoproto/gogo.proto"; import "google/protobuf/duration.proto"; -option go_package = "github.com/grafana/loki/pkg/querier/stats"; +option go_package = "github.com/grafana/loki/v3/pkg/querier/stats"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/pkg/querier/tail.go b/pkg/querier/tail.go index 35cb4bc18e7a..1bdc01159ed6 100644 --- a/pkg/querier/tail.go +++ b/pkg/querier/tail.go @@ -12,10 +12,10 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/iter" - loghttp "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/iter" + loghttp "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/querier/tail_mock_test.go b/pkg/querier/tail_mock_test.go index 94f135e77648..a1d161d2f2c9 100644 --- a/pkg/querier/tail_mock_test.go +++ b/pkg/querier/tail_mock_test.go @@ -1,6 +1,6 @@ package querier -import "github.com/grafana/loki/pkg/logproto" +import "github.com/grafana/loki/v3/pkg/logproto" func mockTailResponse(stream logproto.Stream) *logproto.TailResponse { return &logproto.TailResponse{ diff --git a/pkg/querier/tail_test.go b/pkg/querier/tail_test.go index 07d3743af03c..4867574e5792 100644 --- a/pkg/querier/tail_test.go +++ b/pkg/querier/tail_test.go @@ -12,9 +12,9 @@ import ( gokitlog "github.com/go-kit/log" - "github.com/grafana/loki/pkg/iter" - loghttp "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/iter" + loghttp "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" ) const ( diff --git a/pkg/querier/testutils.go b/pkg/querier/testutils.go index 5b38ad11eba5..34cae5f70580 100644 --- a/pkg/querier/testutils.go +++ b/pkg/querier/testutils.go @@ -3,7 +3,7 @@ package querier import ( "github.com/grafana/dskit/flagext" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) func DefaultLimitsConfig() validation.Limits { diff --git a/pkg/querier/worker/frontend_processor.go b/pkg/querier/worker/frontend_processor.go index 45c61862d059..a0e3569359bf 100644 --- a/pkg/querier/worker/frontend_processor.go +++ b/pkg/querier/worker/frontend_processor.go @@ -13,9 +13,9 @@ import ( "github.com/opentracing/opentracing-go" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v1/frontendv1pb" - querier_stats "github.com/grafana/loki/pkg/querier/stats" - httpgrpcutil "github.com/grafana/loki/pkg/util/httpgrpc" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v1/frontendv1pb" + querier_stats "github.com/grafana/loki/v3/pkg/querier/stats" + httpgrpcutil "github.com/grafana/loki/v3/pkg/util/httpgrpc" ) var ( diff --git a/pkg/querier/worker/frontend_processor_test.go b/pkg/querier/worker/frontend_processor_test.go index cecdb7bfe27d..85eac4338a37 100644 --- a/pkg/querier/worker/frontend_processor_test.go +++ b/pkg/querier/worker/frontend_processor_test.go @@ -14,8 +14,8 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/test/bufconn" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/util/test" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/util/test" ) const bufConnSize = 1024 * 1024 diff --git a/pkg/querier/worker/scheduler_processor.go b/pkg/querier/worker/scheduler_processor.go index 16d0e59d1ed1..00b08219e5db 100644 --- a/pkg/querier/worker/scheduler_processor.go +++ b/pkg/querier/worker/scheduler_processor.go @@ -25,12 +25,12 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v2/frontendv2pb" - "github.com/grafana/loki/pkg/querier/queryrange" - querier_stats "github.com/grafana/loki/pkg/querier/stats" - "github.com/grafana/loki/pkg/scheduler/schedulerpb" - httpgrpcutil "github.com/grafana/loki/pkg/util/httpgrpc" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2/frontendv2pb" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + querier_stats "github.com/grafana/loki/v3/pkg/querier/stats" + "github.com/grafana/loki/v3/pkg/scheduler/schedulerpb" + httpgrpcutil "github.com/grafana/loki/v3/pkg/util/httpgrpc" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func newSchedulerProcessor(cfg Config, handler RequestHandler, log log.Logger, metrics *Metrics, codec RequestCodec) (*schedulerProcessor, []services.Service) { diff --git a/pkg/querier/worker/scheduler_processor_test.go b/pkg/querier/worker/scheduler_processor_test.go index 154ba1ae4fa7..264d5a1769fd 100644 --- a/pkg/querier/worker/scheduler_processor_test.go +++ b/pkg/querier/worker/scheduler_processor_test.go @@ -19,9 +19,9 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/scheduler/schedulerpb" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/scheduler/schedulerpb" ) func TestSchedulerProcessor_processQueriesOnSingleStream(t *testing.T) { diff --git a/pkg/querier/worker/util.go b/pkg/querier/worker/util.go index 812236809a09..3ebb0029bfe7 100644 --- a/pkg/querier/worker/util.go +++ b/pkg/querier/worker/util.go @@ -14,8 +14,8 @@ import ( "go.uber.org/atomic" "google.golang.org/grpc/codes" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/util/server" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/util/server" ) // newExecutionContext returns a new execution context (execCtx) that wraps the input workerCtx and diff --git a/pkg/querier/worker/util_test.go b/pkg/querier/worker/util_test.go index 25dd8127a0da..96b9be9891cf 100644 --- a/pkg/querier/worker/util_test.go +++ b/pkg/querier/worker/util_test.go @@ -10,10 +10,10 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util/server" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util/server" ) type HandlerFunc func(context.Context, queryrangebase.Request) (queryrangebase.Response, error) diff --git a/pkg/querier/worker/worker.go b/pkg/querier/worker/worker.go index b2e50b205d14..bc41a49d9075 100644 --- a/pkg/querier/worker/worker.go +++ b/pkg/querier/worker/worker.go @@ -17,9 +17,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util" ) type Config struct { diff --git a/pkg/querier/worker/worker_test.go b/pkg/querier/worker/worker_test.go index 68791b214f17..fb311925fb20 100644 --- a/pkg/querier/worker/worker_test.go +++ b/pkg/querier/worker/worker_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/util/test" + "github.com/grafana/loki/v3/pkg/util/test" ) func TestResetConcurrency(t *testing.T) { diff --git a/pkg/querier/worker_service.go b/pkg/querier/worker_service.go index f95da0eba16d..40415678122f 100644 --- a/pkg/querier/worker_service.go +++ b/pkg/querier/worker_service.go @@ -10,9 +10,9 @@ import ( "github.com/grafana/dskit/services" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - querier_worker "github.com/grafana/loki/pkg/querier/worker" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + querier_worker "github.com/grafana/loki/v3/pkg/querier/worker" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type WorkerServiceConfig struct { diff --git a/pkg/queue/dequeue_qos_test.go b/pkg/queue/dequeue_qos_test.go index c889cbe8f4c6..db876e1d738f 100644 --- a/pkg/queue/dequeue_qos_test.go +++ b/pkg/queue/dequeue_qos_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/queue/queue_test.go b/pkg/queue/queue_test.go index a21ce8af622c..b51ccf7cc2a0 100644 --- a/pkg/queue/queue_test.go +++ b/pkg/queue/queue_test.go @@ -15,7 +15,7 @@ import ( "go.uber.org/atomic" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) func BenchmarkGetNextRequest(b *testing.B) { diff --git a/pkg/queue/tenant_queues.go b/pkg/queue/tenant_queues.go index 69fac6ed60a0..46f9f7adccd4 100644 --- a/pkg/queue/tenant_queues.go +++ b/pkg/queue/tenant_queues.go @@ -14,9 +14,9 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/validation" ) type intPointerMap map[string]*int diff --git a/pkg/queue/tenant_queues_test.go b/pkg/queue/tenant_queues_test.go index 4f49b8233304..d1b52480e545 100644 --- a/pkg/queue/tenant_queues_test.go +++ b/pkg/queue/tenant_queues_test.go @@ -16,7 +16,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/scheduler/limits" + "github.com/grafana/loki/v3/pkg/scheduler/limits" ) var noQueueLimits = limits.NewQueueLimits(nil) diff --git a/pkg/ruler/base/api.go b/pkg/ruler/base/api.go index 04a303993228..4e4d71d5691d 100644 --- a/pkg/ruler/base/api.go +++ b/pkg/ruler/base/api.go @@ -23,10 +23,10 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/ruler/rulestore" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // In order to reimplement the prometheus rules API, a large amount of code was copied over diff --git a/pkg/ruler/base/api_test.go b/pkg/ruler/base/api_test.go index c14f5de8d461..f61f2fe3f023 100644 --- a/pkg/ruler/base/api_test.go +++ b/pkg/ruler/base/api_test.go @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" ) func TestRuler_PrometheusRules(t *testing.T) { diff --git a/pkg/ruler/base/client_pool_test.go b/pkg/ruler/base/client_pool_test.go index 05fc23290033..fa068c2580bd 100644 --- a/pkg/ruler/base/client_pool_test.go +++ b/pkg/ruler/base/client_pool_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) func Test_newRulerClientFactory(t *testing.T) { diff --git a/pkg/ruler/base/compat.go b/pkg/ruler/base/compat.go index 822537e419bc..cfe18fcebd08 100644 --- a/pkg/ruler/base/compat.go +++ b/pkg/ruler/base/compat.go @@ -20,9 +20,9 @@ import ( "github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/storage" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/ruler/config" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ruler/config" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // Pusher is an ingester server that accepts pushes. diff --git a/pkg/ruler/base/compat_test.go b/pkg/ruler/base/compat_test.go index d4cdf4f298a3..e37ef6646811 100644 --- a/pkg/ruler/base/compat_test.go +++ b/pkg/ruler/base/compat_test.go @@ -18,7 +18,7 @@ import ( "github.com/prometheus/prometheus/promql/parser" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) type fakePusher struct { diff --git a/pkg/ruler/base/error_translate_queryable.go b/pkg/ruler/base/error_translate_queryable.go index 0785a1421ac6..6e65ed1aaafa 100644 --- a/pkg/ruler/base/error_translate_queryable.go +++ b/pkg/ruler/base/error_translate_queryable.go @@ -10,8 +10,8 @@ import ( "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/util/annotations" - storage_errors "github.com/grafana/loki/pkg/storage/errors" - "github.com/grafana/loki/pkg/validation" + storage_errors "github.com/grafana/loki/v3/pkg/storage/errors" + "github.com/grafana/loki/v3/pkg/validation" ) // TranslateToPromqlAPIError converts error to one of promql.Errors for consumption in PromQL API. diff --git a/pkg/ruler/base/lifecycle_test.go b/pkg/ruler/base/lifecycle_test.go index ea1496712839..2fefc62bf6cb 100644 --- a/pkg/ruler/base/lifecycle_test.go +++ b/pkg/ruler/base/lifecycle_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/util/test" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/util/test" ) // TestRulerShutdown tests shutting down ruler unregisters correctly diff --git a/pkg/ruler/base/manager.go b/pkg/ruler/base/manager.go index 371eb712508e..93b975895846 100644 --- a/pkg/ruler/base/manager.go +++ b/pkg/ruler/base/manager.go @@ -19,7 +19,7 @@ import ( promRules "github.com/prometheus/prometheus/rules" "golang.org/x/net/context/ctxhttp" - "github.com/grafana/loki/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" ) type DefaultMultiTenantManager struct { diff --git a/pkg/ruler/base/manager_metrics.go b/pkg/ruler/base/manager_metrics.go index d5caab8c2ef8..25d5aa13fcae 100644 --- a/pkg/ruler/base/manager_metrics.go +++ b/pkg/ruler/base/manager_metrics.go @@ -3,7 +3,7 @@ package base import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) // ManagerMetrics aggregates metrics exported by the Prometheus diff --git a/pkg/ruler/base/manager_metrics_test.go b/pkg/ruler/base/manager_metrics_test.go index 421133bd4f06..49f34405bff8 100644 --- a/pkg/ruler/base/manager_metrics_test.go +++ b/pkg/ruler/base/manager_metrics_test.go @@ -12,9 +12,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/util/constants" ) func TestManagerMetricsWithRuleGroupLabel(t *testing.T) { diff --git a/pkg/ruler/base/manager_test.go b/pkg/ruler/base/manager_test.go index c2cdc5885409..a93dca6f7977 100644 --- a/pkg/ruler/base/manager_test.go +++ b/pkg/ruler/base/manager_test.go @@ -13,9 +13,9 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/test" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/test" ) func TestSyncRuleGroups(t *testing.T) { diff --git a/pkg/ruler/base/notifier.go b/pkg/ruler/base/notifier.go index 403383f2eefc..8fea76be1396 100644 --- a/pkg/ruler/base/notifier.go +++ b/pkg/ruler/base/notifier.go @@ -19,8 +19,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/notifier" - ruler_config "github.com/grafana/loki/pkg/ruler/config" - "github.com/grafana/loki/pkg/util" + ruler_config "github.com/grafana/loki/v3/pkg/ruler/config" + "github.com/grafana/loki/v3/pkg/util" ) // TODO: Instead of using the same metrics for all notifiers, diff --git a/pkg/ruler/base/notifier_test.go b/pkg/ruler/base/notifier_test.go index 9db716623c41..8166193d8457 100644 --- a/pkg/ruler/base/notifier_test.go +++ b/pkg/ruler/base/notifier_test.go @@ -14,8 +14,8 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - ruler_config "github.com/grafana/loki/pkg/ruler/config" - "github.com/grafana/loki/pkg/util" + ruler_config "github.com/grafana/loki/v3/pkg/ruler/config" + "github.com/grafana/loki/v3/pkg/util" ) func TestBuildNotifierConfig(t *testing.T) { diff --git a/pkg/ruler/base/pusher_mock_test.go b/pkg/ruler/base/pusher_mock_test.go index 0fb571c70b65..cde9f43b56fb 100644 --- a/pkg/ruler/base/pusher_mock_test.go +++ b/pkg/ruler/base/pusher_mock_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/mock" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) type pusherMock struct { diff --git a/pkg/ruler/base/ruler.go b/pkg/ruler/base/ruler.go index a0dc0df08f2d..b8e9f3899e41 100644 --- a/pkg/ruler/base/ruler.go +++ b/pkg/ruler/base/ruler.go @@ -34,12 +34,12 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/ruler/config" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/ruler/rulestore" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ruler/config" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/ruler/base/ruler.pb.go b/pkg/ruler/base/ruler.pb.go index 63904a26e392..5b3b1f1b4d5d 100644 --- a/pkg/ruler/base/ruler.pb.go +++ b/pkg/ruler/base/ruler.pb.go @@ -12,9 +12,9 @@ import ( _ "github.com/gogo/protobuf/types" github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/grafana/loki/pkg/logproto" - github_com_grafana_loki_pkg_logproto "github.com/grafana/loki/pkg/logproto" - rulespb "github.com/grafana/loki/pkg/ruler/rulespb" + _ "github.com/grafana/loki/v3/pkg/logproto" + github_com_grafana_loki_v3_pkg_logproto "github.com/grafana/loki/v3/pkg/logproto" + rulespb "github.com/grafana/loki/v3/pkg/ruler/rulespb" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -334,15 +334,15 @@ func (m *RuleStateDesc) GetEvaluationDuration() time.Duration { } type AlertStateDesc struct { - State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` - Labels []github_com_grafana_loki_pkg_logproto.LabelAdapter `protobuf:"bytes,2,rep,name=labels,proto3,customtype=github.com/grafana/loki/pkg/logproto.LabelAdapter" json:"labels"` - Annotations []github_com_grafana_loki_pkg_logproto.LabelAdapter `protobuf:"bytes,3,rep,name=annotations,proto3,customtype=github.com/grafana/loki/pkg/logproto.LabelAdapter" json:"annotations"` - Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` - ActiveAt time.Time `protobuf:"bytes,5,opt,name=active_at,json=activeAt,proto3,stdtime" json:"active_at"` - FiredAt time.Time `protobuf:"bytes,6,opt,name=fired_at,json=firedAt,proto3,stdtime" json:"fired_at"` - ResolvedAt time.Time `protobuf:"bytes,7,opt,name=resolved_at,json=resolvedAt,proto3,stdtime" json:"resolved_at"` - LastSentAt time.Time `protobuf:"bytes,8,opt,name=last_sent_at,json=lastSentAt,proto3,stdtime" json:"last_sent_at"` - ValidUntil time.Time `protobuf:"bytes,9,opt,name=valid_until,json=validUntil,proto3,stdtime" json:"valid_until"` + State string `protobuf:"bytes,1,opt,name=state,proto3" json:"state,omitempty"` + Labels []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,2,rep,name=labels,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"labels"` + Annotations []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,3,rep,name=annotations,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"annotations"` + Value float64 `protobuf:"fixed64,4,opt,name=value,proto3" json:"value,omitempty"` + ActiveAt time.Time `protobuf:"bytes,5,opt,name=active_at,json=activeAt,proto3,stdtime" json:"active_at"` + FiredAt time.Time `protobuf:"bytes,6,opt,name=fired_at,json=firedAt,proto3,stdtime" json:"fired_at"` + ResolvedAt time.Time `protobuf:"bytes,7,opt,name=resolved_at,json=resolvedAt,proto3,stdtime" json:"resolved_at"` + LastSentAt time.Time `protobuf:"bytes,8,opt,name=last_sent_at,json=lastSentAt,proto3,stdtime" json:"last_sent_at"` + ValidUntil time.Time `protobuf:"bytes,9,opt,name=valid_until,json=validUntil,proto3,stdtime" json:"valid_until"` } func (m *AlertStateDesc) Reset() { *m = AlertStateDesc{} } @@ -438,57 +438,57 @@ func init() { func init() { proto.RegisterFile("pkg/ruler/base/ruler.proto", fileDescriptor_ca810a0fd7057a73) } var fileDescriptor_ca810a0fd7057a73 = []byte{ - // 791 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0xf7, 0xe4, 0xbf, 0x27, 0x81, 0x65, 0x07, 0xb4, 0x32, 0x61, 0x71, 0xa2, 0xec, 0x25, 0x5a, - 0xad, 0x6c, 0x6d, 0x58, 0xad, 0xb4, 0xda, 0x5d, 0x55, 0x41, 0xd0, 0x5e, 0x50, 0x55, 0x19, 0xda, - 0x6b, 0x34, 0x49, 0x26, 0xc6, 0x62, 0xe2, 0x71, 0xc7, 0xe3, 0x48, 0xdc, 0xfa, 0x11, 0x38, 0xf6, - 0xda, 0x5b, 0x3f, 0x0a, 0x47, 0x7a, 0x43, 0xad, 0x44, 0x4b, 0xb8, 0xf4, 0xc8, 0x07, 0xe8, 0xa1, - 0x9a, 0x19, 0x9b, 0x84, 0x42, 0x0f, 0x51, 0xc5, 0x05, 0xe6, 0xfd, 0xf9, 0xfd, 0xde, 0x7b, 0xbf, - 0x79, 0xe3, 0xc0, 0x7a, 0x74, 0xe4, 0xbb, 0x3c, 0xa1, 0x84, 0xbb, 0x7d, 0x1c, 0x13, 0x7d, 0x74, - 0x22, 0xce, 0x04, 0x43, 0x05, 0xe9, 0xa9, 0xaf, 0xf9, 0xcc, 0x67, 0xca, 0xe1, 0xca, 0x93, 0x8e, - 0xd5, 0x6d, 0x9f, 0x31, 0x9f, 0x12, 0x57, 0x59, 0xfd, 0x64, 0xe4, 0x0e, 0x13, 0x8e, 0x45, 0xc0, - 0xc2, 0x34, 0xde, 0xf8, 0x36, 0x2e, 0x82, 0x31, 0x89, 0x05, 0x1e, 0x47, 0x69, 0xc2, 0x86, 0x2c, - 0x4c, 0x99, 0xaf, 0x99, 0xb3, 0x43, 0x1a, 0xdc, 0x9c, 0x75, 0x25, 0xff, 0xc6, 0x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f7, 0x09, 0xcd, 0xb6, 0x6c, 0xdd, - 0xb9, 0x79, 0xfd, 0x7b, 0xc4, 0xc7, 0x83, 0xe3, 0x3d, 0x19, 0x7d, 0x86, 0x03, 0xbe, 0xfd, 0x8f, - 0xac, 0xf8, 0xfe, 0xa2, 0xf1, 0xa7, 0x1f, 0x88, 0xc3, 0xa4, 0xef, 0x0c, 0xd8, 0xd8, 0xf5, 0x39, - 0x1e, 0xe1, 0x10, 0xbb, 0x94, 0x1d, 0x05, 0xee, 0xfc, 0x47, 0xc4, 0x51, 0xb8, 0xee, 0x10, 0x47, - 0x82, 0x70, 0x2f, 0xad, 0x81, 0x26, 0xb0, 0x8a, 0xc3, 0x90, 0x09, 0xd5, 0x64, 0xac, 0x5e, 0xf2, - 0x43, 0x95, 0x9c, 0x2f, 0x24, 0x67, 0x97, 0x1a, 0x11, 0xb5, 0x03, 0xc0, 0xd3, 0x06, 0xea, 0x42, - 0x33, 0x7d, 0x67, 0x58, 0x58, 0xc5, 0x05, 0xee, 0xb1, 0xa2, 0x61, 0x5d, 0x81, 0x1e, 0xc1, 0xca, - 0x28, 0xe0, 0x64, 0x28, 0x19, 0x16, 0xd9, 0x84, 0xb2, 0x42, 0x75, 0x05, 0xda, 0x85, 0x55, 0x4e, - 0x62, 0x46, 0x27, 0x9a, 0xa3, 0xbc, 0x00, 0x07, 0xcc, 0x80, 0x5d, 0x81, 0x1e, 0xc3, 0x9a, 0xdc, - 0xeb, 0x5e, 0x4c, 0x42, 0x21, 0x79, 0x2a, 0x8b, 0xf0, 0x48, 0xe4, 0x3e, 0x09, 0x85, 0x6e, 0x67, - 0x82, 0x69, 0x30, 0xec, 0x25, 0xa1, 0x08, 0xa8, 0x65, 0x2e, 0x42, 0xa3, 0x80, 0xcf, 0x25, 0xae, - 0xf3, 0x2f, 0x2c, 0xca, 0x77, 0xcb, 0x51, 0x47, 0x1f, 0x62, 0x84, 0xee, 0xfe, 0x08, 0xd4, 0x57, - 0x6f, 0xf9, 0xf4, 0x97, 0xb6, 0x65, 0x6c, 0xff, 0x75, 0x76, 0x69, 0x1b, 0xe7, 0x97, 0xb6, 0x71, - 0x7d, 0x69, 0x83, 0x57, 0x53, 0x1b, 0xbc, 0x9d, 0xda, 0xe0, 0x74, 0x6a, 0x83, 0xb3, 0xa9, 0x0d, - 0x3e, 0x4d, 0x6d, 0xf0, 0x79, 0x6a, 0x1b, 0xd7, 0x53, 0x1b, 0x9c, 0x5c, 0xd9, 0xc6, 0xd9, 0x95, - 0x6d, 0x9c, 0x5f, 0xd9, 0x46, 0xbf, 0xa4, 0x9a, 0xdb, 0xfa, 0x1a, 0x00, 0x00, 0xff, 0xff, 0xf0, - 0x4e, 0x48, 0x39, 0x44, 0x07, 0x00, 0x00, + // 790 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xcd, 0x4e, 0xdb, 0x4c, + 0x14, 0xf5, 0xe4, 0xdf, 0x93, 0xc0, 0xc7, 0x37, 0xa0, 0xca, 0x84, 0xe2, 0x44, 0xe9, 0x26, 0xaa, + 0x2a, 0x5b, 0x0a, 0xa8, 0x9b, 0x52, 0x55, 0x41, 0xd0, 0x6e, 0x50, 0x55, 0x19, 0xda, 0x6d, 0x34, + 0x49, 0x26, 0xc6, 0xc2, 0xf1, 0xb8, 0xe3, 0x71, 0xa4, 0xec, 0xaa, 0x3e, 0x01, 0xcb, 0x6e, 0xbb, + 0xeb, 0xa3, 0xb0, 0xa4, 0x3b, 0xd4, 0x4a, 0xb4, 0x84, 0x4d, 0x97, 0x3c, 0x42, 0x35, 0x33, 0x36, + 0x09, 0x85, 0x2e, 0xa2, 0x8a, 0x0d, 0xcc, 0xfd, 0x39, 0xe7, 0xde, 0x39, 0xf7, 0x8e, 0x03, 0xab, + 0xe1, 0x91, 0x6b, 0xb3, 0xd8, 0x27, 0xcc, 0xee, 0xe2, 0x88, 0xa8, 0xa3, 0x15, 0x32, 0xca, 0x29, + 0xca, 0x09, 0x4f, 0x75, 0xc5, 0xa5, 0x2e, 0x95, 0x0e, 0x5b, 0x9c, 0x54, 0xac, 0x6a, 0xba, 0x94, + 0xba, 0x3e, 0xb1, 0xa5, 0xd5, 0x8d, 0x07, 0x76, 0x3f, 0x66, 0x98, 0x7b, 0x34, 0x48, 0xe2, 0xb5, + 0x3f, 0xe3, 0xdc, 0x1b, 0x92, 0x88, 0xe3, 0x61, 0x98, 0x24, 0xac, 0x89, 0xc2, 0x3e, 0x75, 0x15, + 0x73, 0x7a, 0x48, 0x82, 0xeb, 0xd3, 0xae, 0xc4, 0xdf, 0x28, 0xec, 0xaa, 0xff, 0x2a, 0xdc, 0xf8, + 0x0a, 0x60, 0xc5, 0x11, 0xb6, 0x43, 0xde, 0xc7, 0x24, 0xe2, 0x68, 0x03, 0x16, 0x06, 0x9e, 0xcf, + 0x09, 0x33, 0x40, 0x1d, 0x34, 0x17, 0x5b, 0x6b, 0x96, 0x68, 0xdd, 0x9a, 0xcd, 0x91, 0xc6, 0xc1, + 0x38, 0x24, 0x4e, 0x92, 0x8a, 0xd6, 0xa0, 0x2e, 0x48, 0x3b, 0x01, 0x1e, 0x12, 0x23, 0x53, 0xcf, + 0x36, 0x75, 0xa7, 0x24, 0x1c, 0xaf, 0xf1, 0x90, 0xa0, 0x75, 0x08, 0x65, 0xd0, 0x65, 0x34, 0x0e, + 0x8d, 0xac, 0x8c, 0xca, 0xf4, 0x57, 0xc2, 0x81, 0x10, 0xcc, 0x0d, 0x3c, 0x9f, 0x18, 0x39, 0x19, + 0x90, 0xe7, 0xc6, 0x16, 0x2c, 0xa5, 0x35, 0x50, 0x19, 0x16, 0xdb, 0xc1, 0x58, 0x98, 0x4b, 0x1a, + 0x5a, 0x82, 0x95, 0xb6, 0x4f, 0x18, 0xf7, 0x02, 0x57, 0x7a, 0x00, 0xfa, 0x1f, 0x2e, 0x38, 0xa4, + 0x47, 0x59, 0x3f, 0x75, 0x65, 0x1a, 0xcf, 0xe1, 0x42, 0xd2, 0x6e, 0x14, 0xd2, 0x20, 0x22, 0xe8, + 0x09, 0x2c, 0xc8, 0xe2, 0x91, 0x01, 0xea, 0xd9, 0x66, 0xb9, 0xb5, 0xa2, 0xee, 0x24, 0xeb, 0xef, + 0x73, 0xcc, 0xc9, 0x0e, 0x89, 0x7a, 0x4e, 0x92, 0xd3, 0xf8, 0x9c, 0x81, 0x8b, 0x37, 0x43, 0xe8, + 0x31, 0xcc, 0xab, 0xee, 0x85, 0x26, 0x02, 0xaf, 0x24, 0x74, 0xd2, 0x4b, 0x48, 0xbc, 0x4a, 0x41, + 0x4f, 0x61, 0x05, 0xf7, 0xb8, 0x37, 0x22, 0x1d, 0x99, 0x24, 0xe5, 0x28, 0xb7, 0x96, 0xa7, 0x32, + 0x4e, 0x2b, 0x96, 0x55, 0xa2, 0x6c, 0x16, 0xbd, 0x83, 0xcb, 0x64, 0x84, 0xfd, 0x58, 0x8e, 0xfe, + 0x20, 0x1d, 0xb1, 0x91, 0x95, 0x15, 0xab, 0x96, 0x5a, 0x02, 0x2b, 0x5d, 0x02, 0xeb, 0x3a, 0x63, + 0xbb, 0x74, 0x72, 0x5e, 0xd3, 0x8e, 0x7f, 0xd4, 0x80, 0x73, 0x17, 0x01, 0xda, 0x87, 0x68, 0xea, + 0xde, 0x49, 0x56, 0xcb, 0xc8, 0x49, 0xda, 0xd5, 0x5b, 0xb4, 0x69, 0x82, 0x62, 0xfd, 0x24, 0x58, + 0xef, 0x80, 0x37, 0xbe, 0x67, 0x94, 0xc6, 0x53, 0x89, 0x1e, 0xc1, 0x9c, 0xb8, 0x6f, 0xa2, 0xd0, + 0x7f, 0x33, 0x0a, 0xc9, 0xab, 0xca, 0x20, 0x5a, 0x81, 0xf9, 0x48, 0x20, 0x8c, 0x4c, 0x1d, 0x34, + 0x75, 0x47, 0x19, 0xe8, 0x01, 0x2c, 0x1c, 0x12, 0xec, 0xf3, 0x43, 0x79, 0x59, 0xdd, 0x49,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xc0, 0x14, 0xd8, 0xe6, 0xe8, 0x25, 0xac, 0x88, 0xed, 0xee, + 0x44, 0x24, 0xe0, 0x82, 0xa7, 0x34, 0x0f, 0x8f, 0x40, 0xee, 0x93, 0x80, 0xab, 0x76, 0x46, 0xd8, + 0xf7, 0xfa, 0x9d, 0x38, 0xe0, 0x9e, 0x6f, 0xe8, 0xf3, 0xd0, 0x48, 0xe0, 0x5b, 0x81, 0x6b, 0x3d, + 0x83, 0x79, 0xf1, 0x7a, 0x19, 0x6a, 0xa9, 0x43, 0x84, 0xd0, 0xed, 0x9f, 0x82, 0xea, 0xf2, 0x0d, + 0x9f, 0xfa, 0xde, 0x36, 0xb4, 0xed, 0xcd, 0xd3, 0x0b, 0x53, 0x3b, 0xbb, 0x30, 0xb5, 0xab, 0x0b, + 0x13, 0x7c, 0x98, 0x98, 0xe0, 0xcb, 0xc4, 0x04, 0x27, 0x13, 0x13, 0x9c, 0x4e, 0x4c, 0xf0, 0x73, + 0x62, 0x82, 0x5f, 0x13, 0x53, 0xbb, 0x9a, 0x98, 0xe0, 0xf8, 0xd2, 0xd4, 0x4e, 0x2f, 0x4d, 0xed, + 0xec, 0xd2, 0xd4, 0xba, 0x05, 0xd9, 0xdc, 0xc6, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x34, + 0xd7, 0x09, 0x4a, 0x07, 0x00, 0x00, } func (x RulesRequest_RuleType) String() string { @@ -2304,7 +2304,7 @@ func (m *AlertStateDesc) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = append(m.Labels, github_com_grafana_loki_pkg_logproto.LabelAdapter{}) + m.Labels = append(m.Labels, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{}) if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -2338,7 +2338,7 @@ func (m *AlertStateDesc) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Annotations = append(m.Annotations, github_com_grafana_loki_pkg_logproto.LabelAdapter{}) + m.Annotations = append(m.Annotations, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{}) if err := m.Annotations[len(m.Annotations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pkg/ruler/base/ruler.proto b/pkg/ruler/base/ruler.proto index 0b143728efe6..e47c497def90 100644 --- a/pkg/ruler/base/ruler.proto +++ b/pkg/ruler/base/ruler.proto @@ -69,11 +69,11 @@ message AlertStateDesc { string state = 1; repeated logproto.LegacyLabelPair labels = 2 [ (gogoproto.nullable) = false, - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" ]; repeated logproto.LegacyLabelPair annotations = 3 [ (gogoproto.nullable) = false, - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" ]; double value = 4; google.protobuf.Timestamp active_at = 5 [ diff --git a/pkg/ruler/base/ruler_ring.go b/pkg/ruler/base/ruler_ring.go index 697b1d8b9ac5..4d50dd2934c5 100644 --- a/pkg/ruler/base/ruler_ring.go +++ b/pkg/ruler/base/ruler_ring.go @@ -14,7 +14,7 @@ import ( "github.com/grafana/dskit/netutil" "github.com/grafana/dskit/ring" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/ruler/base/ruler_test.go b/pkg/ruler/base/ruler_test.go index d17691e1bb6a..931f8288be4d 100644 --- a/pkg/ruler/base/ruler_test.go +++ b/pkg/ruler/base/ruler_test.go @@ -45,17 +45,17 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/series" - "github.com/grafana/loki/pkg/ruler/config" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/ruler/rulestore" - "github.com/grafana/loki/pkg/ruler/rulestore/objectclient" - loki_storage "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/series" + "github.com/grafana/loki/v3/pkg/ruler/config" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/objectclient" + loki_storage "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) func defaultRulerConfig(t testing.TB, store rulestore.RuleStore) Config { diff --git a/pkg/ruler/base/storage.go b/pkg/ruler/base/storage.go index 4a79fd569122..c2548f0e4683 100644 --- a/pkg/ruler/base/storage.go +++ b/pkg/ruler/base/storage.go @@ -10,23 +10,23 @@ import ( "github.com/prometheus/client_golang/prometheus" promRules "github.com/prometheus/prometheus/rules" - configClient "github.com/grafana/loki/pkg/configs/client" - "github.com/grafana/loki/pkg/ruler/rulestore" - "github.com/grafana/loki/pkg/ruler/rulestore/bucketclient" - "github.com/grafana/loki/pkg/ruler/rulestore/configdb" - "github.com/grafana/loki/pkg/ruler/rulestore/local" - "github.com/grafana/loki/pkg/ruler/rulestore/objectclient" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/bucket" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/alibaba" - "github.com/grafana/loki/pkg/storage/chunk/client/aws" - "github.com/grafana/loki/pkg/storage/chunk/client/azure" - "github.com/grafana/loki/pkg/storage/chunk/client/baidubce" - "github.com/grafana/loki/pkg/storage/chunk/client/gcp" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/storage/chunk/client/ibmcloud" - "github.com/grafana/loki/pkg/storage/chunk/client/openstack" + configClient "github.com/grafana/loki/v3/pkg/configs/client" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/bucketclient" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/configdb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/local" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/objectclient" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/bucket" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/alibaba" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/aws" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/azure" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/baidubce" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/gcp" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/ibmcloud" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/openstack" ) // RuleStoreConfig configures a rule store. diff --git a/pkg/ruler/base/store_mock_test.go b/pkg/ruler/base/store_mock_test.go index 2d92afdfbb1d..b20a76571df6 100644 --- a/pkg/ruler/base/store_mock_test.go +++ b/pkg/ruler/base/store_mock_test.go @@ -7,9 +7,9 @@ import ( "sync" "time" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" ) type mockRuleStore struct { diff --git a/pkg/ruler/compat.go b/pkg/ruler/compat.go index 355acc7d6191..6d3a6b68334d 100644 --- a/pkg/ruler/compat.go +++ b/pkg/ruler/compat.go @@ -24,11 +24,11 @@ import ( "github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/template" - "github.com/grafana/loki/pkg/logql/syntax" - ruler "github.com/grafana/loki/pkg/ruler/base" - "github.com/grafana/loki/pkg/ruler/rulespb" - rulerutil "github.com/grafana/loki/pkg/ruler/util" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logql/syntax" + ruler "github.com/grafana/loki/v3/pkg/ruler/base" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + rulerutil "github.com/grafana/loki/v3/pkg/ruler/util" + "github.com/grafana/loki/v3/pkg/util" ) // RulesLimits is the one function we need from limits.Overrides, and diff --git a/pkg/ruler/compat_test.go b/pkg/ruler/compat_test.go index 55e77c2f18a2..6855368aefde 100644 --- a/pkg/ruler/compat_test.go +++ b/pkg/ruler/compat_test.go @@ -12,11 +12,11 @@ import ( "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logql" - rulerbase "github.com/grafana/loki/pkg/ruler/base" - "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logql" + rulerbase "github.com/grafana/loki/v3/pkg/ruler/base" + "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) // TestInvalidRuleGroup tests that a validation error is raised when rule group is invalid diff --git a/pkg/ruler/config.go b/pkg/ruler/config.go index 7d948baa0c30..69293b91324a 100644 --- a/pkg/ruler/config.go +++ b/pkg/ruler/config.go @@ -9,9 +9,9 @@ import ( "github.com/prometheus/prometheus/config" "gopkg.in/yaml.v2" - ruler "github.com/grafana/loki/pkg/ruler/base" - "github.com/grafana/loki/pkg/ruler/storage/cleaner" - "github.com/grafana/loki/pkg/ruler/storage/instance" + ruler "github.com/grafana/loki/v3/pkg/ruler/base" + "github.com/grafana/loki/v3/pkg/ruler/storage/cleaner" + "github.com/grafana/loki/v3/pkg/ruler/storage/instance" ) type Config struct { diff --git a/pkg/ruler/config/alertmanager.go b/pkg/ruler/config/alertmanager.go index d30eec8df2be..8282a39326f0 100644 --- a/pkg/ruler/config/alertmanager.go +++ b/pkg/ruler/config/alertmanager.go @@ -7,7 +7,7 @@ import ( "github.com/grafana/dskit/crypto/tls" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) type AlertManagerConfig struct { diff --git a/pkg/ruler/evaluator.go b/pkg/ruler/evaluator.go index 639bd102502c..ce93e8310be7 100644 --- a/pkg/ruler/evaluator.go +++ b/pkg/ruler/evaluator.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) // Evaluator is the interface that must be satisfied in order to accept rule evaluations from the Ruler. diff --git a/pkg/ruler/evaluator_jitter.go b/pkg/ruler/evaluator_jitter.go index 449ca0e18011..ba5b0998c6a1 100644 --- a/pkg/ruler/evaluator_jitter.go +++ b/pkg/ruler/evaluator_jitter.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/util" ) // EvaluatorWithJitter wraps a given Evaluator. It applies a consistent jitter based on a rule's query string by hashing diff --git a/pkg/ruler/evaluator_jitter_test.go b/pkg/ruler/evaluator_jitter_test.go index 7a1636c55939..f6e35a390e99 100644 --- a/pkg/ruler/evaluator_jitter_test.go +++ b/pkg/ruler/evaluator_jitter_test.go @@ -11,7 +11,7 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) type mockEval struct{} diff --git a/pkg/ruler/evaluator_local.go b/pkg/ruler/evaluator_local.go index 91efd5a14d99..dbbd8c813e1f 100644 --- a/pkg/ruler/evaluator_local.go +++ b/pkg/ruler/evaluator_local.go @@ -7,9 +7,9 @@ import ( "github.com/go-kit/log" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) const EvalModeLocal = "local" diff --git a/pkg/ruler/evaluator_remote.go b/pkg/ruler/evaluator_remote.go index 8cfc63efca91..a409e814d87c 100644 --- a/pkg/ruler/evaluator_remote.go +++ b/pkg/ruler/evaluator_remote.go @@ -35,13 +35,13 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/keepalive" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/build" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/httpreq" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/build" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/ruler/evaluator_remote_test.go b/pkg/ruler/evaluator_remote_test.go index 6c38fe6ca1e5..515b8ea30652 100644 --- a/pkg/ruler/evaluator_remote_test.go +++ b/pkg/ruler/evaluator_remote_test.go @@ -18,9 +18,9 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) type mockClient struct { diff --git a/pkg/ruler/grouploader.go b/pkg/ruler/grouploader.go index 628e5a1f873a..2f22e0a680b1 100644 --- a/pkg/ruler/grouploader.go +++ b/pkg/ruler/grouploader.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/prometheus/rules" "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) type GroupLoader struct{} diff --git a/pkg/ruler/memstore.go b/pkg/ruler/memstore.go index b70d17a954b3..69d37ddfeed2 100644 --- a/pkg/ruler/memstore.go +++ b/pkg/ruler/memstore.go @@ -19,9 +19,9 @@ import ( "github.com/prometheus/prometheus/rules" "github.com/prometheus/prometheus/storage" - "github.com/grafana/loki/pkg/querier/series" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/querier/series" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/ruler/memstore_test.go b/pkg/ruler/memstore_test.go index 43c13be42c6c..3c26a0f71506 100644 --- a/pkg/ruler/memstore_test.go +++ b/pkg/ruler/memstore_test.go @@ -15,7 +15,7 @@ import ( "github.com/prometheus/prometheus/tsdb/chunkenc" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) const ruleName = "testrule" diff --git a/pkg/ruler/registry.go b/pkg/ruler/registry.go index 5874eb7536e8..868b7f29a6f9 100644 --- a/pkg/ruler/registry.go +++ b/pkg/ruler/registry.go @@ -25,9 +25,9 @@ import ( "github.com/prometheus/prometheus/storage" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/ruler/storage/cleaner" - "github.com/grafana/loki/pkg/ruler/storage/instance" - "github.com/grafana/loki/pkg/ruler/storage/wal" + "github.com/grafana/loki/v3/pkg/ruler/storage/cleaner" + "github.com/grafana/loki/v3/pkg/ruler/storage/instance" + "github.com/grafana/loki/v3/pkg/ruler/storage/wal" ) type walRegistry struct { diff --git a/pkg/ruler/registry_test.go b/pkg/ruler/registry_test.go index 46ab9a708457..261b6d383676 100644 --- a/pkg/ruler/registry_test.go +++ b/pkg/ruler/registry_test.go @@ -19,10 +19,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/ruler/storage/instance" - "github.com/grafana/loki/pkg/ruler/util" - "github.com/grafana/loki/pkg/util/test" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/ruler/storage/instance" + "github.com/grafana/loki/v3/pkg/ruler/util" + "github.com/grafana/loki/v3/pkg/util/test" + "github.com/grafana/loki/v3/pkg/validation" ) const enabledRWTenant = "enabled" diff --git a/pkg/ruler/ruler.go b/pkg/ruler/ruler.go index dd90ccb15339..5ef091badeb7 100644 --- a/pkg/ruler/ruler.go +++ b/pkg/ruler/ruler.go @@ -6,8 +6,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/config" - ruler "github.com/grafana/loki/pkg/ruler/base" - "github.com/grafana/loki/pkg/ruler/rulestore" + ruler "github.com/grafana/loki/v3/pkg/ruler/base" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" ) func NewRuler(cfg Config, evaluator Evaluator, reg prometheus.Registerer, logger log.Logger, ruleStore rulestore.RuleStore, limits RulesLimits, metricsNamespace string) (*ruler.Ruler, error) { diff --git a/pkg/ruler/rulespb/compat.go b/pkg/ruler/rulespb/compat.go index a0da3dc014f4..0c9de4185a10 100644 --- a/pkg/ruler/rulespb/compat.go +++ b/pkg/ruler/rulespb/compat.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/prometheus/model/rulefmt" "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/logproto" //lint:ignore faillint allowed to import other protobuf + "github.com/grafana/loki/v3/pkg/logproto" //lint:ignore faillint allowed to import other protobuf ) // ToProto transforms a formatted prometheus rulegroup to a rule group protobuf diff --git a/pkg/ruler/rulespb/rules.pb.go b/pkg/ruler/rulespb/rules.pb.go index ead0d482791b..91afa25a655e 100644 --- a/pkg/ruler/rulespb/rules.pb.go +++ b/pkg/ruler/rulespb/rules.pb.go @@ -10,8 +10,8 @@ import ( github_com_gogo_protobuf_types "github.com/gogo/protobuf/types" types "github.com/gogo/protobuf/types" _ "github.com/golang/protobuf/ptypes/duration" - _ "github.com/grafana/loki/pkg/logproto" - github_com_grafana_loki_pkg_logproto "github.com/grafana/loki/pkg/logproto" + _ "github.com/grafana/loki/v3/pkg/logproto" + github_com_grafana_loki_v3_pkg_logproto "github.com/grafana/loki/v3/pkg/logproto" io "io" math "math" math_bits "math/bits" @@ -130,12 +130,12 @@ func (m *RuleGroupDesc) GetLimit() int64 { // RuleDesc is a proto representation of a Prometheus Rule type RuleDesc struct { - Expr string `protobuf:"bytes,1,opt,name=expr,proto3" json:"expr,omitempty"` - Record string `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` - Alert string `protobuf:"bytes,3,opt,name=alert,proto3" json:"alert,omitempty"` - For time.Duration `protobuf:"bytes,4,opt,name=for,proto3,stdduration" json:"for"` - Labels []github_com_grafana_loki_pkg_logproto.LabelAdapter `protobuf:"bytes,5,rep,name=labels,proto3,customtype=github.com/grafana/loki/pkg/logproto.LabelAdapter" json:"labels"` - Annotations []github_com_grafana_loki_pkg_logproto.LabelAdapter `protobuf:"bytes,6,rep,name=annotations,proto3,customtype=github.com/grafana/loki/pkg/logproto.LabelAdapter" json:"annotations"` + Expr string `protobuf:"bytes,1,opt,name=expr,proto3" json:"expr,omitempty"` + Record string `protobuf:"bytes,2,opt,name=record,proto3" json:"record,omitempty"` + Alert string `protobuf:"bytes,3,opt,name=alert,proto3" json:"alert,omitempty"` + For time.Duration `protobuf:"bytes,4,opt,name=for,proto3,stdduration" json:"for"` + Labels []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,5,rep,name=labels,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"labels"` + Annotations []github_com_grafana_loki_v3_pkg_logproto.LabelAdapter `protobuf:"bytes,6,rep,name=annotations,proto3,customtype=github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" json:"annotations"` } func (m *RuleDesc) Reset() { *m = RuleDesc{} } @@ -206,39 +206,39 @@ func init() { func init() { proto.RegisterFile("pkg/ruler/rulespb/rules.proto", fileDescriptor_dd3ef3757f506fba) } var fileDescriptor_dd3ef3757f506fba = []byte{ - // 501 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x41, 0x6f, 0xd3, 0x30, - 0x18, 0x8d, 0xdb, 0x34, 0x4b, 0x5c, 0x4d, 0x54, 0x56, 0x85, 0xd2, 0x01, 0x6e, 0x35, 0x09, 0xa9, - 0x5c, 0x12, 0x31, 0xc4, 0x81, 0x13, 0x5a, 0x35, 0x09, 0xa9, 0xda, 0x01, 0xe5, 0xc8, 0x05, 0x39, - 0xa9, 0x6b, 0xa2, 0xb9, 0x71, 0xe4, 0x24, 0x13, 0xbd, 0xf1, 0x13, 0xb8, 0x20, 0xf1, 0x13, 0xf8, - 0x29, 0x3b, 0xf6, 0x38, 0x71, 0x18, 0x34, 0xbd, 0x70, 0x63, 0x3f, 0x01, 0xd9, 0x4e, 0xc6, 0x00, - 0x09, 0x71, 0xe1, 0x12, 0x7f, 0xcf, 0xcf, 0x9f, 0xdf, 0xfb, 0x5e, 0x12, 0xf8, 0x20, 0x3f, 0x63, - 0xa1, 0xac, 0x38, 0x95, 0xfa, 0x59, 0xe4, 0xb1, 0x59, 0x83, 0x5c, 0x8a, 0x52, 0xa0, 0x9e, 0x06, - 0x07, 0x43, 0x26, 0x98, 0xd0, 0x3b, 0xa1, 0xaa, 0x0c, 0x79, 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 0x4f, 0x7e, 0x04, 0x00, 0x00, 0xff, 0xff, 0x6f, 0xf3, 0x96, - 0x82, 0x87, 0x03, 0x00, 0x00, + // 503 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x53, 0x31, 0x6f, 0xd3, 0x40, + 0x18, 0xf5, 0x25, 0x8e, 0x6b, 0x5f, 0x54, 0x11, 0x9d, 0x22, 0xe4, 0x14, 0xb8, 0x44, 0x95, 0x90, + 0x32, 0x20, 0x5b, 0x6a, 0x61, 0x43, 0x42, 0x8d, 0x2a, 0x21, 0x45, 0x1d, 0x90, 0x47, 0xb6, 0xb3, + 0x73, 0x39, 0xac, 0x5e, 0x7c, 0xd6, 0xd9, 0xae, 0xc8, 0xc6, 0x4f, 0x60, 0x41, 0xe2, 0x27, 0xf0, + 0x53, 0x3a, 0x66, 0xac, 0x18, 0x0a, 0x71, 0x16, 0xc6, 0x2e, 0xec, 0xe8, 0xee, 0xec, 0x52, 0x60, + 0x80, 0x85, 0xc5, 0xf7, 0xbd, 0x7b, 0xf7, 0xdd, 0x7b, 0xdf, 0xb3, 0x0d, 0x1f, 0xe5, 0xe7, 0x2c, + 0x94, 0x15, 0xa7, 0x52, 0x3f, 0x8b, 0x3c, 0x36, 0x6b, 0x90, 0x4b, 0x51, 0x0a, 0xd4, 0xd3, 0xe0, + 0x60, 0xc8, 0x04, 0x13, 0x7a, 0x27, 0x54, 0x95, 0x21, 0x0f, 0x46, 0x4c, 0x08, 0xc6, 0x69, 0xa8, + 0x51, 0x5c, 0x2d, 0x43, 0x92, 0xad, 0x1b, 0x0a, 0xff, 0x4e, 0x2d, 0x2a, 0x49, 0xca, 0x54, 0x64, + 0x0d, 0xff, 0x40, 0xc9, 0x72, 0xc1, 0xcc, 0x9d, 0x6d, 0x61, 0xc8, 0xc3, 0x0f, 0x1d, 0xb8, 0x1f, + 0x55, 0x9c, 0xbe, 0x94, 0xa2,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d, 0x1d, 0x75, 0x1e, + 0x09, 0xe8, 0x70, 0x12, 0x53, 0x5e, 0xf8, 0x3d, 0x3d, 0xdc, 0x28, 0xb8, 0x7d, 0x7d, 0x67, 0x94, + 0x91, 0x64, 0x7d, 0xa6, 0xd8, 0x57, 0x24, 0x95, 0xb3, 0xe7, 0xaa, 0xf3, 0xf3, 0xf5, 0xf8, 0x29, + 0x4b, 0xcb, 0x37, 0x55, 0x1c, 0x24, 0x62, 0x15, 0x32, 0x49, 0x96, 0x24, 0x23, 0x21, 0x17, 0xe7, + 0x69, 0x78, 0x71, 0x1c, 0xde, 0xfd, 0x10, 0x02, 0xdd, 0x7a, 0xb2, 0x20, 0x79, 0x49, 0x65, 0xd4, + 0xc8, 0xa0, 0x35, 0xec, 0x93, 0x2c, 0x13, 0x25, 0x31, 0x91, 0x3a, 0xff, 0x57, 0xf5, 0xae, 0x96, + 0x4e, 0x7f, 0x7f, 0x16, 0x6f, 0xb6, 0xd8, 0xba, 0xda, 0x62, 0xeb, 0x66, 0x8b, 0xc1, 0xbb, 0x1a, + 0x83, 0x4f, 0x35, 0x06, 0x97, 0x35, 0x06, 0x9b, 0x1a, 0x83, 0xaf, 0x35, 0x06, 0xdf, 0x6a, 0x6c, + 0xdd, 0xd4, 0x18, 0xbc, 0xdf, 0x61, 0x6b, 0xb3, 0xc3, 0xd6, 0xd5, 0x0e, 0x5b, 0xaf, 0x9f, 0xfc, + 0x45, 0xfe, 0x97, 0x9f, 0x2e, 0x76, 0xb4, 0x95, 0xe3, 0x1f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xab, + 0x30, 0xeb, 0xc9, 0x90, 0x03, 0x00, 0x00, } func (this *RuleGroupDesc) Equal(that interface{}) bool { @@ -1145,7 +1145,7 @@ func (m *RuleDesc) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Labels = append(m.Labels, github_com_grafana_loki_pkg_logproto.LabelAdapter{}) + m.Labels = append(m.Labels, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{}) if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } @@ -1179,7 +1179,7 @@ func (m *RuleDesc) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Annotations = append(m.Annotations, github_com_grafana_loki_pkg_logproto.LabelAdapter{}) + m.Annotations = append(m.Annotations, github_com_grafana_loki_v3_pkg_logproto.LabelAdapter{}) if err := m.Annotations[len(m.Annotations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } diff --git a/pkg/ruler/rulespb/rules.proto b/pkg/ruler/rulespb/rules.proto index be001d238d1d..82dc7daabd56 100644 --- a/pkg/ruler/rulespb/rules.proto +++ b/pkg/ruler/rulespb/rules.proto @@ -7,7 +7,7 @@ import "google/protobuf/any.proto"; import "google/protobuf/duration.proto"; import "pkg/logproto/logproto.proto"; -option go_package = "github.com/grafana/loki/pkg/ruler/rulespb"; +option go_package = "github.com/grafana/loki/v3/pkg/ruler/rulespb"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; @@ -42,10 +42,10 @@ message RuleDesc { ]; repeated logproto.LegacyLabelPair labels = 5 [ (gogoproto.nullable) = false, - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" ]; repeated logproto.LegacyLabelPair annotations = 6 [ (gogoproto.nullable) = false, - (gogoproto.customtype) = "github.com/grafana/loki/pkg/logproto.LabelAdapter" + (gogoproto.customtype) = "github.com/grafana/loki/v3/pkg/logproto.LabelAdapter" ]; } diff --git a/pkg/ruler/rulestore/bucketclient/bucket_client.go b/pkg/ruler/rulestore/bucketclient/bucket_client.go index ddd90cb57fdf..a39a8b03532d 100644 --- a/pkg/ruler/rulestore/bucketclient/bucket_client.go +++ b/pkg/ruler/rulestore/bucketclient/bucket_client.go @@ -15,9 +15,9 @@ import ( "github.com/thanos-io/objstore" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/ruler/rulestore" - "github.com/grafana/loki/pkg/storage/bucket" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/storage/bucket" ) const ( diff --git a/pkg/ruler/rulestore/bucketclient/bucket_client_test.go b/pkg/ruler/rulestore/bucketclient/bucket_client_test.go index 360b7aedb221..0644238b2168 100644 --- a/pkg/ruler/rulestore/bucketclient/bucket_client_test.go +++ b/pkg/ruler/rulestore/bucketclient/bucket_client_test.go @@ -16,11 +16,11 @@ import ( "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/ruler/rulestore" - "github.com/grafana/loki/pkg/ruler/rulestore/objectclient" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/objectclient" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" ) type testGroup struct { diff --git a/pkg/ruler/rulestore/config.go b/pkg/ruler/rulestore/config.go index f43464d463df..1f0602424cdb 100644 --- a/pkg/ruler/rulestore/config.go +++ b/pkg/ruler/rulestore/config.go @@ -6,10 +6,10 @@ import ( "github.com/grafana/dskit/flagext" - "github.com/grafana/loki/pkg/configs/client" - "github.com/grafana/loki/pkg/ruler/rulestore/configdb" - "github.com/grafana/loki/pkg/ruler/rulestore/local" - "github.com/grafana/loki/pkg/storage/bucket" + "github.com/grafana/loki/v3/pkg/configs/client" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/configdb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/local" + "github.com/grafana/loki/v3/pkg/storage/bucket" ) // Config configures a rule store. diff --git a/pkg/ruler/rulestore/configdb/store.go b/pkg/ruler/rulestore/configdb/store.go index a3efa3fc3015..e4a0526386fe 100644 --- a/pkg/ruler/rulestore/configdb/store.go +++ b/pkg/ruler/rulestore/configdb/store.go @@ -4,9 +4,9 @@ import ( "context" "errors" - "github.com/grafana/loki/pkg/configs/client" - "github.com/grafana/loki/pkg/configs/userconfig" - "github.com/grafana/loki/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/configs/client" + "github.com/grafana/loki/v3/pkg/configs/userconfig" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" ) const ( diff --git a/pkg/ruler/rulestore/configdb/store_test.go b/pkg/ruler/rulestore/configdb/store_test.go index 3542b7bf7bc4..4d39581cb649 100644 --- a/pkg/ruler/rulestore/configdb/store_test.go +++ b/pkg/ruler/rulestore/configdb/store_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/configs/client" - "github.com/grafana/loki/pkg/configs/userconfig" + "github.com/grafana/loki/v3/pkg/configs/client" + "github.com/grafana/loki/v3/pkg/configs/userconfig" ) var zeroTime time.Time diff --git a/pkg/ruler/rulestore/local/local.go b/pkg/ruler/rulestore/local/local.go index d798c9831510..0eb3cda68175 100644 --- a/pkg/ruler/rulestore/local/local.go +++ b/pkg/ruler/rulestore/local/local.go @@ -9,7 +9,7 @@ import ( "github.com/pkg/errors" promRules "github.com/prometheus/prometheus/rules" - "github.com/grafana/loki/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" ) const ( diff --git a/pkg/ruler/rulestore/local/local_test.go b/pkg/ruler/rulestore/local/local_test.go index 8922781a207a..ee6abc5b8ee3 100644 --- a/pkg/ruler/rulestore/local/local_test.go +++ b/pkg/ruler/rulestore/local/local_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" - "github.com/grafana/loki/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" ) func TestClient_LoadAllRuleGroups(t *testing.T) { diff --git a/pkg/ruler/rulestore/objectclient/rule_store.go b/pkg/ruler/rulestore/objectclient/rule_store.go index 8e7effbcaae0..3471bd88db49 100644 --- a/pkg/ruler/rulestore/objectclient/rule_store.go +++ b/pkg/ruler/rulestore/objectclient/rule_store.go @@ -14,9 +14,9 @@ import ( "github.com/pkg/errors" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/ruler/rulespb" - "github.com/grafana/loki/pkg/ruler/rulestore" - "github.com/grafana/loki/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulestore" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" ) // Object Rule Storage Schema diff --git a/pkg/ruler/rulestore/store.go b/pkg/ruler/rulestore/store.go index 82f7d4f6ec09..67bd5580dd59 100644 --- a/pkg/ruler/rulestore/store.go +++ b/pkg/ruler/rulestore/store.go @@ -4,7 +4,7 @@ import ( "context" "errors" - "github.com/grafana/loki/pkg/ruler/rulespb" + "github.com/grafana/loki/v3/pkg/ruler/rulespb" ) var ( diff --git a/pkg/ruler/storage/cleaner/cleaner.go b/pkg/ruler/storage/cleaner/cleaner.go index b1ad8e76caa0..e923815c0726 100644 --- a/pkg/ruler/storage/cleaner/cleaner.go +++ b/pkg/ruler/storage/cleaner/cleaner.go @@ -14,8 +14,8 @@ import ( "github.com/go-kit/log/level" promwal "github.com/prometheus/prometheus/tsdb/wlog" - "github.com/grafana/loki/pkg/ruler/storage/instance" - "github.com/grafana/loki/pkg/ruler/storage/wal" + "github.com/grafana/loki/v3/pkg/ruler/storage/instance" + "github.com/grafana/loki/v3/pkg/ruler/storage/wal" ) // Default settings for the WAL cleaner. diff --git a/pkg/ruler/storage/cleaner/cleaner_test.go b/pkg/ruler/storage/cleaner/cleaner_test.go index 448333165857..5d5147eb0ada 100644 --- a/pkg/ruler/storage/cleaner/cleaner_test.go +++ b/pkg/ruler/storage/cleaner/cleaner_test.go @@ -12,7 +12,7 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/ruler/storage/instance" + "github.com/grafana/loki/v3/pkg/ruler/storage/instance" ) func TestWALCleaner_getAllStorageNoRoot(t *testing.T) { diff --git a/pkg/ruler/storage/instance/instance.go b/pkg/ruler/storage/instance/instance.go index b6cd1fc2ed25..9bcfcea1319d 100644 --- a/pkg/ruler/storage/instance/instance.go +++ b/pkg/ruler/storage/instance/instance.go @@ -27,9 +27,9 @@ import ( "github.com/prometheus/prometheus/tsdb/wlog" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/ruler/storage/util" - "github.com/grafana/loki/pkg/ruler/storage/wal" - "github.com/grafana/loki/pkg/util/build" + "github.com/grafana/loki/v3/pkg/ruler/storage/util" + "github.com/grafana/loki/v3/pkg/ruler/storage/wal" + "github.com/grafana/loki/v3/pkg/util/build" ) func init() { diff --git a/pkg/ruler/storage/instance/instance_test.go b/pkg/ruler/storage/instance/instance_test.go index b017664e33f7..03a469ed187c 100644 --- a/pkg/ruler/storage/instance/instance_test.go +++ b/pkg/ruler/storage/instance/instance_test.go @@ -29,7 +29,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/util/test" + "github.com/grafana/loki/v3/pkg/util/test" ) func TestConfig_Unmarshal_Defaults(t *testing.T) { diff --git a/pkg/ruler/storage/instance/manager.go b/pkg/ruler/storage/instance/manager.go index c65b087acae1..765f3dfc9165 100644 --- a/pkg/ruler/storage/instance/manager.go +++ b/pkg/ruler/storage/instance/manager.go @@ -14,7 +14,7 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/prometheus/storage" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/scheduler/scheduler.go b/pkg/scheduler/scheduler.go index 4c26becce7a6..ead2f1799b63 100644 --- a/pkg/scheduler/scheduler.go +++ b/pkg/scheduler/scheduler.go @@ -28,15 +28,15 @@ import ( "go.uber.org/atomic" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/lokifrontend/frontend/v2/frontendv2pb" - "github.com/grafana/loki/pkg/querier/queryrange" - "github.com/grafana/loki/pkg/queue" - "github.com/grafana/loki/pkg/scheduler/limits" - "github.com/grafana/loki/pkg/scheduler/schedulerpb" - "github.com/grafana/loki/pkg/util" - lokigrpc "github.com/grafana/loki/pkg/util/httpgrpc" - lokihttpreq "github.com/grafana/loki/pkg/util/httpreq" - lokiring "github.com/grafana/loki/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/lokifrontend/frontend/v2/frontendv2pb" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/queue" + "github.com/grafana/loki/v3/pkg/scheduler/limits" + "github.com/grafana/loki/v3/pkg/scheduler/schedulerpb" + "github.com/grafana/loki/v3/pkg/util" + lokigrpc "github.com/grafana/loki/v3/pkg/util/httpgrpc" + lokihttpreq "github.com/grafana/loki/v3/pkg/util/httpreq" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" ) const ( diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go index 5be9ed7ed6c8..7f8d88e4d679 100644 --- a/pkg/scheduler/scheduler_test.go +++ b/pkg/scheduler/scheduler_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/scheduler/schedulerpb" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/scheduler/schedulerpb" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func TestScheduler_setRunState(t *testing.T) { diff --git a/pkg/scheduler/schedulerpb/scheduler.pb.go b/pkg/scheduler/schedulerpb/scheduler.pb.go index c2f95e59cdae..fa4df89363c5 100644 --- a/pkg/scheduler/schedulerpb/scheduler.pb.go +++ b/pkg/scheduler/schedulerpb/scheduler.pb.go @@ -9,7 +9,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" httpgrpc "github.com/grafana/dskit/httpgrpc" - queryrange "github.com/grafana/loki/pkg/querier/queryrange" + queryrange "github.com/grafana/loki/v3/pkg/querier/queryrange" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" diff --git a/pkg/storage/async_store.go b/pkg/storage/async_store.go index e3794a63733a..31fea0ced088 100644 --- a/pkg/storage/async_store.go +++ b/pkg/storage/async_store.go @@ -7,22 +7,22 @@ import ( "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" "github.com/go-kit/log/level" "github.com/grafana/dskit/concurrency" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) type IngesterQuerier interface { diff --git a/pkg/storage/async_store_test.go b/pkg/storage/async_store_test.go index 9b2e440c1dc7..366a7d6f1f1d 100644 --- a/pkg/storage/async_store_test.go +++ b/pkg/storage/async_store_test.go @@ -5,17 +5,17 @@ import ( "testing" "time" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util" ) // storeMock is a mockable version of Loki's storage, used in querier unit tests diff --git a/pkg/storage/batch.go b/pkg/storage/batch.go index 20cc45b69590..21f321a6f8a5 100644 --- a/pkg/storage/batch.go +++ b/pkg/storage/batch.go @@ -13,18 +13,18 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/promql" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type ChunkMetrics struct { diff --git a/pkg/storage/batch_test.go b/pkg/storage/batch_test.go index 1df906f7dcf2..e041ad186fe8 100644 --- a/pkg/storage/batch_test.go +++ b/pkg/storage/batch_test.go @@ -13,13 +13,13 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/config" ) var NilMetrics = NewChunkMetrics(nil, 0) diff --git a/pkg/storage/bloom/v1/archive.go b/pkg/storage/bloom/v1/archive.go index 07ed9cd76d7f..fcc3294eba97 100644 --- a/pkg/storage/bloom/v1/archive.go +++ b/pkg/storage/bloom/v1/archive.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/chunkenc" ) type TarEntry struct { diff --git a/pkg/storage/bloom/v1/archive_test.go b/pkg/storage/bloom/v1/archive_test.go index c77fbc69f122..d6131c166f67 100644 --- a/pkg/storage/bloom/v1/archive_test.go +++ b/pkg/storage/bloom/v1/archive_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/chunkenc" ) func TestArchive(t *testing.T) { diff --git a/pkg/storage/bloom/v1/block_writer.go b/pkg/storage/bloom/v1/block_writer.go index b7954264ae8b..1bdc38f32fca 100644 --- a/pkg/storage/bloom/v1/block_writer.go +++ b/pkg/storage/bloom/v1/block_writer.go @@ -8,7 +8,7 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" ) const ( diff --git a/pkg/storage/bloom/v1/bloom.go b/pkg/storage/bloom/v1/bloom.go index 058ac68818d5..1554b6828f24 100644 --- a/pkg/storage/bloom/v1/bloom.go +++ b/pkg/storage/bloom/v1/bloom.go @@ -7,9 +7,9 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/util/encoding" ) // NB(chaudum): Some block pages are way bigger than others (400MiB and diff --git a/pkg/storage/bloom/v1/bloom_tester.go b/pkg/storage/bloom/v1/bloom_tester.go index f60166788e4d..dbb0f7a12aaf 100644 --- a/pkg/storage/bloom/v1/bloom_tester.go +++ b/pkg/storage/bloom/v1/bloom_tester.go @@ -4,10 +4,10 @@ import ( "github.com/grafana/regexp" regexpsyntax "github.com/grafana/regexp/syntax" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/log/pattern" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/log/pattern" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" ) type BloomTest interface { diff --git a/pkg/storage/bloom/v1/bloom_tester_test.go b/pkg/storage/bloom/v1/bloom_tester_test.go index 085d56c59006..00db00340340 100644 --- a/pkg/storage/bloom/v1/bloom_tester_test.go +++ b/pkg/storage/bloom/v1/bloom_tester_test.go @@ -5,8 +5,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" ) func TestFiltersToBloomTests(t *testing.T) { diff --git a/pkg/storage/bloom/v1/bloom_tokenizer.go b/pkg/storage/bloom/v1/bloom_tokenizer.go index 16f6f0bc6816..f529f2271763 100644 --- a/pkg/storage/bloom/v1/bloom_tokenizer.go +++ b/pkg/storage/bloom/v1/bloom_tokenizer.go @@ -10,10 +10,10 @@ import ( "github.com/grafana/dskit/multierror" - "github.com/grafana/loki/pkg/iter" + "github.com/grafana/loki/v3/pkg/iter" - "github.com/grafana/loki/pkg/util/encoding" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/encoding" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) /* diff --git a/pkg/storage/bloom/v1/bloom_tokenizer_test.go b/pkg/storage/bloom/v1/bloom_tokenizer_test.go index d80c17571345..048c972d44c6 100644 --- a/pkg/storage/bloom/v1/bloom_tokenizer_test.go +++ b/pkg/storage/bloom/v1/bloom_tokenizer_test.go @@ -9,15 +9,16 @@ import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" "github.com/grafana/loki/pkg/push" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" "github.com/prometheus/client_golang/prometheus" ) diff --git a/pkg/storage/bloom/v1/bounds.go b/pkg/storage/bloom/v1/bounds.go index 542ba2c97279..1b482e46665b 100644 --- a/pkg/storage/bloom/v1/bounds.go +++ b/pkg/storage/bloom/v1/bounds.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/common/model" "golang.org/x/exp/slices" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util/encoding" ) type BoundsCheck uint8 diff --git a/pkg/storage/bloom/v1/bounds_test.go b/pkg/storage/bloom/v1/bounds_test.go index 98fec7b0aafa..5baaf07e900d 100644 --- a/pkg/storage/bloom/v1/bounds_test.go +++ b/pkg/storage/bloom/v1/bounds_test.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func TestBoundsFromProto(t *testing.T) { diff --git a/pkg/storage/bloom/v1/builder.go b/pkg/storage/bloom/v1/builder.go index aa00b58cf670..0d129aa3def2 100644 --- a/pkg/storage/bloom/v1/builder.go +++ b/pkg/storage/bloom/v1/builder.go @@ -9,9 +9,9 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/util/encoding" ) var ( diff --git a/pkg/storage/bloom/v1/builder_test.go b/pkg/storage/bloom/v1/builder_test.go index 481c8ec9f915..204614403249 100644 --- a/pkg/storage/bloom/v1/builder_test.go +++ b/pkg/storage/bloom/v1/builder_test.go @@ -10,8 +10,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/util/encoding" ) var blockEncodings = []chunkenc.Encoding{ diff --git a/pkg/storage/bloom/v1/fuse_test.go b/pkg/storage/bloom/v1/fuse_test.go index 5c9f2f06f047..f1cd77d9ebd4 100644 --- a/pkg/storage/bloom/v1/fuse_test.go +++ b/pkg/storage/bloom/v1/fuse_test.go @@ -10,7 +10,7 @@ import ( "github.com/grafana/dskit/concurrency" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/chunkenc" ) func keysToBloomTest(keys [][]byte) BloomTest { diff --git a/pkg/storage/bloom/v1/index.go b/pkg/storage/bloom/v1/index.go index c69b4eb292be..ff9ecaffbac3 100644 --- a/pkg/storage/bloom/v1/index.go +++ b/pkg/storage/bloom/v1/index.go @@ -9,9 +9,9 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util/encoding" ) type Schema struct { diff --git a/pkg/storage/bloom/v1/index_test.go b/pkg/storage/bloom/v1/index_test.go index 477d266af7a7..eb61b1e2a2ab 100644 --- a/pkg/storage/bloom/v1/index_test.go +++ b/pkg/storage/bloom/v1/index_test.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/util/encoding" ) func TestBloomOffsetEncoding(t *testing.T) { diff --git a/pkg/storage/bloom/v1/metrics.go b/pkg/storage/bloom/v1/metrics.go index c2204bf27550..c45b2235dccd 100644 --- a/pkg/storage/bloom/v1/metrics.go +++ b/pkg/storage/bloom/v1/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type Metrics struct { diff --git a/pkg/storage/bloom/v1/test_util.go b/pkg/storage/bloom/v1/test_util.go index ed1dd5cc978c..d3ac7e427ec5 100644 --- a/pkg/storage/bloom/v1/test_util.go +++ b/pkg/storage/bloom/v1/test_util.go @@ -9,8 +9,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" ) // TODO(owen-d): this should probably be in it's own testing-util package diff --git a/pkg/storage/bucket/azure/config.go b/pkg/storage/bucket/azure/config.go index 18d0f74fc3e8..928503190d93 100644 --- a/pkg/storage/bucket/azure/config.go +++ b/pkg/storage/bucket/azure/config.go @@ -5,7 +5,7 @@ import ( "github.com/grafana/dskit/flagext" - "github.com/grafana/loki/pkg/storage/bucket/http" + "github.com/grafana/loki/v3/pkg/storage/bucket/http" ) // Config holds the config options for an Azure backend diff --git a/pkg/storage/bucket/azure/config_test.go b/pkg/storage/bucket/azure/config_test.go index 7d3c6d9f326d..756ae298b65c 100644 --- a/pkg/storage/bucket/azure/config_test.go +++ b/pkg/storage/bucket/azure/config_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" yaml "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/storage/bucket/http" + "github.com/grafana/loki/v3/pkg/storage/bucket/http" ) // defaultConfig should match the default flag values defined in RegisterFlagsWithPrefix. diff --git a/pkg/storage/bucket/client.go b/pkg/storage/bucket/client.go index 57751afe3654..4f81ce7b2934 100644 --- a/pkg/storage/bucket/client.go +++ b/pkg/storage/bucket/client.go @@ -12,12 +12,12 @@ import ( "github.com/thanos-io/objstore" opentracing "github.com/thanos-io/objstore/tracing/opentracing" - "github.com/grafana/loki/pkg/storage/bucket/azure" - "github.com/grafana/loki/pkg/storage/bucket/filesystem" - "github.com/grafana/loki/pkg/storage/bucket/gcs" - "github.com/grafana/loki/pkg/storage/bucket/s3" - "github.com/grafana/loki/pkg/storage/bucket/swift" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/storage/bucket/azure" + "github.com/grafana/loki/v3/pkg/storage/bucket/filesystem" + "github.com/grafana/loki/v3/pkg/storage/bucket/gcs" + "github.com/grafana/loki/v3/pkg/storage/bucket/s3" + "github.com/grafana/loki/v3/pkg/storage/bucket/swift" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/pkg/storage/bucket/client_test.go b/pkg/storage/bucket/client_test.go index 7d4bee7c9e15..489f7d2f1f26 100644 --- a/pkg/storage/bucket/client_test.go +++ b/pkg/storage/bucket/client_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" yaml "gopkg.in/yaml.v2" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/bucket/s3/config.go b/pkg/storage/bucket/s3/config.go index 791ef7d75865..b01eb1444a74 100644 --- a/pkg/storage/bucket/s3/config.go +++ b/pkg/storage/bucket/s3/config.go @@ -12,9 +12,9 @@ import ( "github.com/pkg/errors" "github.com/thanos-io/objstore/providers/s3" - bucket_http "github.com/grafana/loki/pkg/storage/bucket/http" - "github.com/grafana/loki/pkg/storage/common/aws" - "github.com/grafana/loki/pkg/util" + bucket_http "github.com/grafana/loki/v3/pkg/storage/bucket/http" + "github.com/grafana/loki/v3/pkg/storage/common/aws" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/pkg/storage/bucket/s3/config_test.go b/pkg/storage/bucket/s3/config_test.go index 5e6b9f9545a2..a6ae54f586ee 100644 --- a/pkg/storage/bucket/s3/config_test.go +++ b/pkg/storage/bucket/s3/config_test.go @@ -13,8 +13,8 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - bucket_http "github.com/grafana/loki/pkg/storage/bucket/http" - "github.com/grafana/loki/pkg/storage/common/aws" + bucket_http "github.com/grafana/loki/v3/pkg/storage/bucket/http" + "github.com/grafana/loki/v3/pkg/storage/common/aws" ) // defaultConfig should match the default flag values defined in RegisterFlagsWithPrefix. diff --git a/pkg/storage/bucket/sse_bucket_client.go b/pkg/storage/bucket/sse_bucket_client.go index 51cc68a86673..426522cfcfd1 100644 --- a/pkg/storage/bucket/sse_bucket_client.go +++ b/pkg/storage/bucket/sse_bucket_client.go @@ -9,7 +9,7 @@ import ( "github.com/thanos-io/objstore" thanos_s3 "github.com/thanos-io/objstore/providers/s3" - "github.com/grafana/loki/pkg/storage/bucket/s3" + "github.com/grafana/loki/v3/pkg/storage/bucket/s3" ) // TenantConfigProvider defines a per-tenant config provider. diff --git a/pkg/storage/bucket/sse_bucket_client_test.go b/pkg/storage/bucket/sse_bucket_client_test.go index e347ad039bc1..697e8837a2f3 100644 --- a/pkg/storage/bucket/sse_bucket_client_test.go +++ b/pkg/storage/bucket/sse_bucket_client_test.go @@ -14,7 +14,7 @@ import ( "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/grafana/loki/pkg/storage/bucket/s3" + "github.com/grafana/loki/v3/pkg/storage/bucket/s3" ) func TestSSEBucketClient_Upload_ShouldInjectCustomSSEConfig(t *testing.T) { diff --git a/pkg/storage/chunk/cache/background.go b/pkg/storage/chunk/cache/background.go index 92995cf08d90..859bdf96f916 100644 --- a/pkg/storage/chunk/cache/background.go +++ b/pkg/storage/chunk/cache/background.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/flagext" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/flagext" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // BackgroundConfig is config for a Background Cache. diff --git a/pkg/storage/chunk/cache/background_test.go b/pkg/storage/chunk/cache/background_test.go index a71830195760..38963d4b0249 100644 --- a/pkg/storage/chunk/cache/background_test.go +++ b/pkg/storage/chunk/cache/background_test.go @@ -8,9 +8,9 @@ import ( "github.com/dustin/go-humanize" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/flagext" ) func TestBackground(t *testing.T) { diff --git a/pkg/storage/chunk/cache/cache.go b/pkg/storage/chunk/cache/cache.go index 870d7c19e5c7..6e1565fcaa3e 100644 --- a/pkg/storage/chunk/cache/cache.go +++ b/pkg/storage/chunk/cache/cache.go @@ -11,7 +11,7 @@ import ( "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) // Cache byte arrays by key. diff --git a/pkg/storage/chunk/cache/cache_gen.go b/pkg/storage/chunk/cache/cache_gen.go index 689e165e75d0..1e1bcf18062b 100644 --- a/pkg/storage/chunk/cache/cache_gen.go +++ b/pkg/storage/chunk/cache/cache_gen.go @@ -3,7 +3,7 @@ package cache import ( "context" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) type contextKey int diff --git a/pkg/storage/chunk/cache/cache_test.go b/pkg/storage/chunk/cache/cache_test.go index e65339066ad4..5595b2df0a6c 100644 --- a/pkg/storage/chunk/cache/cache_test.go +++ b/pkg/storage/chunk/cache/cache_test.go @@ -14,12 +14,12 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" ) const userID = "1" diff --git a/pkg/storage/chunk/cache/embeddedcache.go b/pkg/storage/chunk/cache/embeddedcache.go index 46eb204125b0..899628315857 100644 --- a/pkg/storage/chunk/cache/embeddedcache.go +++ b/pkg/storage/chunk/cache/embeddedcache.go @@ -13,8 +13,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/storage/chunk/cache/instrumented.go b/pkg/storage/chunk/cache/instrumented.go index c1f515debf68..81c56c7512e4 100644 --- a/pkg/storage/chunk/cache/instrumented.go +++ b/pkg/storage/chunk/cache/instrumented.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) // Instrument returns an instrumented cache. diff --git a/pkg/storage/chunk/cache/memcached.go b/pkg/storage/chunk/cache/memcached.go index 9b6150839cd2..ca8e2e2f92da 100644 --- a/pkg/storage/chunk/cache/memcached.go +++ b/pkg/storage/chunk/cache/memcached.go @@ -14,9 +14,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/math" ) // MemcachedConfig is config to make a Memcached diff --git a/pkg/storage/chunk/cache/memcached_client.go b/pkg/storage/chunk/cache/memcached_client.go index f2dc35bbe08f..d6df538342fa 100644 --- a/pkg/storage/chunk/cache/memcached_client.go +++ b/pkg/storage/chunk/cache/memcached_client.go @@ -21,7 +21,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/sony/gobreaker" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) // MemcachedClient interface exists for mocking memcacheClient. diff --git a/pkg/storage/chunk/cache/memcached_client_selector.go b/pkg/storage/chunk/cache/memcached_client_selector.go index c9604ce36a2a..8c8d49e2ba3a 100644 --- a/pkg/storage/chunk/cache/memcached_client_selector.go +++ b/pkg/storage/chunk/cache/memcached_client_selector.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/gomemcache/memcache" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // MemcachedJumpHashSelector implements the memcache.ServerSelector diff --git a/pkg/storage/chunk/cache/memcached_client_selector_test.go b/pkg/storage/chunk/cache/memcached_client_selector_test.go index 2a3f28709549..cec908876b1b 100644 --- a/pkg/storage/chunk/cache/memcached_client_selector_test.go +++ b/pkg/storage/chunk/cache/memcached_client_selector_test.go @@ -9,7 +9,7 @@ import ( "github.com/grafana/gomemcache/memcache" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" ) func TestNatSort(t *testing.T) { diff --git a/pkg/storage/chunk/cache/memcached_test.go b/pkg/storage/chunk/cache/memcached_test.go index 4082c331a10e..e79a0f913093 100644 --- a/pkg/storage/chunk/cache/memcached_test.go +++ b/pkg/storage/chunk/cache/memcached_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" ) func TestMemcached_fetchKeysBatched(t *testing.T) { diff --git a/pkg/storage/chunk/cache/mock.go b/pkg/storage/chunk/cache/mock.go index 55db7f32a555..1b0f60da3dec 100644 --- a/pkg/storage/chunk/cache/mock.go +++ b/pkg/storage/chunk/cache/mock.go @@ -4,7 +4,7 @@ import ( "context" "sync" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) type MockCache interface { diff --git a/pkg/storage/chunk/cache/redis_cache.go b/pkg/storage/chunk/cache/redis_cache.go index 5a4f9f73b87a..f167b6c4ae22 100644 --- a/pkg/storage/chunk/cache/redis_cache.go +++ b/pkg/storage/chunk/cache/redis_cache.go @@ -7,8 +7,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/loki/pkg/logqlmodel/stats" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // RedisCache type caches chunks in redis diff --git a/pkg/storage/chunk/cache/resultscache/cache.go b/pkg/storage/chunk/cache/resultscache/cache.go index 3ea3e727b502..549e0b72983c 100644 --- a/pkg/storage/chunk/cache/resultscache/cache.go +++ b/pkg/storage/chunk/cache/resultscache/cache.go @@ -19,11 +19,11 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util/math" - "github.com/grafana/loki/pkg/util/spanlogger" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util/math" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/util/validation" ) // ConstSplitter is a utility for using a constant split interval when determining cache keys diff --git a/pkg/storage/chunk/cache/resultscache/cache_test.go b/pkg/storage/chunk/cache/resultscache/cache_test.go index cff371097a68..964a310f5951 100644 --- a/pkg/storage/chunk/cache/resultscache/cache_test.go +++ b/pkg/storage/chunk/cache/resultscache/cache_test.go @@ -14,9 +14,9 @@ import ( "github.com/stretchr/testify/require" "golang.org/x/exp/slices" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util/constants" ) const day = 24 * time.Hour diff --git a/pkg/storage/chunk/cache/resultscache/config.go b/pkg/storage/chunk/cache/resultscache/config.go index 5a329168e837..93c032a91ef6 100644 --- a/pkg/storage/chunk/cache/resultscache/config.go +++ b/pkg/storage/chunk/cache/resultscache/config.go @@ -7,7 +7,7 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" ) // Config is the config for the results cache. diff --git a/pkg/storage/chunk/cache/resultscache/test_types.pb.go b/pkg/storage/chunk/cache/resultscache/test_types.pb.go index 7d3a54864e3d..b53ce50a1602 100644 --- a/pkg/storage/chunk/cache/resultscache/test_types.pb.go +++ b/pkg/storage/chunk/cache/resultscache/test_types.pb.go @@ -278,36 +278,37 @@ func init() { } var fileDescriptor_5b2c489557407809 = []byte{ - // 462 bytes of a gzipped FileDescriptorProto + // 465 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x3f, 0x6f, 0x13, 0x31, - 0x14, 0x3f, 0xe7, 0xd2, 0x94, 0x3a, 0x51, 0x07, 0xab, 0xc3, 0x29, 0x42, 0x4e, 0xc8, 0x94, 0xe9, - 0x2c, 0x95, 0x3f, 0x43, 0xc5, 0x14, 0xc4, 0x82, 0xa8, 0x40, 0x86, 0x89, 0xa5, 0x72, 0x0e, 0xd7, - 0x39, 0xe5, 0xee, 0xec, 0xde, 0xf3, 0x21, 0xba, 0xb1, 0xb3, 0xf4, 0x63, 0xf0, 0x51, 0x3a, 0x66, - 0xec, 0x04, 0xe4, 0xb2, 0x30, 0xf6, 0x23, 0x20, 0xfb, 0x92, 0x36, 0xa5, 0x0b, 0xdd, 0xde, 0xf3, - 0xfb, 0xfd, 0xb1, 0x7e, 0xef, 0xe1, 0xe7, 0x66, 0xae, 0x18, 0x58, 0x5d, 0x0a, 0x25, 0x59, 0x32, - 0xab, 0x8a, 0x39, 0x4b, 0x44, 0x32, 0x93, 0xac, 0x94, 0x50, 0x65, 0x16, 0x9a, 0xc6, 0x4a, 0xb0, - 0x27, 0xf6, 0xdc, 0x48, 0x88, 0x4d, 0xa9, 0xad, 0x26, 0xbd, 0xed, 0x71, 0xff, 0x40, 0x69, 0xa5, - 0xfd, 0x80, 0xb9, 0xaa, 0xc1, 0xf4, 0x07, 0x4a, 0x6b, 0x95, 0x49, 0xe6, 0xbb, 0x69, 0x75, 0xca, - 0x6c, 0x9a, 0x4b, 0xb0, 0x22, 0x37, 0x6b, 0x40, 0x77, 0x4b, 0x71, 0xf4, 0xbd, 0x85, 0xbb, 0xc7, - 0x3a, 0x99, 0x73, 0x79, 0x56, 0x49, 0xb0, 0x84, 0xe0, 0xb6, 0x11, 0x76, 0x16, 0xa1, 0x21, 0x1a, - 0xef, 0x71, 0x5f, 0x93, 0x23, 0xbc, 0x03, 0x56, 0x94, 0x36, 0x6a, 0x0d, 0xd1, 0xb8, 0x7b, 0xd8, - 0x8f, 0x1b, 0x87, 0x78, 0xe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xca, 0xc5, 0x92, 0x06, 0x57, - 0x4b, 0x1a, 0x5c, 0x2f, 0x29, 0xfa, 0x56, 0x53, 0xf4, 0xa3, 0xa6, 0xe8, 0xb2, 0xa6, 0x68, 0x51, - 0x53, 0xf4, 0xbb, 0xa6, 0xe8, 0x4f, 0x4d, 0x83, 0xeb, 0x9a, 0xa2, 0x8b, 0x15, 0x0d, 0x16, 0x2b, - 0x1a, 0x5c, 0xad, 0x68, 0xf0, 0xe9, 0xa5, 0x4a, 0xed, 0xac, 0x9a, 0xc6, 0x89, 0xce, 0x99, 0x2a, - 0xc5, 0xa9, 0x28, 0x04, 0xcb, 0xf4, 0x3c, 0x65, 0xff, 0x73, 0xe1, 0xd3, 0x8e, 0xbf, 0x84, 0xa7, - 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x20, 0x73, 0x6a, 0xfb, 0x10, 0x03, 0x00, 0x00, + 0x14, 0x3f, 0xe7, 0xd2, 0x94, 0x3a, 0x51, 0x07, 0xab, 0x83, 0x15, 0x21, 0x27, 0x64, 0xca, 0x74, + 0x96, 0x5a, 0x60, 0xe8, 0x82, 0x14, 0xc4, 0x82, 0xa8, 0x40, 0x86, 0x89, 0xa5, 0x72, 0x0e, 0xd7, + 0x39, 0xe5, 0xee, 0xec, 0x9e, 0x7d, 0x15, 0xdd, 0xd8, 0x59, 0xfa, 0x31, 0xf8, 0x28, 0x1d, 0x33, + 0x76, 0x02, 0x72, 0x59, 0x18, 0xfb, 0x11, 0x90, 0x7d, 0xb9, 0x36, 0x25, 0x0b, 0xdd, 0xde, 0xf3, + 0xfb, 0xfd, 0xb1, 0x7e, 0xef, 0xc1, 0x17, 0x7a, 0x2e, 0xa9, 0xb1, 0xaa, 0xe0, 0x52, 0xd0, 0x78, + 0x56, 0xe6, 0x73, 0x1a, 0xf3, 0x78, 0x26, 0x68, 0x21, 0x4c, 0x99, 0x5a, 0x53, 0x37, 0x56, 0x18, + 0x7b, 0x6a, 0x2f, 0xb5, 0x30, 0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x3a, 0xec, 0x3b, 0x3f, 0xff, + 0xc0, 0x93, 0x82, 0xad, 0xb1, 0xe8, 0x10, 0xee, 0x1a, 0x9e, 0xe9, 0x54, 0x18, 0xdc, 0xf2, 0x34, + 0xbc, 0x4d, 0xfb, 0xe8, 0x01, 0xac, 0x01, 0x8e, 0x8e, 0xe1, 0xfe, 0x43, 0x35, 0x97, 0x40, 0xce, + 0x33, 0xd1, 0x6c, 0xc2, 0xd5, 0x2e, 0x81, 0x0b, 0x9e, 0x96, 0xc2, 0x6f, 0x62, 0x8f, 0xd5, 0xcd, + 0xe8, 0x0d, 0x84, 0xf7, 0x92, 0xf7, 0x18, 0x47, 0x04, 0x6b, 0x0c, 0x7a, 0x06, 0x7b, 0x77, 0x77, + 0x70, 0x9a, 0x19, 0x2f, 0x10, 0xb2, 0xee, 0xdd, 0xdb, 0x89, 0x99, 0x94, 0x8b, 0x25, 0x09, 0x6e, + 0x96, 0x24, 0xb8, 0x5d, 0x12, 0xf0, 0xad, 0x22, 0xe0, 0x47, 0x45, 0xc0, 0x75, 0x45, 0xc0, 0xa2, + 0x22, 0xe0, 0x77, 0x45, 0xc0, 0x9f, 0x8a, 0x04, 0xb7, 0x15, 0x01, 0x57, 0x2b, 0x12, 0x2c, 0x56, + 0x24, 0xb8, 0x59, 0x91, 0xe0, 0xf3, 0x2b, 0x99, 0xd8, 0x59, 0x39, 0x8d, 0x62, 0x95, 0x51, 0x59, + 0xf0, 0x33, 0x9e, 0x73, 0x9a, 0xaa, 0x79, 0x42, 0x2f, 0x8e, 0xe8, 0xff, 0x1c, 0xf9, 0xb4, 0xe3, + 0x8f, 0xe1, 0xe8, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x51, 0xf5, 0xc5, 0x0d, 0x13, 0x03, 0x00, + 0x00, } func (this *MockRequest) Equal(that interface{}) bool { diff --git a/pkg/storage/chunk/cache/resultscache/test_types.proto b/pkg/storage/chunk/cache/resultscache/test_types.proto index 920db66314de..bd313a9b85a0 100644 --- a/pkg/storage/chunk/cache/resultscache/test_types.proto +++ b/pkg/storage/chunk/cache/resultscache/test_types.proto @@ -6,7 +6,7 @@ import "gogoproto/gogo.proto"; import "google/protobuf/timestamp.proto"; import "types.proto"; -option go_package = "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache"; +option go_package = "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/pkg/storage/chunk/cache/resultscache/types.pb.go b/pkg/storage/chunk/cache/resultscache/types.pb.go index 7c63abdda4bf..6459262f4684 100644 --- a/pkg/storage/chunk/cache/resultscache/types.pb.go +++ b/pkg/storage/chunk/cache/resultscache/types.pb.go @@ -200,33 +200,33 @@ func init() { } var fileDescriptor_6b13efd4ce8649ef = []byte{ - // 404 bytes of a gzipped FileDescriptorProto + // 406 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xb1, 0x6e, 0xd4, 0x30, - 0x18, 0xc7, 0xe3, 0xde, 0x5d, 0x2f, 0x35, 0x15, 0xa0, 0xa8, 0x43, 0x7a, 0x83, 0x73, 0xba, 0xa9, - 0x03, 0xc4, 0x08, 0x56, 0x04, 0x22, 0x88, 0x01, 0x16, 0x24, 0x8f, 0x2c, 0xc8, 0x49, 0x5c, 0x27, - 0x4a, 0xb0, 0x23, 0xdb, 0x91, 0xc8, 0xc6, 0x23, 0xf0, 0x18, 0x0c, 0x3c, 0x48, 0xc7, 0x1b, 0x3b, - 0x45, 0x5c, 0x6e, 0x41, 0x99, 0xfa, 0x08, 0x28, 0x36, 0x77, 0xea, 0xd8, 0xe5, 0xf3, 0xf7, 0xff, - 0xfe, 0x7f, 0xc9, 0x3f, 0x7f, 0x32, 0x7c, 0xd1, 0x54, 0x1c, 0x6b, 0x23, 0x15, 0xe5, 0x0c, 0x67, - 0x45, 0x2b, 0x2a, 0x9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x89, 0xb1, 0x0d, 0x07, 0x13, 0x19, 0x99, 0x8a, 0x17, 0x42, 0x57, 0x37, 0x34, 0x65, + 0x5f, 0x8a, 0xcc, 0x9f, 0x1b, 0xce, 0xc5, 0xd8, 0x07, 0xe0, 0x25, 0x59, 0x9a, 0xf1, 0x87, 0xcc, + 0x7b, 0x03, 0xdd, 0xe6, 0xff, 0x83, 0xfc, 0x45, 0x08, 0x0c, 0xaa, 0x5d, 0x59, 0xb4, 0x5f, 0x59, + 0xf4, 0x56, 0x74, 0xf1, 0xf9, 0xd8, 0x07, 0x87, 0x24, 0x39, 0x74, 0x1f, 0xe7, 0xee, 0xec, 0xf9, + 0x3c, 0x6e, 0x37, 0x5b, 0xe4, 0xdc, 0x6f, 0x91, 0xf3, 0xb0, 0x45, 0xe0, 0xc7, 0x80, 0xc0, 0xaf, + 0x01, 0x81, 0xbb, 0x01, 0x81, 0xcd, 0x80, 0xc0, 0x9f, 0x01, 0x81, 0xbf, 0x03, 0x72, 0x1e, 0x06, + 0x04, 0x7e, 0xee, 0x90, 0xb3, 0xd9, 0x21, 0xe7, 0x7e, 0x87, 0x9c, 0xcf, 0x37, 0xbc, 0xd0, 0x79, + 0x9b, 0x44, 0xa9, 0xfc, 0x8a, 0x79, 0x43, 0x6f, 0xa9, 0xa0, 0xb8, 0x92, 0x65, 0x81, 0xbf, 0x5d, + 0xe3, 0xc7, 0x7c, 0x86, 0xe4, 0xd4, 0x20, 0x5e, 0xff, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x94, 0x7b, + 0xf9, 0x0a, 0x3b, 0x02, 0x00, 0x00, } func (this *CachingOptions) Equal(that interface{}) bool { diff --git a/pkg/storage/chunk/cache/resultscache/types.proto b/pkg/storage/chunk/cache/resultscache/types.proto index 835950a0581e..33c78831a03e 100644 --- a/pkg/storage/chunk/cache/resultscache/types.proto +++ b/pkg/storage/chunk/cache/resultscache/types.proto @@ -5,7 +5,7 @@ package resultscache; import "gogoproto/gogo.proto"; import "google/protobuf/any.proto"; -option go_package = "github.com/grafana/loki/pkg/storage/chunk/cache/resultscache"; +option go_package = "github.com/grafana/loki/v3/pkg/storage/chunk/cache/resultscache"; option (gogoproto.marshaler_all) = true; option (gogoproto.unmarshaler_all) = true; diff --git a/pkg/storage/chunk/cache/snappy.go b/pkg/storage/chunk/cache/snappy.go index 000827d1bcff..8f05efc5b1f3 100644 --- a/pkg/storage/chunk/cache/snappy.go +++ b/pkg/storage/chunk/cache/snappy.go @@ -7,7 +7,7 @@ import ( "github.com/go-kit/log/level" "github.com/golang/snappy" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) type snappyCache struct { diff --git a/pkg/storage/chunk/cache/stats.go b/pkg/storage/chunk/cache/stats.go index 3bdf0b017ef3..3ce127e9e8b1 100644 --- a/pkg/storage/chunk/cache/stats.go +++ b/pkg/storage/chunk/cache/stats.go @@ -4,7 +4,7 @@ import ( "context" "time" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) type statsCollector struct { diff --git a/pkg/storage/chunk/cache/tiered.go b/pkg/storage/chunk/cache/tiered.go index 5ff128d34d34..b6cdef38261f 100644 --- a/pkg/storage/chunk/cache/tiered.go +++ b/pkg/storage/chunk/cache/tiered.go @@ -3,7 +3,7 @@ package cache import ( "context" - "github.com/grafana/loki/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" ) type tiered []Cache diff --git a/pkg/storage/chunk/cache/tiered_test.go b/pkg/storage/chunk/cache/tiered_test.go index e024fe9ab096..662e57a51b61 100644 --- a/pkg/storage/chunk/cache/tiered_test.go +++ b/pkg/storage/chunk/cache/tiered_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" ) func TestTieredSimple(t *testing.T) { diff --git a/pkg/storage/chunk/chunk.go b/pkg/storage/chunk/chunk.go index d316553d72fa..e807b5fb8779 100644 --- a/pkg/storage/chunk/chunk.go +++ b/pkg/storage/chunk/chunk.go @@ -18,7 +18,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) var ( diff --git a/pkg/storage/chunk/chunk_test.go b/pkg/storage/chunk/chunk_test.go index f3f9a6f78eef..aa7334a67f70 100644 --- a/pkg/storage/chunk/chunk_test.go +++ b/pkg/storage/chunk/chunk_test.go @@ -10,8 +10,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" ) const userID = "userID" diff --git a/pkg/storage/chunk/client/alibaba/oss_object_client.go b/pkg/storage/chunk/client/alibaba/oss_object_client.go index b14b4d5a0c8e..3e7674467ae3 100644 --- a/pkg/storage/chunk/client/alibaba/oss_object_client.go +++ b/pkg/storage/chunk/client/alibaba/oss_object_client.go @@ -12,8 +12,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/util/constants" ) const NoSuchKeyErr = "NoSuchKey" diff --git a/pkg/storage/chunk/client/aws/dynamodb_index_reader.go b/pkg/storage/chunk/client/aws/dynamodb_index_reader.go index 0498655f1592..4b1c4cd8a9e2 100644 --- a/pkg/storage/chunk/client/aws/dynamodb_index_reader.go +++ b/pkg/storage/chunk/client/aws/dynamodb_index_reader.go @@ -17,8 +17,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) type dynamodbIndexReader struct { diff --git a/pkg/storage/chunk/client/aws/dynamodb_metrics.go b/pkg/storage/chunk/client/aws/dynamodb_metrics.go index f1fedfb20bff..9d19f0a77ff5 100644 --- a/pkg/storage/chunk/client/aws/dynamodb_metrics.go +++ b/pkg/storage/chunk/client/aws/dynamodb_metrics.go @@ -5,7 +5,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type dynamoDBMetrics struct { diff --git a/pkg/storage/chunk/client/aws/dynamodb_storage_client.go b/pkg/storage/chunk/client/aws/dynamodb_storage_client.go index c48bf518cc23..87fd24e127db 100644 --- a/pkg/storage/chunk/client/aws/dynamodb_storage_client.go +++ b/pkg/storage/chunk/client/aws/dynamodb_storage_client.go @@ -28,15 +28,15 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/time/rate" - "github.com/grafana/loki/pkg/storage/chunk" - chunkclient "github.com/grafana/loki/pkg/storage/chunk/client" - client_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/math" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/storage/chunk" + chunkclient "github.com/grafana/loki/v3/pkg/storage/chunk/client" + client_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/math" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/storage/chunk/client/aws/dynamodb_storage_client_test.go b/pkg/storage/chunk/client/aws/dynamodb_storage_client_test.go index 6c77f56d78bc..6a4cb1238c5f 100644 --- a/pkg/storage/chunk/client/aws/dynamodb_storage_client_test.go +++ b/pkg/storage/chunk/client/aws/dynamodb_storage_client_test.go @@ -9,8 +9,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" ) const ( diff --git a/pkg/storage/chunk/client/aws/dynamodb_table_client.go b/pkg/storage/chunk/client/aws/dynamodb_table_client.go index 330624a098ce..f4d9a1f7c1cd 100644 --- a/pkg/storage/chunk/client/aws/dynamodb_table_client.go +++ b/pkg/storage/chunk/client/aws/dynamodb_table_client.go @@ -15,9 +15,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/time/rate" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/util/log" ) // Pluggable auto-scaler implementation diff --git a/pkg/storage/chunk/client/aws/fixtures.go b/pkg/storage/chunk/client/aws/fixtures.go index d8cc8642a8d9..b2ab65497b45 100644 --- a/pkg/storage/chunk/client/aws/fixtures.go +++ b/pkg/storage/chunk/client/aws/fixtures.go @@ -8,10 +8,10 @@ import ( "github.com/grafana/dskit/backoff" "golang.org/x/time/rate" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) type fixture struct { diff --git a/pkg/storage/chunk/client/aws/metrics_autoscaling.go b/pkg/storage/chunk/client/aws/metrics_autoscaling.go index 7aee4df91a47..a55be707bd51 100644 --- a/pkg/storage/chunk/client/aws/metrics_autoscaling.go +++ b/pkg/storage/chunk/client/aws/metrics_autoscaling.go @@ -13,8 +13,8 @@ import ( promV1 "github.com/prometheus/client_golang/api/prometheus/v1" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/config" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/config" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/chunk/client/aws/metrics_autoscaling_test.go b/pkg/storage/chunk/client/aws/metrics_autoscaling_test.go index 6ea2fd90044b..5e4d1a46a7b2 100644 --- a/pkg/storage/chunk/client/aws/metrics_autoscaling_test.go +++ b/pkg/storage/chunk/client/aws/metrics_autoscaling_test.go @@ -13,8 +13,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) const ( diff --git a/pkg/storage/chunk/client/aws/mock.go b/pkg/storage/chunk/client/aws/mock.go index 2dec6c94addb..b2c6ac855668 100644 --- a/pkg/storage/chunk/client/aws/mock.go +++ b/pkg/storage/chunk/client/aws/mock.go @@ -18,7 +18,7 @@ import ( "github.com/aws/aws-sdk-go/service/s3/s3iface" "github.com/go-kit/log/level" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const arnPrefix = "arn:" diff --git a/pkg/storage/chunk/client/aws/s3_storage_client.go b/pkg/storage/chunk/client/aws/s3_storage_client.go index 0c2136801f81..bae0fce22df7 100644 --- a/pkg/storage/chunk/client/aws/s3_storage_client.go +++ b/pkg/storage/chunk/client/aws/s3_storage_client.go @@ -27,13 +27,13 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - bucket_s3 "github.com/grafana/loki/pkg/storage/bucket/s3" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - storageawscommon "github.com/grafana/loki/pkg/storage/common/aws" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - loki_instrument "github.com/grafana/loki/pkg/util/instrument" + bucket_s3 "github.com/grafana/loki/v3/pkg/storage/bucket/s3" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + storageawscommon "github.com/grafana/loki/v3/pkg/storage/common/aws" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + loki_instrument "github.com/grafana/loki/v3/pkg/util/instrument" ) const ( diff --git a/pkg/storage/chunk/client/aws/s3_storage_client_test.go b/pkg/storage/chunk/client/aws/s3_storage_client_test.go index 769f8cf00665..db9ba83c6183 100644 --- a/pkg/storage/chunk/client/aws/s3_storage_client_test.go +++ b/pkg/storage/chunk/client/aws/s3_storage_client_test.go @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/request" diff --git a/pkg/storage/chunk/client/aws/sse_config.go b/pkg/storage/chunk/client/aws/sse_config.go index 2ff3c4b4b799..f39385cbe015 100644 --- a/pkg/storage/chunk/client/aws/sse_config.go +++ b/pkg/storage/chunk/client/aws/sse_config.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" - bucket_s3 "github.com/grafana/loki/pkg/storage/bucket/s3" + bucket_s3 "github.com/grafana/loki/v3/pkg/storage/bucket/s3" ) const ( diff --git a/pkg/storage/chunk/client/aws/sse_config_test.go b/pkg/storage/chunk/client/aws/sse_config_test.go index b7c9aea6212f..6f56f93b0d93 100644 --- a/pkg/storage/chunk/client/aws/sse_config_test.go +++ b/pkg/storage/chunk/client/aws/sse_config_test.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/assert" - s3 "github.com/grafana/loki/pkg/storage/bucket/s3" + s3 "github.com/grafana/loki/v3/pkg/storage/bucket/s3" ) func TestNewSSEParsedConfig(t *testing.T) { diff --git a/pkg/storage/chunk/client/azure/blob_storage_client.go b/pkg/storage/chunk/client/azure/blob_storage_client.go index 0126c048e9b3..7c5f5bb496ca 100644 --- a/pkg/storage/chunk/client/azure/blob_storage_client.go +++ b/pkg/storage/chunk/client/azure/blob_storage_client.go @@ -25,13 +25,13 @@ import ( "github.com/mattn/go-ieproxy" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - client_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - loki_instrument "github.com/grafana/loki/pkg/util/instrument" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + client_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + loki_instrument "github.com/grafana/loki/v3/pkg/util/instrument" + "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/chunk/client/azure/blob_storage_client_test.go b/pkg/storage/chunk/client/azure/blob_storage_client_test.go index 2cff02212841..2f59934aabf2 100644 --- a/pkg/storage/chunk/client/azure/blob_storage_client_test.go +++ b/pkg/storage/chunk/client/azure/blob_storage_client_test.go @@ -17,7 +17,7 @@ import ( "github.com/stretchr/testify/suite" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" ) var metrics = NewBlobStorageMetrics() diff --git a/pkg/storage/chunk/client/baidubce/bos_storage_client.go b/pkg/storage/chunk/client/baidubce/bos_storage_client.go index 7b3fe633d66b..30a9e97f4955 100644 --- a/pkg/storage/chunk/client/baidubce/bos_storage_client.go +++ b/pkg/storage/chunk/client/baidubce/bos_storage_client.go @@ -14,8 +14,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/util/constants" ) // NoSuchKeyErr The resource you requested does not exist. diff --git a/pkg/storage/chunk/client/cassandra/fixtures.go b/pkg/storage/chunk/client/cassandra/fixtures.go index f1ddb1de65f4..e837dba110a3 100644 --- a/pkg/storage/chunk/client/cassandra/fixtures.go +++ b/pkg/storage/chunk/client/cassandra/fixtures.go @@ -7,10 +7,10 @@ import ( "github.com/grafana/dskit/flagext" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) // GOCQL doesn't provide nice mocks, so we use a real Cassandra instance. diff --git a/pkg/storage/chunk/client/cassandra/instrumentation.go b/pkg/storage/chunk/client/cassandra/instrumentation.go index 31db2b1f542b..756f18065b57 100644 --- a/pkg/storage/chunk/client/cassandra/instrumentation.go +++ b/pkg/storage/chunk/client/cassandra/instrumentation.go @@ -7,7 +7,7 @@ import ( "github.com/gocql/gocql" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) var requestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{ diff --git a/pkg/storage/chunk/client/cassandra/storage_client.go b/pkg/storage/chunk/client/cassandra/storage_client.go index e58de9b19e69..d847f9d6b7e2 100644 --- a/pkg/storage/chunk/client/cassandra/storage_client.go +++ b/pkg/storage/chunk/client/cassandra/storage_client.go @@ -19,11 +19,11 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/sync/semaphore" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // Config for a StorageClient diff --git a/pkg/storage/chunk/client/cassandra/table_client.go b/pkg/storage/chunk/client/cassandra/table_client.go index fe8d7549d746..f46b886b3d61 100644 --- a/pkg/storage/chunk/client/cassandra/table_client.go +++ b/pkg/storage/chunk/client/cassandra/table_client.go @@ -9,8 +9,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) type tableClient struct { diff --git a/pkg/storage/chunk/client/client.go b/pkg/storage/chunk/client/client.go index 76efb022f73e..36b65d40b6c2 100644 --- a/pkg/storage/chunk/client/client.go +++ b/pkg/storage/chunk/client/client.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) var ( diff --git a/pkg/storage/chunk/client/congestion/config.go b/pkg/storage/chunk/client/congestion/config.go index 47d86646ad25..61211d6487cc 100644 --- a/pkg/storage/chunk/client/congestion/config.go +++ b/pkg/storage/chunk/client/congestion/config.go @@ -4,7 +4,7 @@ import ( "flag" "fmt" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" ) type Config struct { diff --git a/pkg/storage/chunk/client/congestion/controller.go b/pkg/storage/chunk/client/congestion/controller.go index f1f69a29621e..e7f29fab4763 100644 --- a/pkg/storage/chunk/client/congestion/controller.go +++ b/pkg/storage/chunk/client/congestion/controller.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" "golang.org/x/time/rate" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" ) // AIMDController implements the Additive-Increase/Multiplicative-Decrease algorithm which is used in TCP congestion avoidance. diff --git a/pkg/storage/chunk/client/congestion/controller_test.go b/pkg/storage/chunk/client/congestion/controller_test.go index 6ecc208c1a3f..74620d334ff9 100644 --- a/pkg/storage/chunk/client/congestion/controller_test.go +++ b/pkg/storage/chunk/client/congestion/controller_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" ) var errFakeFailure = errors.New("fake failure") diff --git a/pkg/storage/chunk/client/congestion/hedge.go b/pkg/storage/chunk/client/congestion/hedge.go index 3f7d99b97111..4a7cc265ebf1 100644 --- a/pkg/storage/chunk/client/congestion/hedge.go +++ b/pkg/storage/chunk/client/congestion/hedge.go @@ -5,7 +5,7 @@ import ( "github.com/go-kit/log" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" ) type NoopHedger struct{} diff --git a/pkg/storage/chunk/client/congestion/interfaces.go b/pkg/storage/chunk/client/congestion/interfaces.go index 7266eea67bfe..ba7e8b40d574 100644 --- a/pkg/storage/chunk/client/congestion/interfaces.go +++ b/pkg/storage/chunk/client/congestion/interfaces.go @@ -6,8 +6,8 @@ import ( "github.com/go-kit/log" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" ) // Controller handles congestion by: diff --git a/pkg/storage/chunk/client/congestion/metrics.go b/pkg/storage/chunk/client/congestion/metrics.go index 83c035c806dc..78684a4e4089 100644 --- a/pkg/storage/chunk/client/congestion/metrics.go +++ b/pkg/storage/chunk/client/congestion/metrics.go @@ -1,7 +1,7 @@ package congestion import ( - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" "github.com/prometheus/client_golang/prometheus" ) diff --git a/pkg/storage/chunk/client/gcp/bigtable_index_client.go b/pkg/storage/chunk/client/gcp/bigtable_index_client.go index 6385b1c2f3cd..28bb8276c386 100644 --- a/pkg/storage/chunk/client/gcp/bigtable_index_client.go +++ b/pkg/storage/chunk/client/gcp/bigtable_index_client.go @@ -15,11 +15,11 @@ import ( ot "github.com/opentracing/opentracing-go" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/util/math" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/util/math" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/storage/chunk/client/gcp/bigtable_object_client.go b/pkg/storage/chunk/client/gcp/bigtable_object_client.go index b9b4b71e2f3e..d878bc19bccf 100644 --- a/pkg/storage/chunk/client/gcp/bigtable_object_client.go +++ b/pkg/storage/chunk/client/gcp/bigtable_object_client.go @@ -9,10 +9,10 @@ import ( otlog "github.com/opentracing/opentracing-go/log" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/math" ) type bigtableObjectClient struct { diff --git a/pkg/storage/chunk/client/gcp/fixtures.go b/pkg/storage/chunk/client/gcp/fixtures.go index 06debee43d08..fc0d04d11559 100644 --- a/pkg/storage/chunk/client/gcp/fixtures.go +++ b/pkg/storage/chunk/client/gcp/fixtures.go @@ -13,11 +13,11 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) const ( diff --git a/pkg/storage/chunk/client/gcp/gcs_object_client.go b/pkg/storage/chunk/client/gcp/gcs_object_client.go index 2e340c038e72..2f724e159ae2 100644 --- a/pkg/storage/chunk/client/gcp/gcs_object_client.go +++ b/pkg/storage/chunk/client/gcp/gcs_object_client.go @@ -19,9 +19,9 @@ import ( google_http "google.golang.org/api/transport/http" amnet "k8s.io/apimachinery/pkg/util/net" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" ) type ClientFactory func(ctx context.Context, opts ...option.ClientOption) (*storage.Client, error) diff --git a/pkg/storage/chunk/client/gcp/gcs_object_client_test.go b/pkg/storage/chunk/client/gcp/gcs_object_client_test.go index ac3e7a77dcd6..230067f9e950 100644 --- a/pkg/storage/chunk/client/gcp/gcs_object_client_test.go +++ b/pkg/storage/chunk/client/gcp/gcs_object_client_test.go @@ -14,7 +14,7 @@ import ( "go.uber.org/atomic" "google.golang.org/api/option" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" ) func Test_Hedging(t *testing.T) { diff --git a/pkg/storage/chunk/client/gcp/instrumentation.go b/pkg/storage/chunk/client/gcp/instrumentation.go index 5f6a6cb066f0..bd35a2e9f59c 100644 --- a/pkg/storage/chunk/client/gcp/instrumentation.go +++ b/pkg/storage/chunk/client/gcp/instrumentation.go @@ -13,7 +13,7 @@ import ( "google.golang.org/api/option" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) var ( diff --git a/pkg/storage/chunk/client/gcp/table_client.go b/pkg/storage/chunk/client/gcp/table_client.go index 5e1819746f1a..24be25b76fda 100644 --- a/pkg/storage/chunk/client/gcp/table_client.go +++ b/pkg/storage/chunk/client/gcp/table_client.go @@ -11,8 +11,8 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) type tableClient struct { diff --git a/pkg/storage/chunk/client/grpc/grpc_client_test.go b/pkg/storage/chunk/client/grpc/grpc_client_test.go index a9cf2c89af27..dc040cb5aeca 100644 --- a/pkg/storage/chunk/client/grpc/grpc_client_test.go +++ b/pkg/storage/chunk/client/grpc/grpc_client_test.go @@ -7,11 +7,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) // This includes test for all RPCs in diff --git a/pkg/storage/chunk/client/grpc/grpc_server_mock_test.go b/pkg/storage/chunk/client/grpc/grpc_server_mock_test.go index 420990766ff3..e5ed3456fd08 100644 --- a/pkg/storage/chunk/client/grpc/grpc_server_mock_test.go +++ b/pkg/storage/chunk/client/grpc/grpc_server_mock_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/config" ) type server struct { diff --git a/pkg/storage/chunk/client/grpc/index_client.go b/pkg/storage/chunk/client/grpc/index_client.go index 6e2c5bd3a644..b40576519c06 100644 --- a/pkg/storage/chunk/client/grpc/index_client.go +++ b/pkg/storage/chunk/client/grpc/index_client.go @@ -6,8 +6,8 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) func (w *WriteBatch) Add(tableName, hashValue string, rangeValue []byte, value []byte) { diff --git a/pkg/storage/chunk/client/grpc/storage_client.go b/pkg/storage/chunk/client/grpc/storage_client.go index 0a2b983f32fc..42ee00507e41 100644 --- a/pkg/storage/chunk/client/grpc/storage_client.go +++ b/pkg/storage/chunk/client/grpc/storage_client.go @@ -7,8 +7,8 @@ import ( "github.com/pkg/errors" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" ) type StorageClient struct { diff --git a/pkg/storage/chunk/client/grpc/table_client.go b/pkg/storage/chunk/client/grpc/table_client.go index ab68d354d2cc..2abdefc4e98f 100644 --- a/pkg/storage/chunk/client/grpc/table_client.go +++ b/pkg/storage/chunk/client/grpc/table_client.go @@ -7,7 +7,7 @@ import ( "github.com/pkg/errors" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/config" ) type TableClient struct { diff --git a/pkg/storage/chunk/client/ibmcloud/cos_object_client.go b/pkg/storage/chunk/client/ibmcloud/cos_object_client.go index c576dd2da475..c9d534ae4163 100644 --- a/pkg/storage/chunk/client/ibmcloud/cos_object_client.go +++ b/pkg/storage/chunk/client/ibmcloud/cos_object_client.go @@ -27,10 +27,10 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/log" ) const defaultCOSAuthEndpoint = "https://iam.cloud.ibm.com/identity/token" diff --git a/pkg/storage/chunk/client/ibmcloud/cos_object_client_test.go b/pkg/storage/chunk/client/ibmcloud/cos_object_client_test.go index 4b6eb7faece3..f6959b3f31d8 100644 --- a/pkg/storage/chunk/client/ibmcloud/cos_object_client_test.go +++ b/pkg/storage/chunk/client/ibmcloud/cos_object_client_test.go @@ -24,8 +24,8 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" ) var ( diff --git a/pkg/storage/chunk/client/ibmcloud/trusted_profile_authentication_provider.go b/pkg/storage/chunk/client/ibmcloud/trusted_profile_authentication_provider.go index 69f4424f7261..b49c9ead5171 100644 --- a/pkg/storage/chunk/client/ibmcloud/trusted_profile_authentication_provider.go +++ b/pkg/storage/chunk/client/ibmcloud/trusted_profile_authentication_provider.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/chunk/client/local/boltdb_index_client.go b/pkg/storage/chunk/client/local/boltdb_index_client.go index 42e2dddb784e..de79d1eb945a 100644 --- a/pkg/storage/chunk/client/local/boltdb_index_client.go +++ b/pkg/storage/chunk/client/local/boltdb_index_client.go @@ -15,9 +15,9 @@ import ( "github.com/pkg/errors" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/series/index" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/storage/chunk/client/local/boltdb_index_client_test.go b/pkg/storage/chunk/client/local/boltdb_index_client_test.go index 2b26b5cc32cf..76dcd7afd54a 100644 --- a/pkg/storage/chunk/client/local/boltdb_index_client_test.go +++ b/pkg/storage/chunk/client/local/boltdb_index_client_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) var ( diff --git a/pkg/storage/chunk/client/local/boltdb_table_client.go b/pkg/storage/chunk/client/local/boltdb_table_client.go index cad8790b836d..df30db04d29a 100644 --- a/pkg/storage/chunk/client/local/boltdb_table_client.go +++ b/pkg/storage/chunk/client/local/boltdb_table_client.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) type TableClient struct { diff --git a/pkg/storage/chunk/client/local/fixtures.go b/pkg/storage/chunk/client/local/fixtures.go index 6f86734d7e67..fc344185c502 100644 --- a/pkg/storage/chunk/client/local/fixtures.go +++ b/pkg/storage/chunk/client/local/fixtures.go @@ -7,10 +7,10 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) type fixture struct { diff --git a/pkg/storage/chunk/client/local/fs_object_client.go b/pkg/storage/chunk/client/local/fs_object_client.go index deee987a27ab..41e911cb28c0 100644 --- a/pkg/storage/chunk/client/local/fs_object_client.go +++ b/pkg/storage/chunk/client/local/fs_object_client.go @@ -13,10 +13,10 @@ import ( "github.com/grafana/dskit/runutil" "github.com/pkg/errors" - "github.com/grafana/loki/pkg/ruler/rulestore/local" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/ruler/rulestore/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // FSConfig is the config for a FSObjectClient. diff --git a/pkg/storage/chunk/client/local/fs_object_client_test.go b/pkg/storage/chunk/client/local/fs_object_client_test.go index 09bf69530bef..2dc059b3f5f1 100644 --- a/pkg/storage/chunk/client/local/fs_object_client_test.go +++ b/pkg/storage/chunk/client/local/fs_object_client_test.go @@ -12,7 +12,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" ) func TestFSObjectClient_DeleteChunksBefore(t *testing.T) { diff --git a/pkg/storage/chunk/client/metrics.go b/pkg/storage/chunk/client/metrics.go index 4f507621a3a4..76ca20a1bac5 100644 --- a/pkg/storage/chunk/client/metrics.go +++ b/pkg/storage/chunk/client/metrics.go @@ -6,8 +6,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/constants" ) // takes a chunk client and exposes metrics for its operations. diff --git a/pkg/storage/chunk/client/object_client.go b/pkg/storage/chunk/client/object_client.go index a61fc501fec1..7a3b2e40c166 100644 --- a/pkg/storage/chunk/client/object_client.go +++ b/pkg/storage/chunk/client/object_client.go @@ -10,9 +10,9 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" ) // ObjectClient is used to store arbitrary data in Object Store (S3/GCS/Azure/...) diff --git a/pkg/storage/chunk/client/object_client_test.go b/pkg/storage/chunk/client/object_client_test.go index 0b9e659b9194..f27f5d964150 100644 --- a/pkg/storage/chunk/client/object_client_test.go +++ b/pkg/storage/chunk/client/object_client_test.go @@ -7,9 +7,9 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" ) func MustParseDayTime(s string) config.DayTime { diff --git a/pkg/storage/chunk/client/openstack/swift_object_client.go b/pkg/storage/chunk/client/openstack/swift_object_client.go index ee29ac4a6ca7..96b836b0a909 100644 --- a/pkg/storage/chunk/client/openstack/swift_object_client.go +++ b/pkg/storage/chunk/client/openstack/swift_object_client.go @@ -13,10 +13,10 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - bucket_swift "github.com/grafana/loki/pkg/storage/bucket/swift" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/util/log" + bucket_swift "github.com/grafana/loki/v3/pkg/storage/bucket/swift" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/util/log" ) var defaultTransport http.RoundTripper = &http.Transport{ diff --git a/pkg/storage/chunk/client/openstack/swift_object_client_test.go b/pkg/storage/chunk/client/openstack/swift_object_client_test.go index ad2bb173dc91..ce2f130f1bfc 100644 --- a/pkg/storage/chunk/client/openstack/swift_object_client_test.go +++ b/pkg/storage/chunk/client/openstack/swift_object_client_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/storage/bucket/swift" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/bucket/swift" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" ) type RoundTripperFunc func(*http.Request) (*http.Response, error) diff --git a/pkg/storage/chunk/client/testutils/inmemory_storage_client.go b/pkg/storage/chunk/client/testutils/inmemory_storage_client.go index 15e2ddb2564b..5f2a95da76fd 100644 --- a/pkg/storage/chunk/client/testutils/inmemory_storage_client.go +++ b/pkg/storage/chunk/client/testutils/inmemory_storage_client.go @@ -12,10 +12,10 @@ import ( "github.com/go-kit/log/level" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/util/log" ) type MockStorageMode int diff --git a/pkg/storage/chunk/client/testutils/testutils.go b/pkg/storage/chunk/client/testutils/testutils.go index 1ee5e95fd878..2b35b612badc 100644 --- a/pkg/storage/chunk/client/testutils/testutils.go +++ b/pkg/storage/chunk/client/testutils/testutils.go @@ -12,13 +12,13 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - chunkclient "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + chunkclient "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) const ( diff --git a/pkg/storage/chunk/client/util/parallel_chunk_fetch.go b/pkg/storage/chunk/client/util/parallel_chunk_fetch.go index be77e2d556d1..c61fdcf1bd52 100644 --- a/pkg/storage/chunk/client/util/parallel_chunk_fetch.go +++ b/pkg/storage/chunk/client/util/parallel_chunk_fetch.go @@ -7,8 +7,8 @@ import ( "github.com/opentracing/opentracing-go" otlog "github.com/opentracing/opentracing-go/log" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) var decodeContextPool = sync.Pool{ diff --git a/pkg/storage/chunk/client/util/parallel_chunk_fetch_test.go b/pkg/storage/chunk/client/util/parallel_chunk_fetch_test.go index 7fc48ca5366c..98b654d9df07 100644 --- a/pkg/storage/chunk/client/util/parallel_chunk_fetch_test.go +++ b/pkg/storage/chunk/client/util/parallel_chunk_fetch_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - "github.com/grafana/loki/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk" ) func BenchmarkGetParallelChunks(b *testing.B) { diff --git a/pkg/storage/chunk/client/util/util.go b/pkg/storage/chunk/client/util/util.go index e49fad20136f..3485552c220f 100644 --- a/pkg/storage/chunk/client/util/util.go +++ b/pkg/storage/chunk/client/util/util.go @@ -8,8 +8,8 @@ import ( ot "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/util/math" ) // DoSingleQuery is the interface for indexes that don't support batching yet. diff --git a/pkg/storage/chunk/dummy.go b/pkg/storage/chunk/dummy.go index 7951ad2f80ef..a957d42e654d 100644 --- a/pkg/storage/chunk/dummy.go +++ b/pkg/storage/chunk/dummy.go @@ -5,7 +5,7 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/util/filter" + "github.com/grafana/loki/v3/pkg/util/filter" ) func newDummyChunk() *dummyChunk { diff --git a/pkg/storage/chunk/fetcher/fetcher.go b/pkg/storage/chunk/fetcher/fetcher.go index fd90f685e981..780114393284 100644 --- a/pkg/storage/chunk/fetcher/fetcher.go +++ b/pkg/storage/chunk/fetcher/fetcher.go @@ -12,14 +12,14 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/prometheus/promql" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) var ( diff --git a/pkg/storage/chunk/fetcher/fetcher_test.go b/pkg/storage/chunk/fetcher/fetcher_test.go index d73974506d4a..c6215bde5b98 100644 --- a/pkg/storage/chunk/fetcher/fetcher_test.go +++ b/pkg/storage/chunk/fetcher/fetcher_test.go @@ -12,13 +12,13 @@ import ( "github.com/stretchr/testify/assert" "golang.org/x/exp/slices" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" ) func Test(t *testing.T) { diff --git a/pkg/storage/chunk/interface.go b/pkg/storage/chunk/interface.go index cf3f619fa8d8..8da4312c6039 100644 --- a/pkg/storage/chunk/interface.go +++ b/pkg/storage/chunk/interface.go @@ -24,7 +24,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/util/filter" + "github.com/grafana/loki/v3/pkg/util/filter" ) // ChunkLen is the length of a chunk in bytes. diff --git a/pkg/storage/chunk/predicate.go b/pkg/storage/chunk/predicate.go index e200f28fb55e..9c6abe226719 100644 --- a/pkg/storage/chunk/predicate.go +++ b/pkg/storage/chunk/predicate.go @@ -3,7 +3,7 @@ package chunk import ( "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/querier/plan" ) // TODO(owen-d): rename. This is not a predicate and is confusing. diff --git a/pkg/storage/chunk/tests/by_key_test.go b/pkg/storage/chunk/tests/by_key_test.go index 1fada6bb632e..e5ab23f8726a 100644 --- a/pkg/storage/chunk/tests/by_key_test.go +++ b/pkg/storage/chunk/tests/by_key_test.go @@ -1,8 +1,8 @@ package tests import ( - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" ) // ByKey allow you to sort chunks by ID diff --git a/pkg/storage/chunk/tests/caching_fixtures_test.go b/pkg/storage/chunk/tests/caching_fixtures_test.go index 194f2b1276e0..fbec1ac4a4fc 100644 --- a/pkg/storage/chunk/tests/caching_fixtures_test.go +++ b/pkg/storage/chunk/tests/caching_fixtures_test.go @@ -8,14 +8,14 @@ import ( "github.com/grafana/dskit/flagext" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/gcp" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/gcp" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/validation" ) type fixture struct { diff --git a/pkg/storage/chunk/tests/chunk_client_test.go b/pkg/storage/chunk/tests/chunk_client_test.go index a584d7a74f9b..c995225524c0 100644 --- a/pkg/storage/chunk/tests/chunk_client_test.go +++ b/pkg/storage/chunk/tests/chunk_client_test.go @@ -12,11 +12,11 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) func TestChunksBasic(t *testing.T) { diff --git a/pkg/storage/chunk/tests/index_client_test.go b/pkg/storage/chunk/tests/index_client_test.go index a4751f1fb1d3..0a2545206cda 100644 --- a/pkg/storage/chunk/tests/index_client_test.go +++ b/pkg/storage/chunk/tests/index_client_test.go @@ -11,9 +11,9 @@ import ( "github.com/grafana/dskit/user" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) var ctx = user.InjectOrgID(context.Background(), "1") diff --git a/pkg/storage/chunk/tests/utils_test.go b/pkg/storage/chunk/tests/utils_test.go index e885e1d53bcd..80e6e1b659f0 100644 --- a/pkg/storage/chunk/tests/utils_test.go +++ b/pkg/storage/chunk/tests/utils_test.go @@ -5,13 +5,13 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/aws" - "github.com/grafana/loki/pkg/storage/chunk/client/cassandra" - "github.com/grafana/loki/pkg/storage/chunk/client/gcp" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/aws" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/cassandra" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/gcp" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) const ( diff --git a/pkg/storage/common/aws/storage_class.go b/pkg/storage/common/aws/storage_class.go index b284c7326fbb..ab3950e9d8c3 100644 --- a/pkg/storage/common/aws/storage_class.go +++ b/pkg/storage/common/aws/storage_class.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) const ( diff --git a/pkg/storage/config/bench_test.go b/pkg/storage/config/bench_test.go index 8296f229bde1..df5fb913b1f4 100644 --- a/pkg/storage/config/bench_test.go +++ b/pkg/storage/config/bench_test.go @@ -6,8 +6,8 @@ import ( "github.com/stretchr/testify/require" yaml "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" ) func BenchmarkExternalKey(b *testing.B) { diff --git a/pkg/storage/config/schema_config.go b/pkg/storage/config/schema_config.go index 4b96a722cadb..c7e72886b738 100644 --- a/pkg/storage/config/schema_config.go +++ b/pkg/storage/config/schema_config.go @@ -17,10 +17,10 @@ import ( "github.com/prometheus/common/model" yaml "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/config/schema_config_test.go b/pkg/storage/config/schema_config_test.go index 06fd191b7092..a4ed59933150 100644 --- a/pkg/storage/config/schema_config_test.go +++ b/pkg/storage/config/schema_config_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/require" yaml "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" ) func TestChunkTableFor(t *testing.T) { diff --git a/pkg/storage/config/store.go b/pkg/storage/config/store.go index 14218bb9cfb1..8dbd57cdc250 100644 --- a/pkg/storage/config/store.go +++ b/pkg/storage/config/store.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" ) type ChunkStoreConfig struct { diff --git a/pkg/storage/factory.go b/pkg/storage/factory.go index b619d978a756..3660bfb4b211 100644 --- a/pkg/storage/factory.go +++ b/pkg/storage/factory.go @@ -14,32 +14,32 @@ import ( "github.com/grafana/dskit/flagext" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/alibaba" - "github.com/grafana/loki/pkg/storage/chunk/client/aws" - "github.com/grafana/loki/pkg/storage/chunk/client/azure" - "github.com/grafana/loki/pkg/storage/chunk/client/baidubce" - "github.com/grafana/loki/pkg/storage/chunk/client/cassandra" - "github.com/grafana/loki/pkg/storage/chunk/client/congestion" - "github.com/grafana/loki/pkg/storage/chunk/client/gcp" - "github.com/grafana/loki/pkg/storage/chunk/client/grpc" - "github.com/grafana/loki/pkg/storage/chunk/client/hedging" - "github.com/grafana/loki/pkg/storage/chunk/client/ibmcloud" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/openstack" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores" - "github.com/grafana/loki/pkg/storage/stores/series/index" - bloomshipperconfig "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/downloads" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/gatewayclient" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/alibaba" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/aws" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/azure" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/baidubce" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/cassandra" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/congestion" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/gcp" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/grpc" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/hedging" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/ibmcloud" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/openstack" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + bloomshipperconfig "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/downloads" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/gatewayclient" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) var ( diff --git a/pkg/storage/factory_test.go b/pkg/storage/factory_test.go index 2588c9dc69dd..5685424f199c 100644 --- a/pkg/storage/factory_test.go +++ b/pkg/storage/factory_test.go @@ -12,15 +12,15 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/cassandra" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/cassandra" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) func TestFactoryStop(t *testing.T) { diff --git a/pkg/storage/hack/main.go b/pkg/storage/hack/main.go index 93278b429c9a..f85e44a41ac5 100644 --- a/pkg/storage/hack/main.go +++ b/pkg/storage/hack/main.go @@ -14,16 +14,16 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/pkg/storage/lazy_chunk.go b/pkg/storage/lazy_chunk.go index 5a6170c6c6fe..4c741228eee3 100644 --- a/pkg/storage/lazy_chunk.go +++ b/pkg/storage/lazy_chunk.go @@ -7,13 +7,13 @@ import ( "github.com/go-kit/log/level" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // LazyChunk loads the chunk when it is accessed. diff --git a/pkg/storage/lazy_chunk_test.go b/pkg/storage/lazy_chunk_test.go index 2244c02c924c..6757e94e1e95 100644 --- a/pkg/storage/lazy_chunk_test.go +++ b/pkg/storage/lazy_chunk_test.go @@ -9,13 +9,13 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util" ) func TestLazyChunkIterator(t *testing.T) { diff --git a/pkg/storage/store.go b/pkg/storage/store.go index b582f7e6c715..1a4fa386062f 100644 --- a/pkg/storage/store.go +++ b/pkg/storage/store.go @@ -6,9 +6,9 @@ import ( "math" "time" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" - lokilog "github.com/grafana/loki/pkg/logql/log" + lokilog "github.com/grafana/loki/v3/pkg/logql/log" "github.com/go-kit/log" "github.com/go-kit/log/level" @@ -19,28 +19,28 @@ import ( "github.com/grafana/dskit/tenant" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/congestion" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores" - "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/storage/stores/series" - series_index "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/gatewayclient" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/deletion" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/congestion" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores" + "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/storage/stores/series" + series_index "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/gatewayclient" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/deletion" ) var ( diff --git a/pkg/storage/store_test.go b/pkg/storage/store_test.go index 52df29c079ac..3be136d411de 100644 --- a/pkg/storage/store_test.go +++ b/pkg/storage/store_test.go @@ -13,7 +13,7 @@ import ( "testing" "time" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" "github.com/cespare/xxhash/v2" "github.com/go-kit/log" @@ -23,25 +23,26 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/iter" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - lokilog "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" "github.com/grafana/loki/pkg/push" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/marshal" - "github.com/grafana/loki/pkg/validation" + + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/iter" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + lokilog "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/pkg/storage/stores/composite_store.go b/pkg/storage/stores/composite_store.go index 7df10aa07648..212cd9408283 100644 --- a/pkg/storage/stores/composite_store.go +++ b/pkg/storage/stores/composite_store.go @@ -7,15 +7,15 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - tsdb_index "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + tsdb_index "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util" ) type ChunkWriter interface { diff --git a/pkg/storage/stores/composite_store_entry.go b/pkg/storage/stores/composite_store_entry.go index 200b701449a5..d4590d199d9e 100644 --- a/pkg/storage/stores/composite_store_entry.go +++ b/pkg/storage/stores/composite_store_entry.go @@ -5,24 +5,24 @@ import ( "fmt" "time" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/go-kit/log/level" "github.com/opentracing/opentracing-go" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/errors" - "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/errors" + "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/util/validation" ) type StoreLimits interface { diff --git a/pkg/storage/stores/composite_store_test.go b/pkg/storage/stores/composite_store_test.go index d3fc6ba4dacf..3836243f3878 100644 --- a/pkg/storage/stores/composite_store_test.go +++ b/pkg/storage/stores/composite_store_test.go @@ -8,17 +8,17 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" "github.com/grafana/dskit/test" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" ) type mockStore int diff --git a/pkg/storage/stores/index/index.go b/pkg/storage/stores/index/index.go index db3ccfd2578e..26b2a4488004 100644 --- a/pkg/storage/stores/index/index.go +++ b/pkg/storage/stores/index/index.go @@ -8,12 +8,12 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - loki_instrument "github.com/grafana/loki/pkg/util/instrument" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + loki_instrument "github.com/grafana/loki/v3/pkg/util/instrument" ) type Filterable interface { diff --git a/pkg/storage/stores/index/metrics.go b/pkg/storage/stores/index/metrics.go index 924122f950a8..2474a9ece07c 100644 --- a/pkg/storage/stores/index/metrics.go +++ b/pkg/storage/stores/index/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type metrics struct { diff --git a/pkg/storage/stores/index/seriesvolume/volume.go b/pkg/storage/stores/index/seriesvolume/volume.go index b09ccd800e87..0e079702ccf6 100644 --- a/pkg/storage/stores/index/seriesvolume/volume.go +++ b/pkg/storage/stores/index/seriesvolume/volume.go @@ -5,7 +5,7 @@ import ( "sort" "sync" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) const ( diff --git a/pkg/storage/stores/index/seriesvolume/volume_test.go b/pkg/storage/stores/index/seriesvolume/volume_test.go index 8f0ecb6eb266..6487bb0260b9 100644 --- a/pkg/storage/stores/index/seriesvolume/volume_test.go +++ b/pkg/storage/stores/index/seriesvolume/volume_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) func Test_AddVolume(t *testing.T) { diff --git a/pkg/storage/stores/index/stats/stats.go b/pkg/storage/stores/index/stats/stats.go index 82d0791c1dc7..088c21f76ca1 100644 --- a/pkg/storage/stores/index/stats/stats.go +++ b/pkg/storage/stores/index/stats/stats.go @@ -7,8 +7,8 @@ import ( "github.com/prometheus/common/model" "github.com/willf/bloom" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) var BloomPool PoolBloom diff --git a/pkg/storage/stores/series/index/caching_index_client.go b/pkg/storage/stores/series/index/caching_index_client.go index dd6e7348f8fd..40181ba794c7 100644 --- a/pkg/storage/stores/series/index/caching_index_client.go +++ b/pkg/storage/stores/series/index/caching_index_client.go @@ -14,9 +14,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/storage/stores/series/index/caching_index_client_test.go b/pkg/storage/stores/series/index/caching_index_client_test.go index dcb7b90a82fa..99a9264a0a0a 100644 --- a/pkg/storage/stores/series/index/caching_index_client_test.go +++ b/pkg/storage/stores/series/index/caching_index_client_test.go @@ -14,9 +14,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/validation" ) var ctx = user.InjectOrgID(context.Background(), "1") diff --git a/pkg/storage/stores/series/index/schema.go b/pkg/storage/stores/series/index/schema.go index 24ff305a064b..5b60c5f9c6a6 100644 --- a/pkg/storage/stores/series/index/schema.go +++ b/pkg/storage/stores/series/index/schema.go @@ -13,8 +13,8 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/querier/astmapper" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/stores/series/index/schema_config.go b/pkg/storage/stores/series/index/schema_config.go index c4b3f2dfe17c..32a05fb7634b 100644 --- a/pkg/storage/stores/series/index/schema_config.go +++ b/pkg/storage/stores/series/index/schema_config.go @@ -7,8 +7,8 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/math" ) const ( diff --git a/pkg/storage/stores/series/index/schema_test.go b/pkg/storage/stores/series/index/schema_test.go index b70fd49a56f9..5a7493608526 100644 --- a/pkg/storage/stores/series/index/schema_test.go +++ b/pkg/storage/stores/series/index/schema_test.go @@ -12,8 +12,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/storage/config" ) func TestDailyBuckets(t *testing.T) { diff --git a/pkg/storage/stores/series/index/table_client.go b/pkg/storage/stores/series/index/table_client.go index 8767fcaf3aaa..e32cc8968b19 100644 --- a/pkg/storage/stores/series/index/table_client.go +++ b/pkg/storage/stores/series/index/table_client.go @@ -3,7 +3,7 @@ package index import ( "context" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/config" ) // TableClient is a client for telling Dynamo what to do with tables. diff --git a/pkg/storage/stores/series/index/table_manager.go b/pkg/storage/stores/series/index/table_manager.go index c477ecf13510..414e08f494c8 100644 --- a/pkg/storage/stores/series/index/table_manager.go +++ b/pkg/storage/stores/series/index/table_manager.go @@ -20,8 +20,8 @@ import ( "github.com/prometheus/common/model" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/storage/stores/series/index/table_manager_test.go b/pkg/storage/stores/series/index/table_manager_test.go index 09512fd98ccd..74429b48f9b3 100644 --- a/pkg/storage/stores/series/index/table_manager_test.go +++ b/pkg/storage/stores/series/index/table_manager_test.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/config" ) const ( diff --git a/pkg/storage/stores/series/series_index_gateway_store.go b/pkg/storage/stores/series/series_index_gateway_store.go index c3af8c0c8d3c..b58979bd11a1 100644 --- a/pkg/storage/stores/series/series_index_gateway_store.go +++ b/pkg/storage/stores/series/series_index_gateway_store.go @@ -9,11 +9,11 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" ) // NB(owen-d): mostly modeled off of the proto-generated `logproto.IndexGatewayClient`, diff --git a/pkg/storage/stores/series/series_index_gateway_store_test.go b/pkg/storage/stores/series/series_index_gateway_store_test.go index 8c65881d3c5b..48256220191e 100644 --- a/pkg/storage/stores/series/series_index_gateway_store_test.go +++ b/pkg/storage/stores/series/series_index_gateway_store_test.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) type fakeClient struct { diff --git a/pkg/storage/stores/series/series_index_store.go b/pkg/storage/stores/series/series_index_store.go index 50a036db3762..138fd17a7ab1 100644 --- a/pkg/storage/stores/series/series_index_store.go +++ b/pkg/storage/stores/series/series_index_store.go @@ -17,22 +17,22 @@ import ( "github.com/grafana/dskit/concurrency" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - storageerrors "github.com/grafana/loki/pkg/storage/errors" - "github.com/grafana/loki/pkg/storage/stores" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - series_index "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/extract" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + storageerrors "github.com/grafana/loki/v3/pkg/storage/errors" + "github.com/grafana/loki/v3/pkg/storage/stores" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + series_index "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/extract" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) var ( diff --git a/pkg/storage/stores/series/series_store_test.go b/pkg/storage/stores/series/series_store_test.go index 582bb9a2fea5..2f1146a1d737 100644 --- a/pkg/storage/stores/series/series_store_test.go +++ b/pkg/storage/stores/series/series_store_test.go @@ -17,18 +17,18 @@ import ( "github.com/prometheus/prometheus/promql/parser" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) type configFactory func() config.ChunkStoreConfig diff --git a/pkg/storage/stores/series/series_store_utils.go b/pkg/storage/stores/series/series_store_utils.go index 1c8430c9d8fb..9e7bde3daaef 100644 --- a/pkg/storage/stores/series/series_store_utils.go +++ b/pkg/storage/stores/series/series_store_utils.go @@ -6,9 +6,9 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util" ) func filterChunksByTime(from, through model.Time, chunks []chunk.Chunk) []chunk.Chunk { diff --git a/pkg/storage/stores/series/series_store_utils_test.go b/pkg/storage/stores/series/series_store_utils_test.go index c2bd07ee401b..35ef774c237e 100644 --- a/pkg/storage/stores/series/series_store_utils_test.go +++ b/pkg/storage/stores/series/series_store_utils_test.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) // Refer to https://github.com/prometheus/prometheus/issues/2651. diff --git a/pkg/storage/stores/series_store_write.go b/pkg/storage/stores/series_store_write.go index db22c5caa120..a36ae4510b8e 100644 --- a/pkg/storage/stores/series_store_write.go +++ b/pkg/storage/stores/series_store_write.go @@ -9,12 +9,12 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) var ( diff --git a/pkg/storage/stores/series_store_write_test.go b/pkg/storage/stores/series_store_write_test.go index 9c8c2f406933..823f5bf11f0a 100644 --- a/pkg/storage/stores/series_store_write_test.go +++ b/pkg/storage/stores/series_store_write_test.go @@ -8,11 +8,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" ) type mockCache struct { diff --git a/pkg/storage/stores/shipper/bloomshipper/blockscache.go b/pkg/storage/stores/shipper/bloomshipper/blockscache.go index 767518273059..b26a4ed5cbda 100644 --- a/pkg/storage/stores/shipper/bloomshipper/blockscache.go +++ b/pkg/storage/stores/shipper/bloomshipper/blockscache.go @@ -15,9 +15,9 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/storage/stores/shipper/bloomshipper/blockscache_test.go b/pkg/storage/stores/shipper/bloomshipper/blockscache_test.go index 4ec69e6d5a66..1ddc465577fc 100644 --- a/pkg/storage/stores/shipper/bloomshipper/blockscache_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/blockscache_test.go @@ -11,9 +11,9 @@ import ( "github.com/grafana/dskit/flagext" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" ) var ( diff --git a/pkg/storage/stores/shipper/bloomshipper/cache.go b/pkg/storage/stores/shipper/bloomshipper/cache.go index e7fcfaff1666..3e08b53eac3f 100644 --- a/pkg/storage/stores/shipper/bloomshipper/cache.go +++ b/pkg/storage/stores/shipper/bloomshipper/cache.go @@ -10,9 +10,9 @@ import ( "github.com/go-kit/log/level" "github.com/pkg/errors" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util" ) type CloseableBlockQuerier struct { diff --git a/pkg/storage/stores/shipper/bloomshipper/cache_test.go b/pkg/storage/stores/shipper/bloomshipper/cache_test.go index eb2a061c775b..dd7a44e57cf7 100644 --- a/pkg/storage/stores/shipper/bloomshipper/cache_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/cache_test.go @@ -11,8 +11,8 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" ) type mockCache[K comparable, V any] struct { diff --git a/pkg/storage/stores/shipper/bloomshipper/client.go b/pkg/storage/stores/shipper/bloomshipper/client.go index eef3b667d253..488815b83514 100644 --- a/pkg/storage/stores/shipper/bloomshipper/client.go +++ b/pkg/storage/stores/shipper/bloomshipper/client.go @@ -8,18 +8,20 @@ import ( "hash" "io" "strings" + "sync" + "time" "github.com/go-kit/log" "github.com/grafana/dskit/concurrency" "github.com/pkg/errors" "github.com/prometheus/common/model" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - "github.com/grafana/loki/pkg/util/encoding" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/util/encoding" ) const ( @@ -417,3 +419,88 @@ func findPeriod(configs []config.PeriodConfig, ts model.Time) (config.DayTime, e } return config.DayTime{}, fmt.Errorf("can not find period for timestamp %d", ts) } + +type listOpResult struct { + ts time.Time + objects []client.StorageObject + prefixes []client.StorageCommonPrefix +} + +type listOpCache map[string]listOpResult + +type cachedListOpObjectClient struct { + client.ObjectClient + cache listOpCache + mtx sync.RWMutex + ttl, interval time.Duration + done chan struct{} +} + +func newCachedListOpObjectClient(oc client.ObjectClient, ttl, interval time.Duration) *cachedListOpObjectClient { + client := &cachedListOpObjectClient{ + ObjectClient: oc, + cache: make(listOpCache), + done: make(chan struct{}), + ttl: ttl, + interval: interval, + } + + go func(c *cachedListOpObjectClient) { + ticker := time.NewTicker(c.interval) + defer ticker.Stop() + + for { + select { + case <-c.done: + return + case <-ticker.C: + c.mtx.Lock() + for k := range c.cache { + if time.Since(c.cache[k].ts) > c.ttl { + delete(c.cache, k) + } + } + c.mtx.Unlock() + } + } + }(client) + + return client +} + +func (c *cachedListOpObjectClient) List(ctx context.Context, prefix string, delimiter string) ([]client.StorageObject, []client.StorageCommonPrefix, error) { + if delimiter != "" { + return nil, nil, fmt.Errorf("does not support LIST calls with delimiter: %s", delimiter) + } + c.mtx.RLock() + cached, found := c.cache[prefix] + c.mtx.RUnlock() + if found { + return cached.objects, cached.prefixes, nil + } + + c.mtx.Lock() + defer c.mtx.Unlock() + + objects, prefixes, err := c.ObjectClient.List(ctx, prefix, delimiter) + if err != nil { + return nil, nil, err + } + + c.cache[prefix] = listOpResult{ + ts: time.Now(), + objects: objects, + prefixes: prefixes, + } + + return objects, prefixes, err +} + +func (c *cachedListOpObjectClient) Stop() { + c.mtx.Lock() + defer c.mtx.Unlock() + + close(c.done) + c.cache = nil + c.ObjectClient.Stop() +} diff --git a/pkg/storage/stores/shipper/bloomshipper/client_test.go b/pkg/storage/stores/shipper/bloomshipper/client_test.go index cee23671b721..cd77339c0932 100644 --- a/pkg/storage/stores/shipper/bloomshipper/client_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/client_test.go @@ -6,6 +6,7 @@ import ( "encoding/json" "fmt" "os" + "path" "testing" "time" @@ -13,9 +14,10 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/client/testutils" - "github.com/grafana/loki/pkg/storage/config" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/testutils" + "github.com/grafana/loki/v3/pkg/storage/config" ) func parseTime(s string) model.Time { @@ -341,3 +343,68 @@ func TestBloomClient_DeleteBlocks(t *testing.T) { require.False(t, found) }) } + +type mockListClient struct { + client.ObjectClient + counter int +} + +func (c *mockListClient) List(_ context.Context, prefix string, _ string) ([]client.StorageObject, []client.StorageCommonPrefix, error) { + c.counter++ + objects := []client.StorageObject{ + {Key: path.Join(path.Base(prefix), "object")}, + } + prefixes := []client.StorageCommonPrefix{ + client.StorageCommonPrefix(prefix), + } + return objects, prefixes, nil +} + +func (c *mockListClient) Stop() { +} + +func TestBloomClient_CachedListOpObjectClient(t *testing.T) { + + t.Run("list call with delimiter returns error", func(t *testing.T) { + downstreamClient := &mockListClient{} + c := newCachedListOpObjectClient(downstreamClient, 100*time.Millisecond, 10*time.Millisecond) + t.Cleanup(c.Stop) + + _, _, err := c.List(context.Background(), "prefix/", "/") + require.Error(t, err) + }) + + t.Run("list calls are cached by prefix", func(t *testing.T) { + downstreamClient := &mockListClient{} + c := newCachedListOpObjectClient(downstreamClient, 100*time.Millisecond, 10*time.Millisecond) + t.Cleanup(c.Stop) + + // cache miss + res, _, err := c.List(context.Background(), "a/", "") + require.NoError(t, err) + require.Equal(t, 1, downstreamClient.counter) + require.Equal(t, []client.StorageObject{{Key: "a/object"}}, res) + + // cache miss + res, _, err = c.List(context.Background(), "b/", "") + require.NoError(t, err) + require.Equal(t, 2, downstreamClient.counter) + require.Equal(t, []client.StorageObject{{Key: "b/object"}}, res) + + // cache hit + res, _, err = c.List(context.Background(), "a/", "") + require.NoError(t, err) + require.Equal(t, 2, downstreamClient.counter) + require.Equal(t, []client.StorageObject{{Key: "a/object"}}, res) + + // wait for >=ttl so items are expired + time.Sleep(150 * time.Millisecond) + + // cache miss + res, _, err = c.List(context.Background(), "a/", "") + require.NoError(t, err) + require.Equal(t, 3, downstreamClient.counter) + require.Equal(t, []client.StorageObject{{Key: "a/object"}}, res) + }) + +} diff --git a/pkg/storage/stores/shipper/bloomshipper/compress_utils.go b/pkg/storage/stores/shipper/bloomshipper/compress_utils.go index 57025113cea7..52de4a4da582 100644 --- a/pkg/storage/stores/shipper/bloomshipper/compress_utils.go +++ b/pkg/storage/stores/shipper/bloomshipper/compress_utils.go @@ -6,7 +6,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) func CompressBloomBlock(ref BlockRef, archivePath, localDst string, logger log.Logger) (Block, error) { diff --git a/pkg/storage/stores/shipper/bloomshipper/compress_utils_test.go b/pkg/storage/stores/shipper/bloomshipper/compress_utils_test.go index 11a6afb21af4..f0b1598dadf9 100644 --- a/pkg/storage/stores/shipper/bloomshipper/compress_utils_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/compress_utils_test.go @@ -10,7 +10,7 @@ import ( "github.com/google/uuid" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) func directoryDoesNotExist(path string) bool { diff --git a/pkg/storage/stores/shipper/bloomshipper/config/config.go b/pkg/storage/stores/shipper/bloomshipper/config/config.go index 89a2f30e2dd3..be4d96c765e1 100644 --- a/pkg/storage/stores/shipper/bloomshipper/config/config.go +++ b/pkg/storage/stores/shipper/bloomshipper/config/config.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/dskit/flagext" - "github.com/grafana/loki/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" ) type Config struct { @@ -17,6 +17,10 @@ type Config struct { DownloadParallelism int `yaml:"download_parallelism"` BlocksCache BlocksCacheConfig `yaml:"blocks_cache"` MetasCache cache.Config `yaml:"metas_cache"` + + // This will always be set to true when flags are registered. + // In tests, where config is created as literal, it can be set manually. + CacheListOps bool `yaml:"-"` } func (c *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { @@ -27,6 +31,9 @@ func (c *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) { f.IntVar(&c.DownloadParallelism, prefix+"download-parallelism", 16, "The amount of maximum concurrent bloom blocks downloads.") c.BlocksCache.RegisterFlagsWithPrefixAndDefaults(prefix+"blocks-cache.", "Cache for bloom blocks. ", f, 24*time.Hour) c.MetasCache.RegisterFlagsWithPrefix(prefix+"metas-cache.", "Cache for bloom metas. ", f) + + // always cache LIST operations + c.CacheListOps = true } func (c *Config) Validate() error { diff --git a/pkg/storage/stores/shipper/bloomshipper/fetcher.go b/pkg/storage/stores/shipper/bloomshipper/fetcher.go index b9483675f21c..936e120af850 100644 --- a/pkg/storage/stores/shipper/bloomshipper/fetcher.go +++ b/pkg/storage/stores/shipper/bloomshipper/fetcher.go @@ -16,9 +16,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "k8s.io/utils/keymutex" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/util/constants" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/util/constants" ) var downloadQueueCapacity = 10000 diff --git a/pkg/storage/stores/shipper/bloomshipper/fetcher_test.go b/pkg/storage/stores/shipper/bloomshipper/fetcher_test.go index ca3fc006c268..43658f9ed213 100644 --- a/pkg/storage/stores/shipper/bloomshipper/fetcher_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/fetcher_test.go @@ -14,10 +14,10 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" ) func makeMetas(t *testing.T, schemaCfg config.SchemaConfig, ts model.Time, keyspaces []v1.FingerprintBounds) []Meta { diff --git a/pkg/storage/stores/shipper/bloomshipper/interval.go b/pkg/storage/stores/shipper/bloomshipper/interval.go index 430bde1a7680..86e0aff919d4 100644 --- a/pkg/storage/stores/shipper/bloomshipper/interval.go +++ b/pkg/storage/stores/shipper/bloomshipper/interval.go @@ -9,8 +9,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/util/encoding" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/util/encoding" ) // Interval defines a time range with start end end time diff --git a/pkg/storage/stores/shipper/bloomshipper/interval_test.go b/pkg/storage/stores/shipper/bloomshipper/interval_test.go index 2914e1803057..044bffb0b581 100644 --- a/pkg/storage/stores/shipper/bloomshipper/interval_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/interval_test.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) func Test_Interval_String(t *testing.T) { diff --git a/pkg/storage/stores/shipper/bloomshipper/resolver.go b/pkg/storage/stores/shipper/bloomshipper/resolver.go index b93f84f82704..8f86ce7cb09e 100644 --- a/pkg/storage/stores/shipper/bloomshipper/resolver.go +++ b/pkg/storage/stores/shipper/bloomshipper/resolver.go @@ -9,7 +9,7 @@ import ( "strconv" "strings" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) const ( diff --git a/pkg/storage/stores/shipper/bloomshipper/resolver_test.go b/pkg/storage/stores/shipper/bloomshipper/resolver_test.go index 151b3bc11bb4..ba45845ea9ba 100644 --- a/pkg/storage/stores/shipper/bloomshipper/resolver_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/resolver_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) func TestResolver_ParseMetaKey(t *testing.T) { diff --git a/pkg/storage/stores/shipper/bloomshipper/shipper.go b/pkg/storage/stores/shipper/bloomshipper/shipper.go index 66982bc065f8..09d4652fb9f6 100644 --- a/pkg/storage/stores/shipper/bloomshipper/shipper.go +++ b/pkg/storage/stores/shipper/bloomshipper/shipper.go @@ -5,7 +5,7 @@ import ( "fmt" "sort" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) type ForEachBlockCallback func(bq *v1.BlockQuerier, bounds v1.FingerprintBounds) error diff --git a/pkg/storage/stores/shipper/bloomshipper/shipper_test.go b/pkg/storage/stores/shipper/bloomshipper/shipper_test.go index a85132d379bb..81e17a84b527 100644 --- a/pkg/storage/stores/shipper/bloomshipper/shipper_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/shipper_test.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) func TestBloomShipper_findBlocks(t *testing.T) { diff --git a/pkg/storage/stores/shipper/bloomshipper/store.go b/pkg/storage/stores/shipper/bloomshipper/store.go index 83d0db9e4296..5e1363d0cb73 100644 --- a/pkg/storage/stores/shipper/bloomshipper/store.go +++ b/pkg/storage/stores/shipper/bloomshipper/store.go @@ -5,6 +5,7 @@ import ( "fmt" "path" "sort" + "time" "github.com/go-kit/log" "github.com/go-kit/log/level" @@ -13,13 +14,13 @@ import ( "github.com/prometheus/common/model" "golang.org/x/exp/slices" - "github.com/grafana/loki/pkg/storage" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/storage" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/util/constants" ) var ( @@ -294,6 +295,9 @@ func NewBloomStore( return nil, errors.Wrapf(err, "creating object client for period %s", periodicConfig.From) } + if storageConfig.BloomShipperConfig.CacheListOps { + objectClient = newCachedListOpObjectClient(objectClient, 5*time.Minute, 10*time.Second) + } bloomClient, err := NewBloomClient(cfg, objectClient, logger) if err != nil { return nil, errors.Wrapf(err, "creating bloom client for period %s", periodicConfig.From) diff --git a/pkg/storage/stores/shipper/bloomshipper/store_test.go b/pkg/storage/stores/shipper/bloomshipper/store_test.go index 3ba7b8d2b5de..077a871e71fb 100644 --- a/pkg/storage/stores/shipper/bloomshipper/store_test.go +++ b/pkg/storage/stores/shipper/bloomshipper/store_test.go @@ -15,13 +15,13 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - storageconfig "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/bloomshipper/config" + "github.com/grafana/loki/v3/pkg/storage" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + storageconfig "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/bloomshipper/config" ) func newMockBloomStore(t *testing.T) (*BloomStore, string, error) { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go index 584116b24041..cb73f9aa95bf 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index.go @@ -12,14 +12,14 @@ import ( "github.com/prometheus/prometheus/model/labels" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - seriesindex "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - shipperutil "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + seriesindex "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + shipperutil "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" ) type CompactedIndex struct { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go index ace66e0f0674..043d36d00401 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/compacted_index_test.go @@ -12,13 +12,13 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func TestCompactedIndex_IndexProcessor(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go index 402fb8471cc8..73e87e06e1e7 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/compactor/retention" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go index b017cb82f7fd..3a5c4a96f3e5 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/index_compactor.go @@ -5,8 +5,8 @@ import ( "github.com/go-kit/log" - "github.com/grafana/loki/pkg/compactor" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/compactor" + "github.com/grafana/loki/v3/pkg/storage/config" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go index 450ccfabfc1c..7b2422fdc114 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator.go @@ -8,9 +8,9 @@ import ( "github.com/prometheus/prometheus/model/labels" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage/config" - series_index "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage/config" + series_index "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go index 509e5661a4d6..26e9aef596bf 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/iterator_test.go @@ -15,11 +15,11 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" ) func Test_ChunkIterator(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/series.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/series.go index 497153625e21..2e53a37b4498 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/series.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/series.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/config" ) type userSeries struct { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go index d864d306a2ba..bdd42afc935d 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor.go @@ -15,11 +15,11 @@ import ( "github.com/pkg/errors" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/compactor" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - shipper_util "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" + "github.com/grafana/loki/v3/pkg/compactor" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + shipper_util "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" ) //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go index 4a2b6d2371e7..4fa6d598c8e3 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/table_compactor_test.go @@ -16,14 +16,14 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/compactor" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/testutil" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util.go index 27897df0dd02..25ccb52e9b18 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/chunkenc" - ingesterclient "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/chunkenc" + ingesterclient "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" ) // unsafeGetString is like yolostring but with a meaningful name diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util_test.go index 7d015316017a..7e6be7bb1414 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/compactor/util_test.go @@ -15,18 +15,18 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb" - shipper_util "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb" + shipper_util "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) func dayFromTime(t model.Time) config.DayTime { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/index.go b/pkg/storage/stores/shipper/indexshipper/boltdb/index.go index 6d548f02c334..aa0a615c00eb 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/index.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/index.go @@ -13,11 +13,11 @@ import ( "github.com/go-kit/log/level" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - series_index "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + series_index "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const TempFileSuffix = ".temp" diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/index_client.go b/pkg/storage/stores/shipper/indexshipper/boltdb/index_client.go index c60c7feeebce..07f67c4f35ed 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/index_client.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/index_client.go @@ -13,12 +13,12 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - series_index "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/downloads" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + series_index "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/downloads" ) type indexClientMetrics struct { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/querier.go b/pkg/storage/stores/shipper/indexshipper/boltdb/querier.go index 54d6034b36be..e27f4fb20dcc 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/querier.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/querier.go @@ -7,9 +7,9 @@ import ( "github.com/grafana/dskit/tenant" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/stores/series/index" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" ) type Writer interface { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/table.go b/pkg/storage/stores/shipper/indexshipper/boltdb/table.go index 0db3ffa7f0a6..a5ed2ff0009a 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/table.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/table.go @@ -15,11 +15,11 @@ import ( "github.com/grafana/dskit/tenant" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/series/index" - shipper_util "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + shipper_util "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager.go b/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager.go index 29fa04deb326..4bc00d082d29 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager.go @@ -16,12 +16,12 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" ) type tableManagerMetrics struct { diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager_test.go index 2f8b9f2d4b05..9cd73fe3e60c 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/table_manager_test.go @@ -12,12 +12,12 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/testutil" ) const indexTablePeriod = 24 * time.Hour diff --git a/pkg/storage/stores/shipper/indexshipper/boltdb/table_test.go b/pkg/storage/stores/shipper/indexshipper/boltdb/table_test.go index 44c583e7966c..4066149c042a 100644 --- a/pkg/storage/stores/shipper/indexshipper/boltdb/table_test.go +++ b/pkg/storage/stores/shipper/indexshipper/boltdb/table_test.go @@ -13,11 +13,11 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/series/index" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/testutil" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/downloads/index_set.go b/pkg/storage/stores/shipper/indexshipper/downloads/index_set.go index f9c12edd9c6f..1be495ed46d9 100644 --- a/pkg/storage/stores/shipper/indexshipper/downloads/index_set.go +++ b/pkg/storage/stores/shipper/indexshipper/downloads/index_set.go @@ -17,11 +17,11 @@ import ( "github.com/grafana/dskit/concurrency" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/downloads/index_set_test.go b/pkg/storage/stores/shipper/indexshipper/downloads/index_set_test.go index a0cadf1da6cd..5a2f6522de9f 100644 --- a/pkg/storage/stores/shipper/indexshipper/downloads/index_set_test.go +++ b/pkg/storage/stores/shipper/indexshipper/downloads/index_set_test.go @@ -9,10 +9,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func buildTestIndexSet(t *testing.T, userID, path string) (*indexSet, stopFunc) { diff --git a/pkg/storage/stores/shipper/indexshipper/downloads/table.go b/pkg/storage/stores/shipper/indexshipper/downloads/table.go index 47c78924f2f5..476786130059 100644 --- a/pkg/storage/stores/shipper/indexshipper/downloads/table.go +++ b/pkg/storage/stores/shipper/indexshipper/downloads/table.go @@ -15,11 +15,11 @@ import ( "github.com/pkg/errors" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) // timeout for downloading initial files for a table to avoid leaking resources by allowing it to take all the time. diff --git a/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go b/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go index 8d3875afe75c..12e8a9373ed7 100644 --- a/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go +++ b/pkg/storage/stores/shipper/indexshipper/downloads/table_manager.go @@ -14,12 +14,12 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/compactor/deletion" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/compactor/deletion" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/validation" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/downloads/table_manager_test.go b/pkg/storage/stores/shipper/indexshipper/downloads/table_manager_test.go index b02912381e9d..e8d9e3efcc8d 100644 --- a/pkg/storage/stores/shipper/indexshipper/downloads/table_manager_test.go +++ b/pkg/storage/stores/shipper/indexshipper/downloads/table_manager_test.go @@ -11,11 +11,11 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/validation" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/downloads/table_test.go b/pkg/storage/stores/shipper/indexshipper/downloads/table_test.go index cc88451704b6..a12bfc70cbc6 100644 --- a/pkg/storage/stores/shipper/indexshipper/downloads/table_test.go +++ b/pkg/storage/stores/shipper/indexshipper/downloads/table_test.go @@ -12,9 +12,9 @@ import ( "github.com/pkg/errors" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client.go b/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client.go index a2054e806b0c..472f6c019e85 100644 --- a/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client.go +++ b/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client.go @@ -26,15 +26,15 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" - "github.com/grafana/loki/pkg/distributor/clientpool" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/discovery" - util_math "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/distributor/clientpool" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/discovery" + util_math "github.com/grafana/loki/v3/pkg/util/math" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client_test.go b/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client_test.go index 0ec6e81c1775..1dd1bff4abf0 100644 --- a/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client_test.go +++ b/pkg/storage/stores/shipper/indexshipper/gatewayclient/gateway_client_test.go @@ -20,12 +20,12 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/distributor/clientpool" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/distributor/clientpool" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/validation" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/gatewayclient/index_gateway_grpc_pool.go b/pkg/storage/stores/shipper/indexshipper/gatewayclient/index_gateway_grpc_pool.go index a769bb55c11e..825809a252f2 100644 --- a/pkg/storage/stores/shipper/indexshipper/gatewayclient/index_gateway_grpc_pool.go +++ b/pkg/storage/stores/shipper/indexshipper/gatewayclient/index_gateway_grpc_pool.go @@ -7,7 +7,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/health/grpc_health_v1" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // IndexGatewayGRPCPool represents a pool of gRPC connections to different index gateway instances. diff --git a/pkg/storage/stores/shipper/indexshipper/indexgateway/config.go b/pkg/storage/stores/shipper/indexshipper/indexgateway/config.go index eb5c134a5de1..e27af9516de0 100644 --- a/pkg/storage/stores/shipper/indexshipper/indexgateway/config.go +++ b/pkg/storage/stores/shipper/indexshipper/indexgateway/config.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/util/ring" + "github.com/grafana/loki/v3/pkg/util/ring" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway.go b/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway.go index 60bf8f1f7c11..99b79bd9922a 100644 --- a/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway.go +++ b/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway.go @@ -18,20 +18,20 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/plan" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores" - "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - seriesindex "github.com/grafana/loki/pkg/storage/stores/series/index" - tsdb_index "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/plan" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores" + "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + seriesindex "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + tsdb_index "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway_test.go b/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway_test.go index 52518f3995b7..bf6af7cb5110 100644 --- a/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway_test.go +++ b/pkg/storage/stores/shipper/indexshipper/indexgateway/gateway_test.go @@ -14,16 +14,16 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/logproto" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - tsdb_index "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - util_test "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" - util_math "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/logproto" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + tsdb_index "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + util_test "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" + util_math "github.com/grafana/loki/v3/pkg/util/math" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/indexgateway/grpc.go b/pkg/storage/stores/shipper/indexshipper/indexgateway/grpc.go index de8edda70c08..b2f6c16bda43 100644 --- a/pkg/storage/stores/shipper/indexshipper/indexgateway/grpc.go +++ b/pkg/storage/stores/shipper/indexshipper/indexgateway/grpc.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promauto" "google.golang.org/grpc" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) type ServerInterceptors struct { diff --git a/pkg/storage/stores/shipper/indexshipper/indexgateway/metrics.go b/pkg/storage/stores/shipper/indexshipper/indexgateway/metrics.go index dcf517ea468b..6ea51e562384 100644 --- a/pkg/storage/stores/shipper/indexshipper/indexgateway/metrics.go +++ b/pkg/storage/stores/shipper/indexshipper/indexgateway/metrics.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/indexgateway/shufflesharding.go b/pkg/storage/stores/shipper/indexshipper/indexgateway/shufflesharding.go index c82efac95f02..07bd2e8aa97b 100644 --- a/pkg/storage/stores/shipper/indexshipper/indexgateway/shufflesharding.go +++ b/pkg/storage/stores/shipper/indexshipper/indexgateway/shufflesharding.go @@ -4,7 +4,7 @@ import ( "github.com/grafana/dskit/ring" "github.com/pkg/errors" - lokiring "github.com/grafana/loki/pkg/util/ring" + lokiring "github.com/grafana/loki/v3/pkg/util/ring" ) var ( diff --git a/pkg/storage/stores/shipper/indexshipper/shipper.go b/pkg/storage/stores/shipper/indexshipper/shipper.go index abfda3b73310..169f7eeb79fe 100644 --- a/pkg/storage/stores/shipper/indexshipper/shipper.go +++ b/pkg/storage/stores/shipper/indexshipper/shipper.go @@ -14,14 +14,14 @@ import ( "github.com/prometheus/client_golang/prometheus" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/downloads" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/gatewayclient" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/uploads" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/downloads" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/gatewayclient" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/uploads" ) type Mode string diff --git a/pkg/storage/stores/shipper/indexshipper/storage/cached_client.go b/pkg/storage/stores/shipper/indexshipper/storage/cached_client.go index f74c3ea8b4ac..c7d909bc0984 100644 --- a/pkg/storage/stores/shipper/indexshipper/storage/cached_client.go +++ b/pkg/storage/stores/shipper/indexshipper/storage/cached_client.go @@ -11,9 +11,9 @@ import ( "github.com/go-kit/log/level" "golang.org/x/sync/singleflight" - "github.com/grafana/loki/pkg/storage/chunk/client" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/spanlogger" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/spanlogger" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/storage/cached_client_test.go b/pkg/storage/stores/shipper/indexshipper/storage/cached_client_test.go index 6e2c8a5def26..78c04bd4dc3e 100644 --- a/pkg/storage/stores/shipper/indexshipper/storage/cached_client_test.go +++ b/pkg/storage/stores/shipper/indexshipper/storage/cached_client_test.go @@ -11,9 +11,9 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" ) var objectsMtime = time.Now().Local() diff --git a/pkg/storage/stores/shipper/indexshipper/storage/client.go b/pkg/storage/stores/shipper/indexshipper/storage/client.go index e8a3f30a2d82..d63504cd3309 100644 --- a/pkg/storage/stores/shipper/indexshipper/storage/client.go +++ b/pkg/storage/stores/shipper/indexshipper/storage/client.go @@ -7,7 +7,7 @@ import ( "strings" "time" - "github.com/grafana/loki/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" ) const delimiter = "/" diff --git a/pkg/storage/stores/shipper/indexshipper/storage/client_test.go b/pkg/storage/stores/shipper/indexshipper/storage/client_test.go index c9b7da78b3a3..1f766e011380 100644 --- a/pkg/storage/stores/shipper/indexshipper/storage/client_test.go +++ b/pkg/storage/stores/shipper/indexshipper/storage/client_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" ) func TestIndexStorageClient(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/storage/util_test.go b/pkg/storage/stores/shipper/indexshipper/storage/util_test.go index 3136d553c8d2..330602821d78 100644 --- a/pkg/storage/stores/shipper/indexshipper/storage/util_test.go +++ b/pkg/storage/stores/shipper/indexshipper/storage/util_test.go @@ -10,9 +10,9 @@ import ( gzip "github.com/klauspost/pgzip" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func Test_GetFileFromStorage(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/table_client.go b/pkg/storage/stores/shipper/indexshipper/table_client.go index 2d7de63006a6..6492dd94943e 100644 --- a/pkg/storage/stores/shipper/indexshipper/table_client.go +++ b/pkg/storage/stores/shipper/indexshipper/table_client.go @@ -3,10 +3,10 @@ package indexshipper import ( "context" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" ) type tableClient struct { diff --git a/pkg/storage/stores/shipper/indexshipper/table_client_test.go b/pkg/storage/stores/shipper/indexshipper/table_client_test.go index 0b76ab64f99c..7b84b74beeef 100644 --- a/pkg/storage/stores/shipper/indexshipper/table_client_test.go +++ b/pkg/storage/stores/shipper/indexshipper/table_client_test.go @@ -8,8 +8,8 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) func TestBoltDBShipperTableClient(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/testutil/testutil.go b/pkg/storage/stores/shipper/indexshipper/testutil/testutil.go index 6022128e36d4..48f5990dc079 100644 --- a/pkg/storage/stores/shipper/indexshipper/testutil/testutil.go +++ b/pkg/storage/stores/shipper/indexshipper/testutil/testutil.go @@ -16,9 +16,9 @@ import ( "github.com/stretchr/testify/require" "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) func AddRecordsToDB(t testing.TB, path string, start, numRecords int, bucketName []byte) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/builder.go b/pkg/storage/stores/shipper/indexshipper/tsdb/builder.go index ee59debb2e07..0e7af08d4d24 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/builder.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/builder.go @@ -12,8 +12,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" - chunk_util "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + chunk_util "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // Builder is a helper used to create tsdb indices. diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/builder_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/builder_test.go index 539cdd57fc5a..9ccf972151a1 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/builder_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/builder_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func Test_Build(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go index c88b0e124c9b..5c2ae28d8935 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor.go @@ -14,13 +14,13 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/compactor" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - tsdbindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/compactor" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + tsdbindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) const readDBsConcurrency = 50 diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go index 5032f6df085f..5f8a5b1e6d9d 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/compactor_test.go @@ -17,17 +17,17 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/compactor" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/compactor" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/head.go b/pkg/storage/stores/shipper/indexshipper/tsdb/head.go index 4c841b374146..00e4f86b9ad9 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/head.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/head.go @@ -22,7 +22,7 @@ import ( "github.com/prometheus/prometheus/storage" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) /* diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager.go b/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager.go index ad285bc32b15..5df88b04071e 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager.go @@ -21,10 +21,10 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/util/wal" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/util/wal" ) /* diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager_test.go index c58e55645717..daa2e0bafa58 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/head_manager_test.go @@ -18,14 +18,14 @@ import ( "github.com/grafana/dskit/flagext" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/validation" ) type noopTSDBManager struct { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/head_read.go b/pkg/storage/stores/shipper/indexshipper/tsdb/head_read.go index 203e951a435d..3a0cf3cdbfc7 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/head_read.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/head_read.go @@ -21,7 +21,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // Index returns an IndexReader against the block. diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal.go b/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal.go index 386067ff5dbb..d1a3dcf2dc04 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal.go @@ -8,8 +8,8 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/wlog" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/util/encoding" ) type WAL interface { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal_test.go index 28255a4a7ec8..5e9b5e7d505f 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/head_wal_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/prometheus/tsdb/record" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func Test_Encoding_Series(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index.go index 475446b15090..a60b86b6a6e0 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index.go @@ -6,9 +6,9 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" ) type Series struct { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk.go index c5f107478c53..8094e19af0c5 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk.go @@ -5,8 +5,8 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/encoding" ) // Meta holds information about a chunk of data. diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk_test.go index 1eab509d489a..a1f98f1ab71a 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index/chunk_test.go @@ -8,7 +8,7 @@ import ( tsdb_enc "github.com/prometheus/prometheus/tsdb/encoding" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/util/encoding" ) // Test all sort variants diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index/index.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index/index.go index 7aa429d36771..8d6f316acfa5 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index/index.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index/index.go @@ -38,7 +38,7 @@ import ( tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" "github.com/prometheus/prometheus/tsdb/fileutil" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/util/encoding" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index/index_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index/index_test.go index 6ef9ebee0110..2f8576b82564 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index/index_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index/index_test.go @@ -35,7 +35,7 @@ import ( tsdb_enc "github.com/prometheus/prometheus/tsdb/encoding" "github.com/prometheus/prometheus/util/testutil" - "github.com/grafana/loki/pkg/util/encoding" + "github.com/grafana/loki/v3/pkg/util/encoding" ) func TestMain(m *testing.M) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index_client.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index_client.go index 1a2115b26cdb..47d33fe632fa 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index_client.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index_client.go @@ -6,23 +6,23 @@ import ( "sync" "time" - "github.com/grafana/loki/pkg/logql" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/logql" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" "github.com/opentracing/opentracing-go" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util" ) // implements stores.Index diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index_client_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index_client_test.go index 596e53e62009..c823a6152828 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index_client_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index_client_test.go @@ -11,10 +11,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" ) type mockIndexShipperIndexIterator struct { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/index_shipper_querier.go b/pkg/storage/stores/shipper/indexshipper/tsdb/index_shipper_querier.go index dbc94b18c027..b0d1824936d5 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/index_shipper_querier.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/index_shipper_querier.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/config" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - tsdbindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/config" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + tsdbindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) type indexShipperIterator interface { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/lazy_index.go b/pkg/storage/stores/shipper/indexshipper/tsdb/lazy_index.go index db7b0e04720e..ad3fb3b08620 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/lazy_index.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/lazy_index.go @@ -6,8 +6,8 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // Index adapter for a function which returns an index when queried. diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/manager.go b/pkg/storage/stores/shipper/indexshipper/tsdb/manager.go index 78ef447169cc..0fed45d3252e 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/manager.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/manager.go @@ -15,10 +15,10 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // nolint:revive diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index.go b/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index.go index c0d2080bcbe3..0c6044843026 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "golang.org/x/sync/errgroup" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) type MultiIndex struct { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index_test.go index 945402f954f5..8139c52b39fc 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/multi_file_index_test.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func TestMultiIndex(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/multitenant.go b/pkg/storage/stores/shipper/indexshipper/tsdb/multitenant.go index 52de31078673..403443a805c0 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/multitenant.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/multitenant.go @@ -7,8 +7,8 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // TenantLabel is part of the reserved label namespace (__ prefix) diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/pool.go b/pkg/storage/stores/shipper/indexshipper/tsdb/pool.go index f5a009d37bc1..fd1ad9758763 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/pool.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/pool.go @@ -3,7 +3,7 @@ package tsdb import ( "sync" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) var ( diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/querier.go b/pkg/storage/stores/shipper/indexshipper/tsdb/querier.go index b1e3306b14d1..48de47a70c3b 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/querier.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/querier.go @@ -22,7 +22,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // Bitmap used by func isRegexMetaCharacter to check whether a character needs to be escaped. diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/querier_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/querier_test.go index a0873faeb6a2..a3c5caf5b81c 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/querier_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/querier_test.go @@ -10,8 +10,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func mustParseLabels(s string) labels.Labels { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/for_series.go b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/for_series.go index 362665a02277..bca81214dc9c 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/for_series.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/for_series.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) // General purpose iteration over series. Makes it easier to build custom functionality on top of indices diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power.go b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power.go index 299cc21ea197..257c198ee2d7 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power.go @@ -5,8 +5,8 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power_test.go index 5134b25c5cde..940d6a53b554 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/power_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" ) func TestGuessShardFactor(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding.go b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding.go index 284468a9de31..b7f0e8cd4629 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding.go @@ -5,9 +5,9 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/queue" - "github.com/grafana/loki/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/queue" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" ) var ( diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding_test.go index 49a3b12a8ff6..fc476223848a 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/sharding/sharding_test.go @@ -8,8 +8,8 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" ) func TestSizedFPs_Sort(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index.go b/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index.go index b7bff50e52d2..7934b952ba88 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index.go @@ -15,12 +15,12 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ErrAlreadyOnDesiredVersion = errors.New("tsdb file already on desired version") diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index_test.go index 9d7b80ce161f..068630c553a0 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/single_file_index_test.go @@ -12,11 +12,11 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/stores/index/seriesvolume" - "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/stores/index/seriesvolume" + "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func TestSingleIdx(t *testing.T) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/store.go b/pkg/storage/stores/shipper/indexshipper/tsdb/store.go index 8f97997c5d40..1ef58c32a1e5 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/store.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/store.go @@ -13,14 +13,14 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/downloads" - tsdbindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/downloads" + tsdbindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) type IndexWriter interface { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/testutil/objstore.go b/pkg/storage/stores/shipper/indexshipper/tsdb/testutil/objstore.go index a5a3651a7a13..2a3a6ca57eec 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/testutil/objstore.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/testutil/objstore.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/require" "github.com/thanos-io/objstore" - "github.com/grafana/loki/pkg/storage/bucket/filesystem" + "github.com/grafana/loki/v3/pkg/storage/bucket/filesystem" ) func PrepareFilesystemBucket(t testing.TB) (objstore.Bucket, string) { diff --git a/pkg/storage/stores/shipper/indexshipper/tsdb/util_test.go b/pkg/storage/stores/shipper/indexshipper/tsdb/util_test.go index 64827a926e46..10957a3510b8 100644 --- a/pkg/storage/stores/shipper/indexshipper/tsdb/util_test.go +++ b/pkg/storage/stores/shipper/indexshipper/tsdb/util_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) type LoadableSeries struct { diff --git a/pkg/storage/stores/shipper/indexshipper/uploads/index_set.go b/pkg/storage/stores/shipper/indexshipper/uploads/index_set.go index 7cbe4b21b4d8..19bf88842b02 100644 --- a/pkg/storage/stores/shipper/indexshipper/uploads/index_set.go +++ b/pkg/storage/stores/shipper/indexshipper/uploads/index_set.go @@ -11,10 +11,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type IndexSet interface { diff --git a/pkg/storage/stores/shipper/indexshipper/uploads/index_set_test.go b/pkg/storage/stores/shipper/indexshipper/uploads/index_set_test.go index d6d772734195..cc9b65e28588 100644 --- a/pkg/storage/stores/shipper/indexshipper/uploads/index_set_test.go +++ b/pkg/storage/stores/shipper/indexshipper/uploads/index_set_test.go @@ -10,10 +10,10 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/testutil" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/testutil" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const userID = "user-id" diff --git a/pkg/storage/stores/shipper/indexshipper/uploads/table.go b/pkg/storage/stores/shipper/indexshipper/uploads/table.go index 2e092ce3727a..44698834a344 100644 --- a/pkg/storage/stores/shipper/indexshipper/uploads/table.go +++ b/pkg/storage/stores/shipper/indexshipper/uploads/table.go @@ -7,9 +7,9 @@ import ( "github.com/go-kit/log" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/uploads/table_manager.go b/pkg/storage/stores/shipper/indexshipper/uploads/table_manager.go index 6d9aa9e35d48..9fcdf43206c7 100644 --- a/pkg/storage/stores/shipper/indexshipper/uploads/table_manager.go +++ b/pkg/storage/stores/shipper/indexshipper/uploads/table_manager.go @@ -9,8 +9,8 @@ import ( "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" ) type Config struct { diff --git a/pkg/storage/stores/shipper/indexshipper/uploads/table_manager_test.go b/pkg/storage/stores/shipper/indexshipper/uploads/table_manager_test.go index 7013ff389c78..b307ee18d6b9 100644 --- a/pkg/storage/stores/shipper/indexshipper/uploads/table_manager_test.go +++ b/pkg/storage/stores/shipper/indexshipper/uploads/table_manager_test.go @@ -10,9 +10,9 @@ import ( "github.com/go-kit/log" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" ) const objectsStorageDirName = "objects" diff --git a/pkg/storage/stores/shipper/indexshipper/uploads/table_test.go b/pkg/storage/stores/shipper/indexshipper/uploads/table_test.go index f67b3d3571c2..b58b05fa6ad9 100644 --- a/pkg/storage/stores/shipper/indexshipper/uploads/table_test.go +++ b/pkg/storage/stores/shipper/indexshipper/uploads/table_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/util/queries.go b/pkg/storage/stores/shipper/indexshipper/util/queries.go index 8da02c02d979..46291a58a6f5 100644 --- a/pkg/storage/stores/shipper/indexshipper/util/queries.go +++ b/pkg/storage/stores/shipper/indexshipper/util/queries.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/dskit/concurrency" - "github.com/grafana/loki/pkg/storage/stores/series/index" - util_math "github.com/grafana/loki/pkg/util/math" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + util_math "github.com/grafana/loki/v3/pkg/util/math" ) const ( diff --git a/pkg/storage/stores/shipper/indexshipper/util/queries_test.go b/pkg/storage/stores/shipper/indexshipper/util/queries_test.go index 1968a2737a75..a33da42c264f 100644 --- a/pkg/storage/stores/shipper/indexshipper/util/queries_test.go +++ b/pkg/storage/stores/shipper/indexshipper/util/queries_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" ) type mockTableQuerier struct { diff --git a/pkg/storage/stores/shipper/indexshipper/util/util.go b/pkg/storage/stores/shipper/indexshipper/util/util.go index 9150ab34a0cb..f47cea40d6d7 100644 --- a/pkg/storage/stores/shipper/indexshipper/util/util.go +++ b/pkg/storage/stores/shipper/indexshipper/util/util.go @@ -9,7 +9,7 @@ import ( "go.etcd.io/bbolt" - "github.com/grafana/loki/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" ) const maxStackSize = 8 * 1024 diff --git a/pkg/storage/util_test.go b/pkg/storage/util_test.go index 12e8168473af..7743bce2fb0f 100644 --- a/pkg/storage/util_test.go +++ b/pkg/storage/util_test.go @@ -11,24 +11,24 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/assert" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/syntax" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/querier/astmapper" - "github.com/grafana/loki/pkg/querier/plan" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/cache" - chunkclient "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/chunk/fetcher" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores" - index_stats "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - loki_util "github.com/grafana/loki/pkg/util" - "github.com/grafana/loki/pkg/util/constants" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/querier/astmapper" + "github.com/grafana/loki/v3/pkg/querier/plan" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + chunkclient "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/chunk/fetcher" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores" + index_stats "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + loki_util "github.com/grafana/loki/v3/pkg/util" + "github.com/grafana/loki/v3/pkg/util/constants" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/util/config.go b/pkg/util/config.go index f54d469690c9..89d586b37e13 100644 --- a/pkg/util/config.go +++ b/pkg/util/config.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/common/version" "gopkg.in/yaml.v2" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // LogConfig takes a pointer to a config object, marshalls it to YAML and prints each line in REVERSE order diff --git a/pkg/util/deletion/deletion.go b/pkg/util/deletion/deletion.go index e90b6a4c2f07..fd97205a6bf4 100644 --- a/pkg/util/deletion/deletion.go +++ b/pkg/util/deletion/deletion.go @@ -1,10 +1,10 @@ package deletion import ( - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/log" - "github.com/grafana/loki/pkg/logql/syntax" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/logql/syntax" ) func SetupPipeline(req logql.SelectLogParams, p log.Pipeline) (log.Pipeline, error) { diff --git a/pkg/util/dns_watcher.go b/pkg/util/dns_watcher.go index 147af45e19e7..9fa698e872c0 100644 --- a/pkg/util/dns_watcher.go +++ b/pkg/util/dns_watcher.go @@ -9,7 +9,7 @@ import ( "github.com/grafana/dskit/services" "github.com/pkg/errors" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // Notifications about address resolution. All notifications are sent on the same goroutine. diff --git a/pkg/util/errors.go b/pkg/util/errors.go index cb994e1b46ff..f05decc6223c 100644 --- a/pkg/util/errors.go +++ b/pkg/util/errors.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/log" ) // LogError logs any error returned by f; useful when deferring Close etc. diff --git a/pkg/util/extract/extract.go b/pkg/util/extract/extract.go index ad0eab10dcfb..580eba0e2d92 100644 --- a/pkg/util/extract/extract.go +++ b/pkg/util/extract/extract.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) var errNoMetricNameLabel = fmt.Errorf("No metric name label") diff --git a/pkg/util/flagext/labelset.go b/pkg/util/flagext/labelset.go index 859e7eb07246..79a72c07739e 100644 --- a/pkg/util/flagext/labelset.go +++ b/pkg/util/flagext/labelset.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/common/model" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) // LabelSet is a labelSet that can be used as a flag. diff --git a/pkg/util/http_test.go b/pkg/util/http_test.go index ba365f777de8..d032085db502 100644 --- a/pkg/util/http_test.go +++ b/pkg/util/http_test.go @@ -15,9 +15,9 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) func TestRenderHTTPResponse(t *testing.T) { diff --git a/pkg/util/httpgrpc/carrier.go b/pkg/util/httpgrpc/carrier.go index ab1753ef6c27..6b160d615e1b 100644 --- a/pkg/util/httpgrpc/carrier.go +++ b/pkg/util/httpgrpc/carrier.go @@ -4,7 +4,7 @@ import ( weaveworks_httpgrpc "github.com/grafana/dskit/httpgrpc" "github.com/opentracing/opentracing-go" - "github.com/grafana/loki/pkg/querier/queryrange" + "github.com/grafana/loki/v3/pkg/querier/queryrange" ) type Request interface { diff --git a/pkg/util/limiter/combined_limits.go b/pkg/util/limiter/combined_limits.go index ba0bf50e8003..b1bc467e6cac 100644 --- a/pkg/util/limiter/combined_limits.go +++ b/pkg/util/limiter/combined_limits.go @@ -1,17 +1,17 @@ package limiter import ( - "github.com/grafana/loki/pkg/bloomcompactor" - "github.com/grafana/loki/pkg/bloomgateway" - "github.com/grafana/loki/pkg/compactor" - "github.com/grafana/loki/pkg/distributor" - "github.com/grafana/loki/pkg/ingester" - querier_limits "github.com/grafana/loki/pkg/querier/limits" - queryrange_limits "github.com/grafana/loki/pkg/querier/queryrange/limits" - "github.com/grafana/loki/pkg/ruler" - scheduler_limits "github.com/grafana/loki/pkg/scheduler/limits" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/bloomcompactor" + "github.com/grafana/loki/v3/pkg/bloomgateway" + "github.com/grafana/loki/v3/pkg/compactor" + "github.com/grafana/loki/v3/pkg/distributor" + "github.com/grafana/loki/v3/pkg/ingester" + querier_limits "github.com/grafana/loki/v3/pkg/querier/limits" + queryrange_limits "github.com/grafana/loki/v3/pkg/querier/queryrange/limits" + "github.com/grafana/loki/v3/pkg/ruler" + scheduler_limits "github.com/grafana/loki/v3/pkg/scheduler/limits" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" ) type CombinedLimits interface { diff --git a/pkg/util/limiter/query_limiter.go b/pkg/util/limiter/query_limiter.go index a827ad82227a..430eee3ebc8b 100644 --- a/pkg/util/limiter/query_limiter.go +++ b/pkg/util/limiter/query_limiter.go @@ -8,8 +8,8 @@ import ( "github.com/prometheus/common/model" "go.uber.org/atomic" - "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/logproto" ) type queryLimiterCtxKey struct{} diff --git a/pkg/util/log/experimental.go b/pkg/util/log/experimental.go index ed26c06af347..30aa39c33f3a 100644 --- a/pkg/util/log/experimental.go +++ b/pkg/util/log/experimental.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) var experimentalFeaturesInUse = promauto.NewCounter( diff --git a/pkg/util/log/log.go b/pkg/util/log/log.go index 7453b615118a..93ccb86abf57 100644 --- a/pkg/util/log/log.go +++ b/pkg/util/log/log.go @@ -16,7 +16,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" ) var ( diff --git a/pkg/util/loser/tree_test.go b/pkg/util/loser/tree_test.go index 956b420f129e..9c6f5f1c2e99 100644 --- a/pkg/util/loser/tree_test.go +++ b/pkg/util/loser/tree_test.go @@ -4,7 +4,7 @@ import ( "math" "testing" - "github.com/grafana/loki/pkg/util/loser" + "github.com/grafana/loki/v3/pkg/util/loser" ) type List struct { diff --git a/pkg/util/marshal/labels.go b/pkg/util/marshal/labels.go index 8998f133b921..016e4bad44bd 100644 --- a/pkg/util/marshal/labels.go +++ b/pkg/util/marshal/labels.go @@ -3,7 +3,7 @@ package marshal import ( "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) // NewLabelSet constructs a Labelset from a promql metric list as a string diff --git a/pkg/util/marshal/labels_test.go b/pkg/util/marshal/labels_test.go index 8095ec3a1a90..b877e3ba675c 100644 --- a/pkg/util/marshal/labels_test.go +++ b/pkg/util/marshal/labels_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/grafana/loki/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/loghttp" ) func TestNewLabelSet(t *testing.T) { diff --git a/pkg/util/marshal/legacy/marshal.go b/pkg/util/marshal/legacy/marshal.go index 867268f8e59e..82dd100999bb 100644 --- a/pkg/util/marshal/legacy/marshal.go +++ b/pkg/util/marshal/legacy/marshal.go @@ -9,9 +9,9 @@ import ( "github.com/gorilla/websocket" json "github.com/json-iterator/go" - loghttp "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" + loghttp "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) // Note that the below methods directly marshal the values passed in. This is because these objects currently marshal diff --git a/pkg/util/marshal/legacy/marshal_test.go b/pkg/util/marshal/legacy/marshal_test.go index e146e9a99a5f..b535a390479f 100644 --- a/pkg/util/marshal/legacy/marshal_test.go +++ b/pkg/util/marshal/legacy/marshal_test.go @@ -9,9 +9,9 @@ import ( json "github.com/json-iterator/go" "github.com/stretchr/testify/require" - loghttp "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" + loghttp "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" ) // covers responses from /api/prom/query diff --git a/pkg/util/marshal/marshal.go b/pkg/util/marshal/marshal.go index 08c90a348c2b..b720bfa557bd 100644 --- a/pkg/util/marshal/marshal.go +++ b/pkg/util/marshal/marshal.go @@ -11,14 +11,14 @@ import ( jsoniter "github.com/json-iterator/go" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/loghttp" - legacy "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - indexStats "github.com/grafana/loki/pkg/storage/stores/index/stats" - "github.com/grafana/loki/pkg/util/httpreq" - marshal_legacy "github.com/grafana/loki/pkg/util/marshal/legacy" + "github.com/grafana/loki/v3/pkg/loghttp" + legacy "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + indexStats "github.com/grafana/loki/v3/pkg/storage/stores/index/stats" + "github.com/grafana/loki/v3/pkg/util/httpreq" + marshal_legacy "github.com/grafana/loki/v3/pkg/util/marshal/legacy" ) func WriteResponseJSON(r *http.Request, v any, w http.ResponseWriter) error { diff --git a/pkg/util/marshal/marshal_test.go b/pkg/util/marshal/marshal_test.go index 7917be41dae7..ba2acf5ee85e 100644 --- a/pkg/util/marshal/marshal_test.go +++ b/pkg/util/marshal/marshal_test.go @@ -15,12 +15,12 @@ import ( "github.com/prometheus/prometheus/promql/parser" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - legacy "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/loghttp" + legacy "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) const emptyStats = `{ diff --git a/pkg/util/marshal/query.go b/pkg/util/marshal/query.go index 8f41915c720a..4591d851c553 100644 --- a/pkg/util/marshal/query.go +++ b/pkg/util/marshal/query.go @@ -12,12 +12,12 @@ import ( "github.com/prometheus/prometheus/promql" "github.com/prometheus/prometheus/promql/parser" - "github.com/grafana/loki/pkg/loghttp" - legacy "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logqlmodel" - "github.com/grafana/loki/pkg/logqlmodel/stats" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/loghttp" + legacy "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logqlmodel" + "github.com/grafana/loki/v3/pkg/logqlmodel/stats" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) // NewResultValue constructs a ResultValue from a promql.Value diff --git a/pkg/util/marshal/tail.go b/pkg/util/marshal/tail.go index 222b76c046b7..4dbada1d8381 100644 --- a/pkg/util/marshal/tail.go +++ b/pkg/util/marshal/tail.go @@ -1,8 +1,8 @@ package marshal import ( - "github.com/grafana/loki/pkg/loghttp" - legacy "github.com/grafana/loki/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/loghttp" + legacy "github.com/grafana/loki/v3/pkg/loghttp/legacy" ) // NewDroppedStream constructs a DroppedStream from a legacy.DroppedEntry diff --git a/pkg/util/metrics_helper.go b/pkg/util/metrics_helper.go index 58733c1c1e9e..e4572b4e4a15 100644 --- a/pkg/util/metrics_helper.go +++ b/pkg/util/metrics_helper.go @@ -13,7 +13,7 @@ import ( "github.com/prometheus/prometheus/model/labels" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) var ( diff --git a/pkg/util/querylimits/limiter.go b/pkg/util/querylimits/limiter.go index 051e31270f13..9510a3fdc825 100644 --- a/pkg/util/querylimits/limiter.go +++ b/pkg/util/querylimits/limiter.go @@ -8,8 +8,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/loki/pkg/util/limiter" - logutil "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/limiter" + logutil "github.com/grafana/loki/v3/pkg/util/log" ) type Limiter struct { diff --git a/pkg/util/querylimits/limiter_test.go b/pkg/util/querylimits/limiter_test.go index ad80fa34ec18..549972d32a2e 100644 --- a/pkg/util/querylimits/limiter_test.go +++ b/pkg/util/querylimits/limiter_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/validation" ) type mockTenantLimits struct { diff --git a/pkg/util/querylimits/middleware.go b/pkg/util/querylimits/middleware.go index 58a93ad850f6..a25d53949ba1 100644 --- a/pkg/util/querylimits/middleware.go +++ b/pkg/util/querylimits/middleware.go @@ -7,7 +7,7 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/dskit/middleware" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type queryLimitsMiddleware struct { diff --git a/pkg/util/querylimits/propagation.go b/pkg/util/querylimits/propagation.go index f0e5fbc8f6b4..a9cb06e347ca 100644 --- a/pkg/util/querylimits/propagation.go +++ b/pkg/util/querylimits/propagation.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/util/flagext" ) // Context key type used to avoid collisions diff --git a/pkg/util/ring/ring.go b/pkg/util/ring/ring.go index bc8b2576984e..27de64642497 100644 --- a/pkg/util/ring/ring.go +++ b/pkg/util/ring/ring.go @@ -5,7 +5,7 @@ import ( "github.com/grafana/dskit/ring" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) // TokenFor generates a token used for finding ingesters from ring diff --git a/pkg/util/ring/ring_config.go b/pkg/util/ring/ring_config.go index 779c40f4dad5..d64bea1759cc 100644 --- a/pkg/util/ring/ring_config.go +++ b/pkg/util/ring/ring_config.go @@ -15,8 +15,8 @@ import ( "github.com/grafana/dskit/netutil" "github.com/grafana/dskit/ring" - util_flagext "github.com/grafana/loki/pkg/util/flagext" - util_log "github.com/grafana/loki/pkg/util/log" + util_flagext "github.com/grafana/loki/v3/pkg/util/flagext" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // RingConfig masks the ring lifecycler config which contains diff --git a/pkg/util/server/error.go b/pkg/util/server/error.go index 65cb430bb3f3..c120a79176f8 100644 --- a/pkg/util/server/error.go +++ b/pkg/util/server/error.go @@ -14,9 +14,9 @@ import ( "github.com/gogo/googleapis/google/rpc" "github.com/gogo/status" - "github.com/grafana/loki/pkg/logqlmodel" - storage_errors "github.com/grafana/loki/pkg/storage/errors" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logqlmodel" + storage_errors "github.com/grafana/loki/v3/pkg/storage/errors" + "github.com/grafana/loki/v3/pkg/util" ) // StatusClientClosedRequest is the status code for when a client request cancellation of an http request diff --git a/pkg/util/server/error_test.go b/pkg/util/server/error_test.go index 47b2453f1492..69f2bff163c6 100644 --- a/pkg/util/server/error_test.go +++ b/pkg/util/server/error_test.go @@ -16,9 +16,9 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc/codes" - "github.com/grafana/loki/pkg/logqlmodel" - storage_errors "github.com/grafana/loki/pkg/storage/errors" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/logqlmodel" + storage_errors "github.com/grafana/loki/v3/pkg/storage/errors" + "github.com/grafana/loki/v3/pkg/util" ) func Test_writeError(t *testing.T) { diff --git a/pkg/util/server/grpc_headers.go b/pkg/util/server/grpc_headers.go index 3b205a73d10d..27f5bb9a75d6 100644 --- a/pkg/util/server/grpc_headers.go +++ b/pkg/util/server/grpc_headers.go @@ -6,7 +6,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) func injectHTTPHeadersIntoGRPCRequest(ctx context.Context) context.Context { diff --git a/pkg/util/server/grpc_headers_test.go b/pkg/util/server/grpc_headers_test.go index db222451f4bd..1c0e728659b8 100644 --- a/pkg/util/server/grpc_headers_test.go +++ b/pkg/util/server/grpc_headers_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) func TestInjectHTTPHeaderIntoGRPCRequest(t *testing.T) { diff --git a/pkg/util/server/grpc_query_tags.go b/pkg/util/server/grpc_query_tags.go index d5d6e58d2c93..cfd5e95ff23d 100644 --- a/pkg/util/server/grpc_query_tags.go +++ b/pkg/util/server/grpc_query_tags.go @@ -6,7 +6,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) func getQueryTags(ctx context.Context) string { diff --git a/pkg/util/server/grpc_query_tags_test.go b/pkg/util/server/grpc_query_tags_test.go index ae718178caa0..733cd488dce7 100644 --- a/pkg/util/server/grpc_query_tags_test.go +++ b/pkg/util/server/grpc_query_tags_test.go @@ -7,7 +7,7 @@ import ( "github.com/stretchr/testify/require" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/util/httpreq" + "github.com/grafana/loki/v3/pkg/util/httpreq" ) func TestInjectQueryTagsIntoGRPCRequest(t *testing.T) { diff --git a/pkg/util/server/recovery.go b/pkg/util/server/recovery.go index 713d77e44a30..ce3ad109512b 100644 --- a/pkg/util/server/recovery.go +++ b/pkg/util/server/recovery.go @@ -13,8 +13,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/util/constants" ) const maxStacksize = 8 * 1024 diff --git a/pkg/util/server/recovery_test.go b/pkg/util/server/recovery_test.go index 3a98b01b1beb..a8d1d3f1b6b9 100644 --- a/pkg/util/server/recovery_test.go +++ b/pkg/util/server/recovery_test.go @@ -10,7 +10,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/metadata" - "github.com/grafana/loki/pkg/querier/queryrange/queryrangebase" + "github.com/grafana/loki/v3/pkg/querier/queryrange/queryrangebase" ) func Test_onPanic(t *testing.T) { diff --git a/pkg/util/spanlogger/spanlogger.go b/pkg/util/spanlogger/spanlogger.go index dbbf7679f7c7..03ba8ab06e2d 100644 --- a/pkg/util/spanlogger/spanlogger.go +++ b/pkg/util/spanlogger/spanlogger.go @@ -7,7 +7,7 @@ import ( "github.com/grafana/dskit/spanlogger" "github.com/grafana/dskit/tenant" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/pkg/util/time.go b/pkg/util/time.go index b943fea92aad..9de06f381c88 100644 --- a/pkg/util/time.go +++ b/pkg/util/time.go @@ -10,7 +10,7 @@ import ( "github.com/grafana/dskit/httpgrpc" "github.com/prometheus/common/model" - utilsMath "github.com/grafana/loki/pkg/util/math" + utilsMath "github.com/grafana/loki/v3/pkg/util/math" ) const ( diff --git a/pkg/util/unmarshal/legacy/unmarshal.go b/pkg/util/unmarshal/legacy/unmarshal.go index 0f62b6df04c5..5a58ca6bbfed 100644 --- a/pkg/util/unmarshal/legacy/unmarshal.go +++ b/pkg/util/unmarshal/legacy/unmarshal.go @@ -5,7 +5,7 @@ import ( json "github.com/json-iterator/go" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // DecodePushRequest directly decodes json to a logproto.PushRequest diff --git a/pkg/util/unmarshal/legacy/unmarshal_test.go b/pkg/util/unmarshal/legacy/unmarshal_test.go index 780a5ed268ed..dc51815890df 100644 --- a/pkg/util/unmarshal/legacy/unmarshal_test.go +++ b/pkg/util/unmarshal/legacy/unmarshal_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logproto" ) // covers requests to /api/prom/push diff --git a/pkg/util/unmarshal/unmarshal.go b/pkg/util/unmarshal/unmarshal.go index 51e7d1108d9d..4b048d7089c6 100644 --- a/pkg/util/unmarshal/unmarshal.go +++ b/pkg/util/unmarshal/unmarshal.go @@ -6,8 +6,8 @@ import ( jsoniter "github.com/json-iterator/go" - "github.com/grafana/loki/pkg/loghttp" - "github.com/grafana/loki/pkg/logproto" + "github.com/grafana/loki/v3/pkg/loghttp" + "github.com/grafana/loki/v3/pkg/logproto" ) // DecodePushRequest directly decodes json to a logproto.PushRequest diff --git a/pkg/util/unmarshal/unmarshal_test.go b/pkg/util/unmarshal/unmarshal_test.go index 93372f62ebef..3ae76e1d9fbb 100644 --- a/pkg/util/unmarshal/unmarshal_test.go +++ b/pkg/util/unmarshal/unmarshal_test.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/loghttp" - legacy_loghttp "github.com/grafana/loki/pkg/loghttp/legacy" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/util/marshal" + "github.com/grafana/loki/v3/pkg/loghttp" + legacy_loghttp "github.com/grafana/loki/v3/pkg/loghttp/legacy" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/util/marshal" ) func Test_DecodePushRequest(t *testing.T) { diff --git a/pkg/util/validation/notifications_limit_flag.go b/pkg/util/validation/notifications_limit_flag.go index 1b8524c1ab5b..f05e634e8756 100644 --- a/pkg/util/validation/notifications_limit_flag.go +++ b/pkg/util/validation/notifications_limit_flag.go @@ -6,7 +6,7 @@ import ( "github.com/pkg/errors" - "github.com/grafana/loki/pkg/util" + "github.com/grafana/loki/v3/pkg/util" ) var allowedIntegrationNames = []string{ diff --git a/pkg/validation/exporter.go b/pkg/validation/exporter.go index ad9dde8574dd..78cd13a1dad8 100644 --- a/pkg/validation/exporter.go +++ b/pkg/validation/exporter.go @@ -7,7 +7,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" ) type ExportedLimits interface { diff --git a/pkg/validation/limits.go b/pkg/validation/limits.go index 8c2197113a41..ed8f50844768 100644 --- a/pkg/validation/limits.go +++ b/pkg/validation/limits.go @@ -19,18 +19,18 @@ import ( "golang.org/x/time/rate" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/compactor/deletionmode" - "github.com/grafana/loki/pkg/distributor/shardstreams" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/logql" - "github.com/grafana/loki/pkg/logql/syntax" - ruler_config "github.com/grafana/loki/pkg/ruler/config" - "github.com/grafana/loki/pkg/ruler/util" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" - "github.com/grafana/loki/pkg/util/flagext" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/compactor/deletionmode" + "github.com/grafana/loki/v3/pkg/distributor/shardstreams" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logql" + "github.com/grafana/loki/v3/pkg/logql/syntax" + ruler_config "github.com/grafana/loki/v3/pkg/ruler/config" + "github.com/grafana/loki/v3/pkg/ruler/util" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/sharding" + "github.com/grafana/loki/v3/pkg/util/flagext" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/util/validation" ) const ( @@ -81,6 +81,7 @@ type Limits struct { MaxLineSizeTruncate bool `yaml:"max_line_size_truncate" json:"max_line_size_truncate"` IncrementDuplicateTimestamp bool `yaml:"increment_duplicate_timestamp" json:"increment_duplicate_timestamp"` DiscoverServiceName []string `yaml:"discover_service_name" json:"discover_service_name"` + DiscoverLogLevels bool `yaml:"discover_log_levels" json:"discover_log_levels"` // Ingester enforced limits. MaxLocalStreamsPerUser int `yaml:"max_streams_per_user" json:"max_streams_per_user"` @@ -254,6 +255,7 @@ func (l *Limits) RegisterFlags(f *flag.FlagSet) { "job", } f.Var((*dskit_flagext.StringSlice)(&l.DiscoverServiceName), "validation.discover-service-name", "If no service_name label exists, Loki maps a single label from the configured list to service_name. If none of the configured labels exist in the stream, label is set to unknown_service. Empty list disables setting the label.") + f.BoolVar(&l.DiscoverLogLevels, "validation.discover-log-levels", false, "Discover and add log levels during ingestion, if not present already. Levels would be added to Structured Metadata with name 'level' and one of the values from 'debug', 'info', 'warn', 'error', 'critical', 'fatal'.") _ = l.RejectOldSamplesMaxAge.Set("7d") f.Var(&l.RejectOldSamplesMaxAge, "validation.reject-old-samples.max-age", "Maximum accepted sample age before rejecting.") @@ -915,6 +917,10 @@ func (o *Overrides) DiscoverServiceName(userID string) []string { return o.getOverridesForUser(userID).DiscoverServiceName } +func (o *Overrides) DiscoverLogLevels(userID string) bool { + return o.getOverridesForUser(userID).DiscoverLogLevels +} + // VolumeEnabled returns whether volume endpoints are enabled for a user. func (o *Overrides) VolumeEnabled(userID string) bool { return o.getOverridesForUser(userID).VolumeEnabled diff --git a/pkg/validation/limits_test.go b/pkg/validation/limits_test.go index d8527bcdaa59..598a6f9033cd 100644 --- a/pkg/validation/limits_test.go +++ b/pkg/validation/limits_test.go @@ -12,10 +12,10 @@ import ( "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/compactor/deletionmode" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/logql" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/compactor/deletionmode" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/logql" ) func TestLimitsTagsYamlMatchJson(t *testing.T) { diff --git a/pkg/validation/validate.go b/pkg/validation/validate.go index 09c444aa6498..4b02505b98e5 100644 --- a/pkg/validation/validate.go +++ b/pkg/validation/validate.go @@ -6,8 +6,8 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" - "github.com/grafana/loki/pkg/util/flagext" + "github.com/grafana/loki/v3/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/flagext" ) const ( diff --git a/tools/bloom/inspector/main.go b/tools/bloom/inspector/main.go index 36d152371429..dfcc7c79cd86 100644 --- a/tools/bloom/inspector/main.go +++ b/tools/bloom/inspector/main.go @@ -4,7 +4,7 @@ import ( "fmt" "os" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" ) func main() { diff --git a/tools/deprecated-config-checker/main.go b/tools/deprecated-config-checker/main.go index 6ce387c1eec8..61683333899a 100644 --- a/tools/deprecated-config-checker/main.go +++ b/tools/deprecated-config-checker/main.go @@ -7,7 +7,7 @@ import ( "github.com/fatih/color" - "github.com/grafana/loki/tools/deprecated-config-checker/checker" + "github.com/grafana/loki/v3/tools/deprecated-config-checker/checker" ) const upgradeGuideURL = "https://grafana.com/docs/loki/latest/setup/upgrade/" diff --git a/tools/doc-generator/main.go b/tools/doc-generator/main.go index 3d28f91eaa29..c2748cee925e 100644 --- a/tools/doc-generator/main.go +++ b/tools/doc-generator/main.go @@ -13,8 +13,8 @@ import ( "strings" "text/template" - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/tools/doc-generator/parse" + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/tools/doc-generator/parse" ) const ( diff --git a/tools/doc-generator/parse/parser.go b/tools/doc-generator/parse/parser.go index d5896a0666bf..f565bf2dc9c9 100644 --- a/tools/doc-generator/parse/parser.go +++ b/tools/doc-generator/parse/parser.go @@ -22,10 +22,10 @@ import ( prometheus_config "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/loki/pkg/ruler/util" - storage_config "github.com/grafana/loki/pkg/storage/config" - util_validation "github.com/grafana/loki/pkg/util/validation" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/ruler/util" + storage_config "github.com/grafana/loki/v3/pkg/storage/config" + util_validation "github.com/grafana/loki/v3/pkg/util/validation" + "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/tools/doc-generator/parse/root_blocks.go b/tools/doc-generator/parse/root_blocks.go index 25a4e785ded6..37debb7c4176 100644 --- a/tools/doc-generator/parse/root_blocks.go +++ b/tools/doc-generator/parse/root_blocks.go @@ -13,36 +13,36 @@ import ( "github.com/grafana/dskit/runtimeconfig" "github.com/grafana/dskit/server" - "github.com/grafana/loki/pkg/analytics" - "github.com/grafana/loki/pkg/bloomcompactor" - "github.com/grafana/loki/pkg/bloomgateway" - "github.com/grafana/loki/pkg/compactor" - "github.com/grafana/loki/pkg/distributor" - "github.com/grafana/loki/pkg/ingester" - ingester_client "github.com/grafana/loki/pkg/ingester/client" - "github.com/grafana/loki/pkg/loghttp/push" - "github.com/grafana/loki/pkg/loki/common" - frontend "github.com/grafana/loki/pkg/lokifrontend" - "github.com/grafana/loki/pkg/querier" - "github.com/grafana/loki/pkg/querier/queryrange" - querier_worker "github.com/grafana/loki/pkg/querier/worker" - "github.com/grafana/loki/pkg/ruler" - "github.com/grafana/loki/pkg/scheduler" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/cache" - "github.com/grafana/loki/pkg/storage/chunk/client/alibaba" - "github.com/grafana/loki/pkg/storage/chunk/client/aws" - "github.com/grafana/loki/pkg/storage/chunk/client/azure" - "github.com/grafana/loki/pkg/storage/chunk/client/baidubce" - "github.com/grafana/loki/pkg/storage/chunk/client/gcp" - "github.com/grafana/loki/pkg/storage/chunk/client/ibmcloud" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/chunk/client/openstack" - storage_config "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/series/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/indexgateway" - "github.com/grafana/loki/pkg/tracing" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/analytics" + "github.com/grafana/loki/v3/pkg/bloomcompactor" + "github.com/grafana/loki/v3/pkg/bloomgateway" + "github.com/grafana/loki/v3/pkg/compactor" + "github.com/grafana/loki/v3/pkg/distributor" + "github.com/grafana/loki/v3/pkg/ingester" + ingester_client "github.com/grafana/loki/v3/pkg/ingester/client" + "github.com/grafana/loki/v3/pkg/loghttp/push" + "github.com/grafana/loki/v3/pkg/loki/common" + frontend "github.com/grafana/loki/v3/pkg/lokifrontend" + "github.com/grafana/loki/v3/pkg/querier" + "github.com/grafana/loki/v3/pkg/querier/queryrange" + querier_worker "github.com/grafana/loki/v3/pkg/querier/worker" + "github.com/grafana/loki/v3/pkg/ruler" + "github.com/grafana/loki/v3/pkg/scheduler" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/cache" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/alibaba" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/aws" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/azure" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/baidubce" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/gcp" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/ibmcloud" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/openstack" + storage_config "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/series/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/indexgateway" + "github.com/grafana/loki/v3/pkg/tracing" + "github.com/grafana/loki/v3/pkg/validation" ) var ( diff --git a/tools/doc-generator/writer.go b/tools/doc-generator/writer.go index f182d0a8600c..7a04c891ed2b 100644 --- a/tools/doc-generator/writer.go +++ b/tools/doc-generator/writer.go @@ -15,7 +15,7 @@ import ( "github.com/mitchellh/go-wordwrap" "gopkg.in/yaml.v3" - "github.com/grafana/loki/tools/doc-generator/parse" + "github.com/grafana/loki/v3/tools/doc-generator/parse" ) type specWriter struct { diff --git a/tools/querytee/response_comparator.go b/tools/querytee/response_comparator.go index a6cb8544fa08..04a28fff85c1 100644 --- a/tools/querytee/response_comparator.go +++ b/tools/querytee/response_comparator.go @@ -12,8 +12,8 @@ import ( "github.com/pkg/errors" "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/loghttp" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/loghttp" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // SamplesComparatorFunc helps with comparing different types of samples coming from /api/v1/query and /api/v1/query_range routes. diff --git a/tools/tsdb/bloom-tester/concurrent.go b/tools/tsdb/bloom-tester/concurrent.go index c42d403809ae..a6a2382a2a4a 100644 --- a/tools/tsdb/bloom-tester/concurrent.go +++ b/tools/tsdb/bloom-tester/concurrent.go @@ -4,7 +4,7 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) type pool struct { diff --git a/tools/tsdb/bloom-tester/lib.go b/tools/tsdb/bloom-tester/lib.go index c7608f0046bb..0d3a50566804 100644 --- a/tools/tsdb/bloom-tester/lib.go +++ b/tools/tsdb/bloom-tester/lib.go @@ -7,8 +7,8 @@ import ( "flag" "fmt" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" - tsdbindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" + tsdbindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" "hash/fnv" "math" @@ -23,17 +23,17 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/storage" - bt "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/tools/tsdb/helpers" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/storage" + bt "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/tools/tsdb/helpers" ) const ( diff --git a/tools/tsdb/bloom-tester/main.go b/tools/tsdb/bloom-tester/main.go index 916796b91704..ab5b9dfbcf1c 100644 --- a/tools/tsdb/bloom-tester/main.go +++ b/tools/tsdb/bloom-tester/main.go @@ -7,7 +7,7 @@ import ( "github.com/go-kit/log/level" - util_log "github.com/grafana/loki/pkg/util/log" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) // go build ./tools/tsdb/bloom-tester && HOSTNAME="bloom-tester-121" NUM_TESTERS="128" BUCKET="19625" DIR=/Users/progers/dev/bloom WRITE_MODE="false" BUCKET_PREFIX="new-experiments" ./tools/tsdb/bloom-tester/bloom-tester --config.file=/Users/progers/dev/bloom/config.yaml diff --git a/tools/tsdb/bloom-tester/metrics.go b/tools/tsdb/bloom-tester/metrics.go index cc0b0b345b7f..3eea766b95f5 100644 --- a/tools/tsdb/bloom-tester/metrics.go +++ b/tools/tsdb/bloom-tester/metrics.go @@ -4,9 +4,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" ) type Experiment struct { diff --git a/tools/tsdb/bloom-tester/readlib.go b/tools/tsdb/bloom-tester/readlib.go index e2a21754e865..5886b13e2a9d 100644 --- a/tools/tsdb/bloom-tester/readlib.go +++ b/tools/tsdb/bloom-tester/readlib.go @@ -7,13 +7,13 @@ import ( "github.com/grafana/dskit/services" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" - bt "github.com/grafana/loki/pkg/storage/bloom/v1" - "github.com/grafana/loki/pkg/storage/bloom/v1/filter" - "github.com/grafana/loki/pkg/storage/chunk" - tsdbindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" + bt "github.com/grafana/loki/v3/pkg/storage/bloom/v1" + "github.com/grafana/loki/v3/pkg/storage/bloom/v1/filter" + "github.com/grafana/loki/v3/pkg/storage/chunk" + tsdbindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" "math" "os" @@ -27,18 +27,18 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" //indexshipper_index "github.com/grafana/loki/pkg/storage/stores/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" //"github.com/grafana/loki/pkg/storage/stores/tsdb" //"github.com/grafana/loki/pkg/storage/stores/tsdb/index" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/tools/tsdb/helpers" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/tools/tsdb/helpers" ) var queryExperiments = []QueryExperiment{ diff --git a/tools/tsdb/bloom-tester/tokenizer.go b/tools/tsdb/bloom-tester/tokenizer.go index 3d82c770020e..c89844240455 100644 --- a/tools/tsdb/bloom-tester/tokenizer.go +++ b/tools/tsdb/bloom-tester/tokenizer.go @@ -5,22 +5,22 @@ import ( "math" "time" - v1 "github.com/grafana/loki/pkg/storage/bloom/v1" + v1 "github.com/grafana/loki/v3/pkg/storage/bloom/v1" "github.com/prometheus/client_golang/prometheus/promauto" - "github.com/grafana/loki/pkg/util/constants" + "github.com/grafana/loki/v3/pkg/util/constants" "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/logproto" - "github.com/grafana/loki/pkg/logql/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/logproto" + "github.com/grafana/loki/v3/pkg/logql/log" - "github.com/grafana/loki/pkg/storage/chunk" - "github.com/grafana/loki/pkg/util/encoding" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage/chunk" + "github.com/grafana/loki/v3/pkg/util/encoding" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) type metrics struct { diff --git a/tools/tsdb/helpers/setup.go b/tools/tsdb/helpers/setup.go index a0eb490269fc..807adb4dd989 100644 --- a/tools/tsdb/helpers/setup.go +++ b/tools/tsdb/helpers/setup.go @@ -12,14 +12,14 @@ import ( "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/collectors/version" - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/util/cfg" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/pkg/validation" + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/util/cfg" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/pkg/validation" ) func Setup() (loki.Config, services.Service, string, error) { diff --git a/tools/tsdb/helpers/util.go b/tools/tsdb/helpers/util.go index b30e9e9b1f5c..8cc0602045b0 100644 --- a/tools/tsdb/helpers/util.go +++ b/tools/tsdb/helpers/util.go @@ -12,8 +12,8 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/loki/pkg/storage/chunk/client" - "github.com/grafana/loki/pkg/storage/config" + "github.com/grafana/loki/v3/pkg/storage/chunk/client" + "github.com/grafana/loki/v3/pkg/storage/config" ) const ( diff --git a/tools/tsdb/index-analyzer/analytics.go b/tools/tsdb/index-analyzer/analytics.go index d9baeedc6953..de01d47d6ec0 100644 --- a/tools/tsdb/index-analyzer/analytics.go +++ b/tools/tsdb/index-analyzer/analytics.go @@ -7,10 +7,10 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - tsdb_index "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + tsdb_index "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func analyze(indexShipper indexshipper.IndexShipper, tableName string, tenants []string) error { diff --git a/tools/tsdb/index-analyzer/main.go b/tools/tsdb/index-analyzer/main.go index fd59bd4792fd..2d19ad9c3c42 100644 --- a/tools/tsdb/index-analyzer/main.go +++ b/tools/tsdb/index-analyzer/main.go @@ -5,11 +5,11 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - util_log "github.com/grafana/loki/pkg/util/log" - "github.com/grafana/loki/tools/tsdb/helpers" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + util_log "github.com/grafana/loki/v3/pkg/util/log" + "github.com/grafana/loki/v3/tools/tsdb/helpers" ) // go build ./tools/tsdb/index-analyzer && BUCKET=19453 DIR=/tmp/loki-index-analysis ./index-analyzer --config.file=/tmp/loki-config.yaml diff --git a/tools/tsdb/migrate-versions/main.go b/tools/tsdb/migrate-versions/main.go index b458c80d4c1b..2c49906a5645 100644 --- a/tools/tsdb/migrate-versions/main.go +++ b/tools/tsdb/migrate-versions/main.go @@ -17,17 +17,17 @@ import ( "github.com/pkg/errors" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/loki/pkg/chunkenc" - "github.com/grafana/loki/pkg/loki" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/client/util" - "github.com/grafana/loki/pkg/storage/config" - shipperindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/index" - shipperstorage "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - tsdbindex "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/util/cfg" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/chunkenc" + "github.com/grafana/loki/v3/pkg/loki" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/util" + "github.com/grafana/loki/v3/pkg/storage/config" + shipperindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/index" + shipperstorage "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + tsdbindex "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/util/cfg" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/tools/tsdb/migrate-versions/main_test.go b/tools/tsdb/migrate-versions/main_test.go index 2f4690fde0a7..7ac68521545b 100644 --- a/tools/tsdb/migrate-versions/main_test.go +++ b/tools/tsdb/migrate-versions/main_test.go @@ -14,13 +14,13 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage" - "github.com/grafana/loki/pkg/storage/chunk/client/local" - "github.com/grafana/loki/pkg/storage/config" - shipperstorage "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/storage" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - util_log "github.com/grafana/loki/pkg/util/log" + "github.com/grafana/loki/v3/pkg/storage" + "github.com/grafana/loki/v3/pkg/storage/chunk/client/local" + "github.com/grafana/loki/v3/pkg/storage/config" + shipperstorage "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/storage" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + util_log "github.com/grafana/loki/v3/pkg/util/log" ) const ( diff --git a/tools/tsdb/tsdb-map/main.go b/tools/tsdb/tsdb-map/main.go index 7748b48c800c..0a72ac98db13 100644 --- a/tools/tsdb/tsdb-map/main.go +++ b/tools/tsdb/tsdb-map/main.go @@ -11,12 +11,12 @@ import ( "go.etcd.io/bbolt" "gopkg.in/yaml.v2" - "github.com/grafana/loki/pkg/compactor/retention" - "github.com/grafana/loki/pkg/storage/config" - boltdbcompactor "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/boltdb/compactor" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/util" + "github.com/grafana/loki/v3/pkg/compactor/retention" + "github.com/grafana/loki/v3/pkg/storage/config" + boltdbcompactor "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/boltdb/compactor" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/util" ) var ( diff --git a/tools/tsdb/tsdb-map/main_test.go b/tools/tsdb/tsdb-map/main_test.go index bf8c802db845..56fdcdbc3b25 100644 --- a/tools/tsdb/tsdb-map/main_test.go +++ b/tools/tsdb/tsdb-map/main_test.go @@ -11,8 +11,8 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb" - "github.com/grafana/loki/pkg/storage/stores/shipper/indexshipper/tsdb/index" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb" + "github.com/grafana/loki/v3/pkg/storage/stores/shipper/indexshipper/tsdb/index" ) func TestExtractChecksum(t *testing.T) {