chore: update loki modules for 3.0 release (#12433)

Signed-off-by: Edward Welch <edward.welch@grafana.com>
pull/12437/head
Ed Welch 1 year ago committed by GitHub
parent affd9d604f
commit 4c88be0ef2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      clients/cmd/docker-driver/config.go
  2. 4
      clients/cmd/docker-driver/config_test.go
  3. 8
      clients/cmd/docker-driver/loki.go
  4. 2
      clients/cmd/docker-driver/loki_test.go
  5. 4
      clients/cmd/docker-driver/main.go
  6. 2
      clients/cmd/fluent-bit/buffer.go
  7. 2
      clients/cmd/fluent-bit/client.go
  8. 6
      clients/cmd/fluent-bit/config.go
  9. 4
      clients/cmd/fluent-bit/config_test.go
  10. 6
      clients/cmd/fluent-bit/dque.go
  11. 6
      clients/cmd/fluent-bit/loki.go
  12. 6
      clients/cmd/fluent-bit/loki_test.go
  13. 4
      clients/cmd/fluent-bit/out_grafana_loki.go
  14. 16
      clients/cmd/promtail/main.go
  15. 2
      clients/pkg/logentry/logql/parser.go
  16. 2
      clients/pkg/logentry/metric/metricvec.go
  17. 2
      clients/pkg/logentry/stages/decolorize.go
  18. 2
      clients/pkg/logentry/stages/decolorize_test.go
  19. 2
      clients/pkg/logentry/stages/drop.go
  20. 2
      clients/pkg/logentry/stages/drop_test.go
  21. 2
      clients/pkg/logentry/stages/eventlogmessage_test.go
  22. 2
      clients/pkg/logentry/stages/extensions.go
  23. 2
      clients/pkg/logentry/stages/extensions_test.go
  24. 2
      clients/pkg/logentry/stages/json_test.go
  25. 2
      clients/pkg/logentry/stages/labelallow_test.go
  26. 2
      clients/pkg/logentry/stages/labeldrop_test.go
  27. 2
      clients/pkg/logentry/stages/labels_test.go
  28. 2
      clients/pkg/logentry/stages/limit.go
  29. 2
      clients/pkg/logentry/stages/limit_test.go
  30. 2
      clients/pkg/logentry/stages/logfmt_test.go
  31. 2
      clients/pkg/logentry/stages/match.go
  32. 2
      clients/pkg/logentry/stages/match_test.go
  33. 2
      clients/pkg/logentry/stages/metrics.go
  34. 4
      clients/pkg/logentry/stages/metrics_test.go
  35. 4
      clients/pkg/logentry/stages/multiline.go
  36. 6
      clients/pkg/logentry/stages/multiline_test.go
  37. 2
      clients/pkg/logentry/stages/output_test.go
  38. 2
      clients/pkg/logentry/stages/pack.go
  39. 8
      clients/pkg/logentry/stages/pack_test.go
  40. 2
      clients/pkg/logentry/stages/pipeline.go
  41. 8
      clients/pkg/logentry/stages/pipeline_test.go
  42. 2
      clients/pkg/logentry/stages/regex_test.go
  43. 2
      clients/pkg/logentry/stages/replace_test.go
  44. 2
      clients/pkg/logentry/stages/sampling_test.go
  45. 2
      clients/pkg/logentry/stages/stage.go
  46. 2
      clients/pkg/logentry/stages/static_labels_test.go
  47. 2
      clients/pkg/logentry/stages/structuredmetadata.go
  48. 4
      clients/pkg/logentry/stages/structuredmetadata_test.go
  49. 2
      clients/pkg/logentry/stages/template_test.go
  50. 2
      clients/pkg/logentry/stages/tenant.go
  51. 6
      clients/pkg/logentry/stages/tenant_test.go
  52. 2
      clients/pkg/logentry/stages/timestamp.go
  53. 4
      clients/pkg/logentry/stages/timestamp_test.go
  54. 4
      clients/pkg/logentry/stages/util_test.go
  55. 2
      clients/pkg/promtail/api/types.go
  56. 4
      clients/pkg/promtail/client/batch.go
  57. 4
      clients/pkg/promtail/client/batch_test.go
  58. 6
      clients/pkg/promtail/client/client.go
  59. 10
      clients/pkg/promtail/client/client_test.go
  60. 6
      clients/pkg/promtail/client/client_writeto.go
  61. 6
      clients/pkg/promtail/client/client_writeto_test.go
  62. 2
      clients/pkg/promtail/client/config.go
  63. 2
      clients/pkg/promtail/client/fake/client.go
  64. 6
      clients/pkg/promtail/client/logger.go
  65. 6
      clients/pkg/promtail/client/logger_test.go
  66. 6
      clients/pkg/promtail/client/manager.go
  67. 16
      clients/pkg/promtail/client/manager_test.go
  68. 18
      clients/pkg/promtail/config/config.go
  69. 4
      clients/pkg/promtail/config/config_test.go
  70. 2
      clients/pkg/promtail/limit/config.go
  71. 2
      clients/pkg/promtail/positions/positions_test.go
  72. 20
      clients/pkg/promtail/promtail.go
  73. 26
      clients/pkg/promtail/promtail_test.go
  74. 18
      clients/pkg/promtail/promtail_wal_test.go
  75. 4
      clients/pkg/promtail/scrapeconfig/scrapeconfig.go
  76. 6
      clients/pkg/promtail/server/server.go
  77. 2
      clients/pkg/promtail/server/template.go
  78. 2
      clients/pkg/promtail/server/ui/assets_generate.go
  79. 4
      clients/pkg/promtail/targets/azureeventhubs/parser.go
  80. 8
      clients/pkg/promtail/targets/azureeventhubs/target_syncer.go
  81. 2
      clients/pkg/promtail/targets/azureeventhubs/target_syncer_test.go
  82. 8
      clients/pkg/promtail/targets/azureeventhubs/targetmanager.go
  83. 10
      clients/pkg/promtail/targets/cloudflare/target.go
  84. 6
      clients/pkg/promtail/targets/cloudflare/target_test.go
  85. 10
      clients/pkg/promtail/targets/cloudflare/targetmanager.go
  86. 8
      clients/pkg/promtail/targets/docker/target.go
  87. 8
      clients/pkg/promtail/targets/docker/target_group.go
  88. 4
      clients/pkg/promtail/targets/docker/target_test.go
  89. 12
      clients/pkg/promtail/targets/docker/targetmanager.go
  90. 6
      clients/pkg/promtail/targets/docker/targetmanager_test.go
  91. 8
      clients/pkg/promtail/targets/file/decompresser.go
  92. 6
      clients/pkg/promtail/targets/file/decompresser_test.go
  93. 8
      clients/pkg/promtail/targets/file/filetarget.go
  94. 4
      clients/pkg/promtail/targets/file/filetarget_test.go
  95. 12
      clients/pkg/promtail/targets/file/filetargetmanager.go
  96. 8
      clients/pkg/promtail/targets/file/filetargetmanager_test.go
  97. 8
      clients/pkg/promtail/targets/file/tailer.go
  98. 4
      clients/pkg/promtail/targets/gcplog/formatter.go
  99. 4
      clients/pkg/promtail/targets/gcplog/formatter_test.go
  100. 6
      clients/pkg/promtail/targets/gcplog/pull_target.go
  101. Some files were not shown because too many files have changed in this diff Show More

@ -19,11 +19,11 @@ import (
"github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/model/relabel"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
"github.com/grafana/loki/clients/pkg/promtail/targets/file" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/file"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
) )
const ( const (

@ -11,9 +11,9 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "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 = ` var jobRename = `

@ -10,11 +10,11 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client" "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" var jobName = "docker"

@ -7,7 +7,7 @@ import (
"github.com/docker/docker/daemon/logger" "github.com/docker/docker/daemon/logger"
"github.com/stretchr/testify/require" "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) { func Test_loki_LogWhenClosed(t *testing.T) {

@ -12,8 +12,8 @@ import (
dslog "github.com/grafana/dskit/log" dslog "github.com/grafana/dskit/log"
"github.com/prometheus/common/version" "github.com/prometheus/common/version"
_ "github.com/grafana/loki/pkg/util/build" _ "github.com/grafana/loki/v3/pkg/util/build"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
const socketAddress = "/run/docker/plugins/loki.sock" const socketAddress = "/run/docker/plugins/loki.sock"

@ -5,7 +5,7 @@ import (
"github.com/go-kit/log" "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 { type bufferConfig struct {

@ -3,7 +3,7 @@ package main
import ( import (
"github.com/go-kit/log" "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. // NewClient creates a new client based on the fluentbit configuration.

@ -12,10 +12,10 @@ import (
"github.com/grafana/dskit/log" "github.com/grafana/dskit/log"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/clients/pkg/logentry/logql" "github.com/grafana/loki/v3/clients/pkg/logentry/logql"
"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"
) )
var defaultClientCfg = client.Config{} var defaultClientCfg = client.Config{}

@ -12,9 +12,9 @@ import (
"github.com/grafana/dskit/log" "github.com/grafana/dskit/log"
"github.com/prometheus/common/model" "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 type fakeConfig map[string]string

@ -12,10 +12,10 @@ import (
"github.com/joncrlsn/dque" "github.com/joncrlsn/dque"
"github.com/prometheus/common/model" "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/clients/pkg/promtail/client" "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 { type dqueConfig struct {

@ -17,10 +17,10 @@ import (
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
"github.com/prometheus/common/model" "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/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
) )
var ( var (

@ -11,10 +11,10 @@ import (
jsoniter "github.com/json-iterator/go" jsoniter "github.com/json-iterator/go"
"github.com/prometheus/common/model" "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/clients/pkg/promtail/client/fake" "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() var now = time.Now()

@ -13,12 +13,12 @@ import (
dslog "github.com/grafana/dskit/log" dslog "github.com/grafana/dskit/log"
"github.com/prometheus/common/version" "github.com/prometheus/common/version"
_ "github.com/grafana/loki/pkg/util/build" _ "github.com/grafana/loki/v3/pkg/util/build"
) )
import ( import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/grafana/loki/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
) )
var ( var (

@ -20,16 +20,16 @@ import (
collectors_version "github.com/prometheus/client_golang/prometheus/collectors/version" collectors_version "github.com/prometheus/client_golang/prometheus/collectors/version"
"github.com/prometheus/common/version" "github.com/prometheus/common/version"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail" "github.com/grafana/loki/v3/clients/pkg/promtail"
"github.com/grafana/loki/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
promtail_config "github.com/grafana/loki/clients/pkg/promtail/config" promtail_config "github.com/grafana/loki/v3/clients/pkg/promtail/config"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
"github.com/grafana/loki/pkg/util/cfg" "github.com/grafana/loki/v3/pkg/util/cfg"
_ "github.com/grafana/loki/pkg/util/build" _ "github.com/grafana/loki/v3/pkg/util/build"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
func init() { func init() {

@ -8,7 +8,7 @@ import (
"github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/pkg/logqlmodel" "github.com/grafana/loki/v3/pkg/logqlmodel"
) )
func init() { func init() {

@ -5,7 +5,7 @@ import (
"sync" "sync"
"time" "time"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"

@ -1,7 +1,7 @@
package stages package stages
import ( import (
"github.com/grafana/loki/pkg/logql/log" "github.com/grafana/loki/v3/pkg/logql/log"
) )
type decolorizeStage struct{} type decolorizeStage struct{}

@ -7,7 +7,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert" "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 = ` var testDecolorizePipeline = `

@ -13,7 +13,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/grafana/loki/pkg/util/flagext" "github.com/grafana/loki/v3/pkg/util/flagext"
) )
const ( const (

@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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 // Not all these are tested but are here to make sure the different types marshal without error

@ -11,7 +11,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert" "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 = ` var testEvtLogMsgYamlDefaults = `

@ -10,7 +10,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/pkg/util/flagext" "github.com/grafana/loki/v3/pkg/util/flagext"
) )
const ( const (

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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 ( var (

@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2" "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 = ` var testJSONYamlSingleStageWithoutSource = `

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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) { func Test_addLabelStage_Process(t *testing.T) {

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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) { func Test_dropLabelStage_Process(t *testing.T) {

@ -13,7 +13,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/assert" "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 = ` var testLabelsYaml = `

@ -8,7 +8,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "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/go-kit/log"
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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 // Not all these are tested but are here to make sure the different types marshal without error

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2" "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 = ` var testLogfmtYamlSingleStageWithoutSource = `

@ -8,7 +8,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/grafana/loki/clients/pkg/logentry/logql" "github.com/grafana/loki/v3/clients/pkg/logentry/logql"
) )
const ( const (

@ -8,7 +8,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert" "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 = ` var testMatchYaml = `

@ -15,7 +15,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/clients/pkg/logentry/metric" "github.com/grafana/loki/v3/clients/pkg/logentry/metric"
) )
const ( const (

@ -14,9 +14,9 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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 = ` var testMetricYaml = `

@ -13,9 +13,9 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/common/model" "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 ( const (

@ -10,10 +10,10 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "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"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
func Test_multilineStage_Process(t *testing.T) { func Test_multilineStage_Process(t *testing.T) {

@ -11,7 +11,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert" "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 = ` var testOutputYaml = `

@ -15,7 +15,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/pkg/logqlmodel" "github.com/grafana/loki/v3/pkg/logqlmodel"
) )
var ( var (

@ -12,11 +12,11 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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"
"github.com/grafana/loki/pkg/logqlmodel" "github.com/grafana/loki/v3/pkg/logqlmodel"
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 // Not all these are tested but are here to make sure the different types marshal without error

@ -9,7 +9,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"golang.org/x/time/rate" "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 // PipelineStages contains configuration for each stage within a pipeline

@ -14,11 +14,11 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
var ( var (

@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2" "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 = ` var testRegexYamlSingleStageWithoutSource = `

@ -10,7 +10,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"gopkg.in/yaml.v2" "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 = ` var testReplaceYamlSingleStageWithoutSource = `

@ -9,7 +9,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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 = ` var testSampingYaml = `

@ -12,7 +12,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
) )
const ( const (

@ -7,7 +7,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/assert" "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) { func Test_staticLabelStage_Process(t *testing.T) {

@ -5,7 +5,7 @@ import (
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
) )
func newStructuredMetadataStage(params StageCreationParams) (Stage, error) { func newStructuredMetadataStage(params StageCreationParams) (Stage, error) {

@ -8,8 +8,8 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/loki/pkg/push" "github.com/grafana/loki/v3/pkg/push"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
var pipelineStagesStructuredMetadataUsingMatch = ` var pipelineStagesStructuredMetadataUsingMatch = `

@ -12,7 +12,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/assert" "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 = ` var testTemplateYaml = `

@ -10,7 +10,7 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
) )
const ( const (

@ -12,10 +12,10 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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" lokiutil "github.com/grafana/loki/v3/pkg/util"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
var testTenantYamlExtractedData = ` var testTenantYamlExtractedData = `

@ -12,7 +12,7 @@ import (
"github.com/mitchellh/mapstructure" "github.com/mitchellh/mapstructure"
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
) )
const ( const (

@ -14,8 +14,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
lokiutil "github.com/grafana/loki/pkg/util" lokiutil "github.com/grafana/loki/v3/pkg/util"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
var testTimestampYaml = ` var testTimestampYaml = `

@ -8,9 +8,9 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/assert" "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 { func newEntry(ex map[string]interface{}, lbs model.LabelSet, line string, ts time.Time) Entry {

@ -6,7 +6,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model" "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. // Entry is a log entry with labels.

@ -12,9 +12,9 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"golang.org/x/exp/slices" "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 ( const (

@ -9,9 +9,9 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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) { func TestBatch_MaxStreams(t *testing.T) {

@ -20,10 +20,10 @@ import (
"github.com/prometheus/common/config" "github.com/prometheus/common/config"
"github.com/prometheus/common/model" "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" lokiutil "github.com/grafana/loki/v3/pkg/util"
"github.com/grafana/loki/pkg/util/build" "github.com/grafana/loki/v3/pkg/util/build"
) )
const ( const (

@ -19,12 +19,12 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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/clients/pkg/promtail/utils" "github.com/grafana/loki/v3/clients/pkg/promtail/utils"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
"github.com/grafana/loki/pkg/push" "github.com/grafana/loki/v3/pkg/push"
lokiflag "github.com/grafana/loki/pkg/util/flagext" lokiflag "github.com/grafana/loki/v3/pkg/util/flagext"
) )
var logEntries = []api.Entry{ var logEntries = []api.Entry{

@ -10,10 +10,10 @@ import (
"github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/chunks"
"github.com/prometheus/prometheus/tsdb/record" "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/v3/pkg/ingester/wal"
"github.com/grafana/loki/pkg/util" "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, // clientWriteTo implements a wal.WriteTo that re-builds entries with the stored series, and the received entries. After,

@ -18,10 +18,10 @@ import (
"github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/record"
"github.com/stretchr/testify/require" "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/v3/pkg/ingester/wal"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
) )
func TestClientWriter_LogEntriesAreReconstructedAndForwardedCorrectly(t *testing.T) { func TestClientWriter_LogEntriesAreReconstructedAndForwardedCorrectly(t *testing.T) {

@ -8,7 +8,7 @@ import (
"github.com/grafana/dskit/flagext" "github.com/grafana/dskit/flagext"
"github.com/prometheus/common/config" "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. // NOTE the helm chart for promtail and fluent-bit also have defaults for these values, please update to match if you make changes here.

@ -3,7 +3,7 @@ package fake
import ( import (
"sync" "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. // Client is a fake client used for testing.

@ -12,9 +12,9 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"gopkg.in/yaml.v2" "gopkg.in/yaml.v2"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/limit" "github.com/grafana/loki/v3/clients/pkg/promtail/limit"
"github.com/grafana/loki/clients/pkg/promtail/wal" "github.com/grafana/loki/v3/clients/pkg/promtail/wal"
) )
var ( var (

@ -9,10 +9,10 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "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"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
func TestNewLogger(t *testing.T) { func TestNewLogger(t *testing.T) {

@ -9,9 +9,9 @@ import (
"github.com/go-kit/log/level" "github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/limit" "github.com/grafana/loki/v3/clients/pkg/promtail/limit"
"github.com/grafana/loki/clients/pkg/promtail/wal" "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 // WriterEventsNotifier implements a notifier that's received by the Manager, to which wal.Watcher can subscribe for

@ -16,14 +16,14 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/stretchr/testify/require" "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/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/limit" "github.com/grafana/loki/v3/clients/pkg/promtail/limit"
"github.com/grafana/loki/clients/pkg/promtail/utils" "github.com/grafana/loki/v3/clients/pkg/promtail/utils"
"github.com/grafana/loki/clients/pkg/promtail/wal" "github.com/grafana/loki/v3/clients/pkg/promtail/wal"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
lokiflag "github.com/grafana/loki/pkg/util/flagext" lokiflag "github.com/grafana/loki/v3/pkg/util/flagext"
) )
var testLimitsConfig = limit.Config{ var testLimitsConfig = limit.Config{

@ -8,16 +8,16 @@ import (
"github.com/go-kit/log/level" "github.com/go-kit/log/level"
"gopkg.in/yaml.v2" "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/clients/pkg/promtail/limit" "github.com/grafana/loki/v3/clients/pkg/promtail/limit"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/server" "github.com/grafana/loki/v3/clients/pkg/promtail/server"
"github.com/grafana/loki/clients/pkg/promtail/targets/file" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/file"
"github.com/grafana/loki/clients/pkg/promtail/wal" "github.com/grafana/loki/v3/clients/pkg/promtail/wal"
"github.com/grafana/loki/pkg/tracing" "github.com/grafana/loki/v3/pkg/tracing"
"github.com/grafana/loki/pkg/util/flagext" "github.com/grafana/loki/v3/pkg/util/flagext"
) )
// Options contains cross-cutting promtail configurations // Options contains cross-cutting promtail configurations

@ -11,9 +11,9 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gopkg.in/yaml.v2" "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 = ` const testFile = `

@ -3,7 +3,7 @@ package limit
import ( import (
"flag" "flag"
"github.com/grafana/loki/pkg/util/flagext" "github.com/grafana/loki/v3/pkg/util/flagext"
) )
type Config struct { type Config struct {

@ -9,7 +9,7 @@ import (
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/stretchr/testify/require" "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 { func tempFilename(t *testing.T) string {

@ -14,17 +14,17 @@ import (
"github.com/go-kit/log/level" "github.com/go-kit/log/level"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
"github.com/grafana/loki/clients/pkg/promtail/config" "github.com/grafana/loki/v3/clients/pkg/promtail/config"
"github.com/grafana/loki/clients/pkg/promtail/server" "github.com/grafana/loki/v3/clients/pkg/promtail/server"
"github.com/grafana/loki/clients/pkg/promtail/targets" "github.com/grafana/loki/v3/clients/pkg/promtail/targets"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
"github.com/grafana/loki/clients/pkg/promtail/utils" "github.com/grafana/loki/v3/clients/pkg/promtail/utils"
"github.com/grafana/loki/clients/pkg/promtail/wal" "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 ( const (

@ -30,19 +30,19 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
"github.com/grafana/loki/clients/pkg/promtail/config" "github.com/grafana/loki/v3/clients/pkg/promtail/config"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/server" "github.com/grafana/loki/v3/clients/pkg/promtail/server"
pserver "github.com/grafana/loki/clients/pkg/promtail/server" pserver "github.com/grafana/loki/v3/clients/pkg/promtail/server"
file2 "github.com/grafana/loki/clients/pkg/promtail/targets/file" file2 "github.com/grafana/loki/v3/clients/pkg/promtail/targets/file"
"github.com/grafana/loki/clients/pkg/promtail/targets/testutils" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/testutils"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
var clientMetrics = client.NewMetrics(prometheus.DefaultRegisterer) var clientMetrics = client.NewMetrics(prometheus.DefaultRegisterer)

@ -20,15 +20,15 @@ import (
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/client" "github.com/grafana/loki/v3/clients/pkg/promtail/client"
"github.com/grafana/loki/clients/pkg/promtail/config" "github.com/grafana/loki/v3/clients/pkg/promtail/config"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/utils" "github.com/grafana/loki/v3/clients/pkg/promtail/utils"
"github.com/grafana/loki/clients/pkg/promtail/wal" "github.com/grafana/loki/v3/clients/pkg/promtail/wal"
"github.com/grafana/loki/pkg/push" "github.com/grafana/loki/v3/pkg/push"
util_log "github.com/grafana/loki/pkg/util/log" util_log "github.com/grafana/loki/v3/pkg/util/log"
) )
const ( const (

@ -27,8 +27,8 @@ import (
"github.com/prometheus/prometheus/discovery/zookeeper" "github.com/prometheus/prometheus/discovery/zookeeper"
"github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/discovery/consulagent" "github.com/grafana/loki/v3/clients/pkg/promtail/discovery/consulagent"
) )
// Config describes a job to scrape. // Config describes a job to scrape.

@ -23,9 +23,9 @@ import (
"github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/version" "github.com/prometheus/common/version"
"github.com/grafana/loki/clients/pkg/promtail/server/ui" "github.com/grafana/loki/v3/clients/pkg/promtail/server/ui"
"github.com/grafana/loki/clients/pkg/promtail/targets" "github.com/grafana/loki/v3/clients/pkg/promtail/targets"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
) )
var ( var (

@ -13,7 +13,7 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/template" "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. // templateOptions is a set of options to render a template.

@ -10,7 +10,7 @@ import (
"github.com/prometheus/alertmanager/pkg/modtimevfs" "github.com/prometheus/alertmanager/pkg/modtimevfs"
"github.com/shurcooL/vfsgen" "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() { func main() {

@ -12,9 +12,9 @@ import (
"github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel" "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 { type azureMonitorResourceLogs struct {

@ -10,10 +10,10 @@ import (
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/kafka" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/kafka"
) )
func NewSyncer( func NewSyncer(

@ -10,7 +10,7 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert" "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) { func Test_validateConfig(t *testing.T) {

@ -6,10 +6,10 @@ import (
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/kafka" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/kafka"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
) )
// TargetManager manages a series of kafka targets. // TargetManager manages a series of kafka targets.

@ -18,12 +18,12 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"go.uber.org/atomic" "go.uber.org/atomic"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "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. // The minimun window size is 1 minute.

@ -15,9 +15,9 @@ import (
"github.com/stretchr/testify/mock" "github.com/stretchr/testify/mock"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/loki/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
) )
func Test_CloudflareTarget(t *testing.T) { func Test_CloudflareTarget(t *testing.T) {

@ -3,11 +3,11 @@ package cloudflare
import ( import (
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
) )
// TargetManager manages a series of cloudflare targets. // TargetManager manages a series of cloudflare targets.

@ -20,11 +20,11 @@ import (
"github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/model/relabel"
"go.uber.org/atomic" "go.uber.org/atomic"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "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 { type Target struct {

@ -15,11 +15,11 @@ import (
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/prometheus/prometheus/model/relabel" "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/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
) )
const DockerSource = "Docker" const DockerSource = "Docker"

@ -19,8 +19,8 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/loki/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
) )
func Test_DockerTarget(t *testing.T) { func Test_DockerTarget(t *testing.T) {

@ -9,13 +9,13 @@ import (
"github.com/prometheus/common/model" "github.com/prometheus/common/model"
"github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
) )
const ( const (

@ -19,9 +19,9 @@ import (
"github.com/prometheus/prometheus/discovery/moby" "github.com/prometheus/prometheus/discovery/moby"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"github.com/grafana/loki/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
) )
func Test_TargetManager(t *testing.T) { func Test_TargetManager(t *testing.T) {

@ -23,11 +23,11 @@ import (
"golang.org/x/text/encoding/ianaindex" "golang.org/x/text/encoding/ianaindex"
"golang.org/x/text/transform" "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/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
) )
func supportedCompressedFormats() map[string]struct{} { func supportedCompressedFormats() map[string]struct{} {

@ -11,9 +11,9 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"go.uber.org/atomic" "go.uber.org/atomic"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
) )
type noopClient struct { type noopClient struct {

@ -14,10 +14,10 @@ import (
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/prometheus/common/model" "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/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
) )
const ( const (

@ -20,8 +20,8 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"go.uber.org/atomic" "go.uber.org/atomic"
"github.com/grafana/loki/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
) )
func TestFileTargetSync(t *testing.T) { func TestFileTargetSync(t *testing.T) {

@ -20,13 +20,13 @@ import (
"github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/model/relabel"
"github.com/grafana/loki/clients/pkg/logentry/stages" "github.com/grafana/loki/v3/clients/pkg/logentry/stages"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
) )
const ( const (

@ -16,10 +16,10 @@ import (
"github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery"
"github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/discovery/targetgroup"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/client/fake" "github.com/grafana/loki/v3/clients/pkg/promtail/client/fake"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
) )
func newTestLogDirectories(t *testing.T) string { func newTestLogDirectories(t *testing.T) string {

@ -17,11 +17,11 @@ import (
"golang.org/x/text/encoding/ianaindex" "golang.org/x/text/encoding/ianaindex"
"golang.org/x/text/transform" "golang.org/x/text/transform"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/positions" "github.com/grafana/loki/v3/clients/pkg/promtail/positions"
"github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/v3/pkg/logproto"
"github.com/grafana/loki/pkg/util" "github.com/grafana/loki/v3/pkg/util"
) )
type tailer struct { type tailer struct {

@ -10,9 +10,9 @@ import (
"github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/model/relabel" "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. // GCPLogEntry that will be written to the pubsub topic.

@ -10,9 +10,9 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require" "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) { func TestFormat(t *testing.T) {

@ -14,9 +14,9 @@ import (
"github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/model/relabel"
"google.golang.org/api/option" "google.golang.org/api/option"
"github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/v3/clients/pkg/promtail/api"
"github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/v3/clients/pkg/promtail/scrapeconfig"
"github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/grafana/loki/v3/clients/pkg/promtail/targets/target"
) )
var defaultBackoff = backoff.Config{ var defaultBackoff = backoff.Config{

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save