Skip to content

Commit

Permalink
Switch flow mode to use new level package
Browse files Browse the repository at this point in the history
  • Loading branch information
thampiotr committed Oct 23, 2023
1 parent 2d08f1c commit edd8b8e
Show file tree
Hide file tree
Showing 127 changed files with 138 additions and 142 deletions.
2 changes: 1 addition & 1 deletion cmd/internal/flowmode/cluster_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/agent/service/cluster"
"github.com/grafana/ckit/advertise"
"github.com/hashicorp/go-discover"
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/flowmode/cmd_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import (

"github.com/fatih/color"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component"
"github.com/grafana/agent/converter"
convert_diag "github.com/grafana/agent/converter/diag"
"github.com/grafana/agent/pkg/boringcrypto"
"github.com/grafana/agent/pkg/config/instrumentation"
"github.com/grafana/agent/pkg/flow"
"github.com/grafana/agent/pkg/flow/logging"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/agent/pkg/flow/tracing"
"github.com/grafana/agent/pkg/usagestats"
"github.com/grafana/agent/service"
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/flowmode/resources_collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/shirou/gopsutil/v3/net"
"github.com/shirou/gopsutil/v3/process"
Expand Down
2 changes: 1 addition & 1 deletion component/common/kubernetes/kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"reflect"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
commoncfg "github.com/grafana/agent/component/common/config"
"github.com/grafana/agent/pkg/build"
"github.com/grafana/agent/pkg/flow/logging/level"
promconfig "github.com/prometheus/common/config"
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/dskit/backoff"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/config"
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/client/client_writeto.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/tsdb/chunks"
"github.com/prometheus/prometheus/tsdb/record"
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/client/client_writeto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"go.uber.org/atomic"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb/chunks"
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/client/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"sync"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"

"github.com/grafana/agent/component/common/loki"
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/positions/positions.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
yaml "gopkg.in/yaml.v2"
)

Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/wal/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/prometheus/tsdb/wlog"

Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/wal/watcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/prometheus/tsdb/record"
"github.com/prometheus/prometheus/tsdb/wlog"

Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/wal/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/prometheus/prometheus/tsdb/record"
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/wal/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/prometheus/model/labels"
"github.com/prometheus/prometheus/tsdb/chunks"
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/wal/writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"github.com/stretchr/testify/require"
Expand Down
2 changes: 1 addition & 1 deletion component/common/net/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/gorilla/mux"
"github.com/grafana/agent/pkg/flow/logging/level"
dskit "github.com/grafana/dskit/server"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
Expand Down
2 changes: 1 addition & 1 deletion component/discovery/consulagent/promtail_consulagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
consul "github.com/hashicorp/consul/api"
conntrack "github.com/mwitkow/go-conntrack"
"github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 1 addition & 1 deletion component/faro/receiver/exporters.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/go-logfmt/logfmt"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/agent/component/faro/receiver/internal/payload"
"github.com/grafana/agent/component/otelcol"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/loki/pkg/logproto"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
Expand Down
2 changes: 1 addition & 1 deletion component/faro/receiver/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component/faro/receiver/internal/payload"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/rs/cors"
"golang.org/x/time/rate"
Expand Down
2 changes: 1 addition & 1 deletion component/faro/receiver/receiver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/go-sourcemap/sourcemap"
"github.com/grafana/agent/component"
"github.com/grafana/agent/pkg/flow/logging/level"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion component/faro/receiver/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/gorilla/mux"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/dskit/instrument"
"github.com/grafana/dskit/middleware"
"github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 1 addition & 1 deletion component/faro/receiver/sourcemaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import (
"text/template"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/go-sourcemap/sourcemap"
"github.com/grafana/agent/component/faro/receiver/internal/payload"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/minio/pkg/wildcard"
"github.com/prometheus/client_golang/prometheus"
"github.com/vincent-petithory/dataurl"
Expand Down
2 changes: 1 addition & 1 deletion component/local/file/detector.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

"github.com/fsnotify/fsnotify"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
)

// Detector is used to specify how changes to the file should be detected.
Expand Down
2 changes: 1 addition & 1 deletion component/local/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import (

"github.com/prometheus/client_golang/prometheus"

"github.com/go-kit/log/level"
"github.com/grafana/agent/component"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/river/rivertypes"
)

Expand Down
2 changes: 1 addition & 1 deletion component/local/file_match/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (

"github.com/grafana/agent/component/discovery"

"github.com/go-kit/log/level"
"github.com/grafana/agent/component"
"github.com/grafana/agent/pkg/flow/logging/level"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion component/local/file_match/watch.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"github.com/go-kit/log"

"github.com/bmatcuk/doublestar"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component/discovery"
"github.com/grafana/agent/pkg/flow/logging/level"
)

// watch handles a single discovery.target for file watching.
Expand Down
2 changes: 1 addition & 1 deletion component/loki/echo/echo.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"context"
"sync"

"github.com/go-kit/log/level"
"github.com/grafana/agent/component"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/agent/pkg/flow/logging/level"
)

func init() {
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/drop.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (

"github.com/alecthomas/units"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
)

Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/eventlogmessage.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/common/model"
)

Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"strings"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/river"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/geoip.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"reflect"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/jmespath/go-jmespath"
"github.com/oschwald/geoip2-golang"
"github.com/oschwald/maxminddb-golang"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"reflect"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/jmespath/go-jmespath"
json "github.com/json-iterator/go"
)
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/common/model"
)

Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"fmt"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
"golang.org/x/time/rate"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/logfmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/go-logfmt/logfmt"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/common/model"
)

Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/metric.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component/loki/process/metric"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/model"
)
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/multiline.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/loki/pkg/logproto"
"github.com/prometheus/common/model"
)
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/common/model"
)

Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/loki/pkg/logqlmodel"
json "github.com/json-iterator/go"
"github.com/prometheus/client_golang/prometheus"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/pipeline_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import (
"github.com/grafana/agent/component/common/loki/client/fake"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/component/common/loki"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/grafana/loki/pkg/logproto"
util_log "github.com/grafana/loki/pkg/util/log"
"github.com/grafana/river"
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/mitchellh/mapstructure"
"github.com/prometheus/common/model"
)
Expand Down
2 changes: 1 addition & 1 deletion component/loki/process/stages/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"time"

"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/grafana/agent/pkg/flow/logging/level"
"github.com/prometheus/common/model"
)

Expand Down
Loading

0 comments on commit edd8b8e

Please sign in to comment.