diff --git a/go.sum b/go.sum index 5d2ffc0c3e..b702982f21 100644 --- a/go.sum +++ b/go.sum @@ -1022,8 +1022,6 @@ github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gosnmp/gosnmp v1.36.0 h1:1Si+MImHcKIqFc3/kJEs2LOULP1nlFKlzPFyrMOk5Qk= -github.com/gosnmp/gosnmp v1.36.0/go.mod h1:iLcZxN2MxKhH0jPQDVMZaSNypw1ykqVi27O79koQj6w= github.com/gosnmp/gosnmp v1.37.0 h1:/Tf8D3b9wrnNuf/SfbvO+44mPrjVphBhRtcGg22V07Y= github.com/gosnmp/gosnmp v1.37.0/go.mod h1:GDH9vNqpsD7f2HvZhKs5dlqSEcAS6s6Qp099oZRCR+M= github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= @@ -1982,10 +1980,6 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA= github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= -github.com/prometheus/snmp_exporter v0.24.1 h1:AihTbJHurMo8bjtjJde8U+4gMEvpvYvT21Xbd4SzJgY= -github.com/prometheus/snmp_exporter v0.24.1/go.mod h1:j6uIGkdR0DXvKn7HJtSkeDj//UY0sWmdd6XhvdBjln0= -github.com/prometheus/snmp_exporter v0.25.1-0.20240501011921-5f907e691aa5 h1:eDoGVogLF6DRe1s7NpQI6oz8atI3eM2Q58JmHiKOkRM= -github.com/prometheus/snmp_exporter v0.25.1-0.20240501011921-5f907e691aa5/go.mod h1:zOJjSLA//ET2bH76vYBdftmKEg1LiqfNesyZy+nMHvc= github.com/prometheus/snmp_exporter v0.26.0 h1:7THSh/mAIMmHkiVhmsrAwiH1XNGiFelhPCKBe8PXg8U= github.com/prometheus/snmp_exporter v0.26.0/go.mod h1:GJEhIONojqxbjn3eyCykWeGVXQJg9pdYSX2scFLpEA0= github.com/prometheus/statsd_exporter v0.22.8 h1:Qo2D9ZzaQG+id9i5NYNGmbf1aa/KxKbB9aKfMS+Yib0= diff --git a/internal/alloycli/cluster_builder.go b/internal/alloycli/cluster_builder.go index d97f9352a8..07dc03d6fc 100644 --- a/internal/alloycli/cluster_builder.go +++ b/internal/alloycli/cluster_builder.go @@ -9,7 +9,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/grafana/ckit/advertise" "github.com/hashicorp/go-discover" diff --git a/internal/alloycli/cmd_run.go b/internal/alloycli/cmd_run.go index f6970da38f..0f96f18b75 100644 --- a/internal/alloycli/cmd_run.go +++ b/internal/alloycli/cmd_run.go @@ -19,16 +19,16 @@ import ( "github.com/KimMachineGun/automemlimit/memlimit" "github.com/fatih/color" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/logging" - "github.com/grafana/alloy/internal/alloy/logging/level" - "github.com/grafana/alloy/internal/alloy/tracing" "github.com/grafana/alloy/internal/alloyseed" "github.com/grafana/alloy/internal/boringcrypto" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/converter" convert_diag "github.com/grafana/alloy/internal/converter/diag" "github.com/grafana/alloy/internal/featuregate" + alloy_runtime "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/logging" + "github.com/grafana/alloy/internal/runtime/logging/level" + "github.com/grafana/alloy/internal/runtime/tracing" "github.com/grafana/alloy/internal/service" httpservice "github.com/grafana/alloy/internal/service/http" "github.com/grafana/alloy/internal/service/labelstore" @@ -227,7 +227,7 @@ func (fr *alloyRun) Run(configPath string) error { // To work around this, we lazily create variables for the functions the HTTP // service needs and set them after the Alloy controller exists. var ( - reload func() (*alloy.Source, error) + reload func() (*alloy_runtime.Source, error) ready func() bool ) @@ -257,7 +257,7 @@ func (fr *alloyRun) Run(configPath string) error { Gatherer: prometheus.DefaultGatherer, ReadyFunc: func() bool { return ready() }, - ReloadFunc: func() (*alloy.Source, error) { return reload() }, + ReloadFunc: func() (*alloy_runtime.Source, error) { return reload() }, HTTPListenAddr: fr.httpListenAddr, MemoryListenAddr: fr.inMemoryAddr, @@ -284,7 +284,7 @@ func (fr *alloyRun) Run(configPath string) error { labelService := labelstore.New(l, reg) alloyseed.Init(fr.storagePath, l) - f := alloy.New(alloy.Options{ + f := alloy_runtime.New(alloy_runtime.Options{ Logger: l, Tracer: t, DataPath: fr.storagePath, @@ -301,7 +301,7 @@ func (fr *alloyRun) Run(configPath string) error { }) ready = f.Ready - reload = func() (*alloy.Source, error) { + reload = func() (*alloy_runtime.Source, error) { alloySource, err := loadAlloySource(configPath, fr.configFormat, fr.configBypassConversionErrors, fr.configExtraArgs) defer instrumentation.InstrumentSHA256(alloySource.SHA256()) defer instrumentation.InstrumentLoad(err == nil) @@ -390,7 +390,7 @@ func (fr *alloyRun) Run(configPath string) error { } // getEnabledComponentsFunc returns a function that gets the current enabled components -func getEnabledComponentsFunc(f *alloy.Alloy) func() map[string]interface{} { +func getEnabledComponentsFunc(f *alloy_runtime.Runtime) func() map[string]interface{} { return func() map[string]interface{} { components := component.GetAllComponents(f, component.InfoOptions{}) componentNames := map[string]struct{}{} @@ -404,7 +404,7 @@ func getEnabledComponentsFunc(f *alloy.Alloy) func() map[string]interface{} { } } -func loadAlloySource(path string, converterSourceFormat string, converterBypassErrors bool, configExtraArgs string) (*alloy.Source, error) { +func loadAlloySource(path string, converterSourceFormat string, converterBypassErrors bool, configExtraArgs string) (*alloy_runtime.Source, error) { fi, err := os.Stat(path) if err != nil { return nil, err @@ -436,7 +436,7 @@ func loadAlloySource(path string, converterSourceFormat string, converterBypassE return nil, err } - return alloy.ParseSources(sources) + return alloy_runtime.ParseSources(sources) } bb, err := os.ReadFile(path) @@ -460,7 +460,7 @@ func loadAlloySource(path string, converterSourceFormat string, converterBypassE instrumentation.InstrumentConfig(bb) - return alloy.ParseSource(path, bb) + return alloy_runtime.ParseSource(path, bb) } func interruptContext() (context.Context, context.CancelFunc) { diff --git a/internal/alloycli/resources_collector.go b/internal/alloycli/resources_collector.go index 26c53ef4b7..db81ccc9b0 100644 --- a/internal/alloycli/resources_collector.go +++ b/internal/alloycli/resources_collector.go @@ -5,7 +5,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/shirou/gopsutil/v3/net" "github.com/shirou/gopsutil/v3/process" diff --git a/internal/alloyseed/alloyseed.go b/internal/alloyseed/alloyseed.go index 46935cb05b..11cf7cafce 100644 --- a/internal/alloyseed/alloyseed.go +++ b/internal/alloyseed/alloyseed.go @@ -11,7 +11,7 @@ import ( "github.com/go-kit/log" "github.com/google/uuid" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/version" ) diff --git a/internal/cmd/alloy-service/service_test.go b/internal/cmd/alloy-service/service_test.go index d67958f060..e7b7febdb5 100644 --- a/internal/cmd/alloy-service/service_test.go +++ b/internal/cmd/alloy-service/service_test.go @@ -13,7 +13,7 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/componenttest" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/phayes/freeport" "github.com/stretchr/testify/require" diff --git a/internal/component/beyla/ebpf/beyla_linux.go b/internal/component/beyla/ebpf/beyla_linux.go index ede212c04b..e1dea5178c 100644 --- a/internal/component/beyla/ebpf/beyla_linux.go +++ b/internal/component/beyla/ebpf/beyla_linux.go @@ -12,11 +12,11 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" http_service "github.com/grafana/alloy/internal/service/http" "github.com/grafana/beyla/pkg/beyla" "github.com/grafana/beyla/pkg/components" diff --git a/internal/component/beyla/ebpf/beyla_placeholder.go b/internal/component/beyla/ebpf/beyla_placeholder.go index f018604717..8f1e915688 100644 --- a/internal/component/beyla/ebpf/beyla_placeholder.go +++ b/internal/component/beyla/ebpf/beyla_placeholder.go @@ -5,9 +5,9 @@ package beyla import ( "context" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/common/kubernetes/event.go b/internal/component/common/kubernetes/event.go index 557ee0ee57..604b66364b 100644 --- a/internal/component/common/kubernetes/event.go +++ b/internal/component/common/kubernetes/event.go @@ -2,7 +2,7 @@ package kubernetes import ( "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "k8s.io/client-go/tools/cache" "k8s.io/client-go/util/workqueue" ) diff --git a/internal/component/common/kubernetes/kubernetes.go b/internal/component/common/kubernetes/kubernetes.go index 7933d8c950..8f52a1519c 100644 --- a/internal/component/common/kubernetes/kubernetes.go +++ b/internal/component/common/kubernetes/kubernetes.go @@ -5,8 +5,8 @@ import ( "reflect" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" commoncfg "github.com/grafana/alloy/internal/component/common/config" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/useragent" promconfig "github.com/prometheus/common/config" "k8s.io/client-go/rest" diff --git a/internal/component/common/loki/client/client.go b/internal/component/common/loki/client/client.go index 0ca4fd3702..6eeb90b413 100644 --- a/internal/component/common/loki/client/client.go +++ b/internal/component/common/loki/client/client.go @@ -13,7 +13,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/useragent" "github.com/grafana/dskit/backoff" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/component/common/loki/client/internal/marker_handler.go b/internal/component/common/loki/client/internal/marker_handler.go index c51ecb51dc..82f25d788c 100644 --- a/internal/component/common/loki/client/internal/marker_handler.go +++ b/internal/component/common/loki/client/internal/marker_handler.go @@ -7,8 +7,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki/wal" + "github.com/grafana/alloy/internal/runtime/logging/level" ) type MarkerHandler interface { diff --git a/internal/component/common/loki/client/manager.go b/internal/component/common/loki/client/manager.go index 2b91d65210..892b5a7df8 100644 --- a/internal/component/common/loki/client/manager.go +++ b/internal/component/common/loki/client/manager.go @@ -7,8 +7,8 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki/client/internal" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/grafana/alloy/internal/component/common/loki" diff --git a/internal/component/common/loki/positions/positions.go b/internal/component/common/loki/positions/positions.go index 47fa473f92..55f3c3fd34 100644 --- a/internal/component/common/loki/positions/positions.go +++ b/internal/component/common/loki/positions/positions.go @@ -15,7 +15,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" yaml "gopkg.in/yaml.v2" ) diff --git a/internal/component/common/loki/wal/internal/watcher_state.go b/internal/component/common/loki/wal/internal/watcher_state.go index 74336d2680..fca13ccf50 100644 --- a/internal/component/common/loki/wal/internal/watcher_state.go +++ b/internal/component/common/loki/wal/internal/watcher_state.go @@ -4,7 +4,7 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" ) const ( diff --git a/internal/component/common/loki/wal/wal.go b/internal/component/common/loki/wal/wal.go index 83614a21b2..13ab5196f9 100644 --- a/internal/component/common/loki/wal/wal.go +++ b/internal/component/common/loki/wal/wal.go @@ -5,7 +5,7 @@ import ( "os" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/tsdb/wlog" diff --git a/internal/component/common/loki/wal/watcher.go b/internal/component/common/loki/wal/watcher.go index bfbd324fb2..82292ebd21 100644 --- a/internal/component/common/loki/wal/watcher.go +++ b/internal/component/common/loki/wal/watcher.go @@ -10,8 +10,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki/wal/internal" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/wlog" diff --git a/internal/component/common/loki/wal/watcher_test.go b/internal/component/common/loki/wal/watcher_test.go index 13292186d4..cbfb8153d9 100644 --- a/internal/component/common/loki/wal/watcher_test.go +++ b/internal/component/common/loki/wal/watcher_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/tsdb/record" diff --git a/internal/component/common/loki/wal/writer.go b/internal/component/common/loki/wal/writer.go index 46df4cb9f9..e478e54214 100644 --- a/internal/component/common/loki/wal/writer.go +++ b/internal/component/common/loki/wal/writer.go @@ -10,7 +10,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunks" diff --git a/internal/component/common/loki/wal/writer_test.go b/internal/component/common/loki/wal/writer_test.go index 24f7880109..69ab2297f6 100644 --- a/internal/component/common/loki/wal/writer_test.go +++ b/internal/component/common/loki/wal/writer_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" diff --git a/internal/component/common/net/server.go b/internal/component/common/net/server.go index 8162345aee..ba75ddc6c8 100644 --- a/internal/component/common/net/server.go +++ b/internal/component/common/net/server.go @@ -5,7 +5,7 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" dskit "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/internal/component/discovery/consulagent/promtail_consulagent.go b/internal/component/discovery/consulagent/promtail_consulagent.go index 7bf6d6eb7e..1a35cdd862 100644 --- a/internal/component/discovery/consulagent/promtail_consulagent.go +++ b/internal/component/discovery/consulagent/promtail_consulagent.go @@ -22,7 +22,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" consul "github.com/hashicorp/consul/api" conntrack "github.com/mwitkow/go-conntrack" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/component/discovery/process/process_stub.go b/internal/component/discovery/process/process_stub.go index 87d54fe910..2fc77414ec 100644 --- a/internal/component/discovery/process/process_stub.go +++ b/internal/component/discovery/process/process_stub.go @@ -5,10 +5,10 @@ package process import ( "context" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/discovery/relabel/relabel_test.go b/internal/component/discovery/relabel/relabel_test.go index 8340b4d8e4..6055fe05e0 100644 --- a/internal/component/discovery/relabel/relabel_test.go +++ b/internal/component/discovery/relabel/relabel_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/discovery/relabel" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/syntax" "github.com/stretchr/testify/require" ) diff --git a/internal/component/faro/receiver/exporters.go b/internal/component/faro/receiver/exporters.go index 99def5419e..70ad218221 100644 --- a/internal/component/faro/receiver/exporters.go +++ b/internal/component/faro/receiver/exporters.go @@ -9,10 +9,10 @@ import ( "github.com/go-kit/log" "github.com/go-logfmt/logfmt" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/faro/receiver/internal/payload" "github.com/grafana/alloy/internal/component/otelcol" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/internal/component/faro/receiver/handler.go b/internal/component/faro/receiver/handler.go index eb1d29ad35..95c55c7322 100644 --- a/internal/component/faro/receiver/handler.go +++ b/internal/component/faro/receiver/handler.go @@ -8,8 +8,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/faro/receiver/internal/payload" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/rs/cors" "go.opentelemetry.io/collector/client" diff --git a/internal/component/faro/receiver/receiver.go b/internal/component/faro/receiver/receiver.go index 3ae4ce1a77..b5ed5e572b 100644 --- a/internal/component/faro/receiver/receiver.go +++ b/internal/component/faro/receiver/receiver.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log" "github.com/go-sourcemap/sourcemap" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/faro/receiver/receiver_otelcol_test.go b/internal/component/faro/receiver/receiver_otelcol_test.go index 3894153e2f..4866f46426 100644 --- a/internal/component/faro/receiver/receiver_otelcol_test.go +++ b/internal/component/faro/receiver/receiver_otelcol_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/auth" "github.com/grafana/alloy/internal/component/otelcol/auth/headers" otlphttp "github.com/grafana/alloy/internal/component/otelcol/exporter/otlphttp" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/phayes/freeport" "github.com/stretchr/testify/require" diff --git a/internal/component/faro/receiver/receiver_test.go b/internal/component/faro/receiver/receiver_test.go index e4c2d2470a..17c11e9572 100644 --- a/internal/component/faro/receiver/receiver_test.go +++ b/internal/component/faro/receiver/receiver_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/otelcol" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/phayes/freeport" diff --git a/internal/component/faro/receiver/server.go b/internal/component/faro/receiver/server.go index 8c20131041..13b2c0d140 100644 --- a/internal/component/faro/receiver/server.go +++ b/internal/component/faro/receiver/server.go @@ -8,7 +8,7 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/middleware" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/component/faro/receiver/sourcemaps.go b/internal/component/faro/receiver/sourcemaps.go index 6cf722d414..eb8e947df0 100644 --- a/internal/component/faro/receiver/sourcemaps.go +++ b/internal/component/faro/receiver/sourcemaps.go @@ -16,8 +16,8 @@ import ( "github.com/go-kit/log" "github.com/go-sourcemap/sourcemap" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/faro/receiver/internal/payload" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util/wildcard" "github.com/prometheus/client_golang/prometheus" "github.com/vincent-petithory/dataurl" diff --git a/internal/component/local/file/file.go b/internal/component/local/file/file.go index 231b3380f1..0755237d80 100644 --- a/internal/component/local/file/file.go +++ b/internal/component/local/file/file.go @@ -10,10 +10,10 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" filedetector "github.com/grafana/alloy/internal/filedetector" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax/alloytypes" ) diff --git a/internal/component/local/file/file_test.go b/internal/component/local/file/file_test.go index b7adbf2a31..4615f22978 100644 --- a/internal/component/local/file/file_test.go +++ b/internal/component/local/file/file_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/local/file" filedetector "github.com/grafana/alloy/internal/filedetector" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/syntax/alloytypes" "github.com/stretchr/testify/require" ) diff --git a/internal/component/local/file_match/file.go b/internal/component/local/file_match/file.go index 3d2fb0591b..e5b9766e25 100644 --- a/internal/component/local/file_match/file.go +++ b/internal/component/local/file_match/file.go @@ -5,10 +5,10 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/local/file_match/watch.go b/internal/component/local/file_match/watch.go index 7572eeb525..2c36e5b651 100644 --- a/internal/component/local/file_match/watch.go +++ b/internal/component/local/file_match/watch.go @@ -7,8 +7,8 @@ import ( "github.com/go-kit/log" "github.com/bmatcuk/doublestar" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/discovery" + "github.com/grafana/alloy/internal/runtime/logging/level" ) // watch handles a single discovery.target for file watching. diff --git a/internal/component/loki/echo/echo.go b/internal/component/loki/echo/echo.go index 447450558e..0b2e5a7170 100644 --- a/internal/component/loki/echo/echo.go +++ b/internal/component/loki/echo/echo.go @@ -4,10 +4,10 @@ import ( "context" "sync" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/loki/process/process_test.go b/internal/component/loki/process/process_test.go index a9780e6c67..3d32ed024d 100644 --- a/internal/component/loki/process/process_test.go +++ b/internal/component/loki/process/process_test.go @@ -8,12 +8,12 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/loki/process/stages" lsf "github.com/grafana/alloy/internal/component/loki/source/file" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/loki/pkg/logproto" diff --git a/internal/component/loki/process/stages/drop.go b/internal/component/loki/process/stages/drop.go index 5be08b468d..a6c2ca2da5 100644 --- a/internal/component/loki/process/stages/drop.go +++ b/internal/component/loki/process/stages/drop.go @@ -10,7 +10,7 @@ import ( "github.com/alecthomas/units" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/internal/component/loki/process/stages/eventlogmessage.go b/internal/component/loki/process/stages/eventlogmessage.go index 986eabf20a..2cbdef78c9 100644 --- a/internal/component/loki/process/stages/eventlogmessage.go +++ b/internal/component/loki/process/stages/eventlogmessage.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/extensions.go b/internal/component/loki/process/stages/extensions.go index 51262210ec..d01662acb9 100644 --- a/internal/component/loki/process/stages/extensions.go +++ b/internal/component/loki/process/stages/extensions.go @@ -5,7 +5,7 @@ import ( "strings" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/internal/component/loki/process/stages/geoip.go b/internal/component/loki/process/stages/geoip.go index 7c8f43319b..47994acf7c 100644 --- a/internal/component/loki/process/stages/geoip.go +++ b/internal/component/loki/process/stages/geoip.go @@ -7,7 +7,7 @@ import ( "reflect" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/jmespath/go-jmespath" "github.com/oschwald/geoip2-golang" "github.com/oschwald/maxminddb-golang" diff --git a/internal/component/loki/process/stages/json.go b/internal/component/loki/process/stages/json.go index 6624b0098c..6752261e0d 100644 --- a/internal/component/loki/process/stages/json.go +++ b/internal/component/loki/process/stages/json.go @@ -6,7 +6,7 @@ import ( "reflect" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/jmespath/go-jmespath" json "github.com/json-iterator/go" ) diff --git a/internal/component/loki/process/stages/labels.go b/internal/component/loki/process/stages/labels.go index 3baf15b26c..e47517c329 100644 --- a/internal/component/loki/process/stages/labels.go +++ b/internal/component/loki/process/stages/labels.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/limit.go b/internal/component/loki/process/stages/limit.go index dccaf740d6..ecd93618ea 100644 --- a/internal/component/loki/process/stages/limit.go +++ b/internal/component/loki/process/stages/limit.go @@ -6,7 +6,7 @@ import ( "fmt" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "golang.org/x/time/rate" diff --git a/internal/component/loki/process/stages/logfmt.go b/internal/component/loki/process/stages/logfmt.go index bf077049fe..082ced5042 100644 --- a/internal/component/loki/process/stages/logfmt.go +++ b/internal/component/loki/process/stages/logfmt.go @@ -9,7 +9,7 @@ import ( "github.com/go-kit/log" "github.com/go-logfmt/logfmt" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/metric.go b/internal/component/loki/process/stages/metric.go index 2d05c4f006..632e918b16 100644 --- a/internal/component/loki/process/stages/metric.go +++ b/internal/component/loki/process/stages/metric.go @@ -9,8 +9,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/loki/process/metric" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/multiline.go b/internal/component/loki/process/stages/multiline.go index 1015d9e59e..cafb2dde30 100644 --- a/internal/component/loki/process/stages/multiline.go +++ b/internal/component/loki/process/stages/multiline.go @@ -9,8 +9,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/output.go b/internal/component/loki/process/stages/output.go index c7f116a16b..8a93963728 100644 --- a/internal/component/loki/process/stages/output.go +++ b/internal/component/loki/process/stages/output.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/pack.go b/internal/component/loki/process/stages/pack.go index 7b03afe945..7d28a48ec1 100644 --- a/internal/component/loki/process/stages/pack.go +++ b/internal/component/loki/process/stages/pack.go @@ -9,7 +9,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logqlmodel" json "github.com/json-iterator/go" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/component/loki/process/stages/pipeline_test.go b/internal/component/loki/process/stages/pipeline_test.go index 980c82b5a1..a490a963db 100644 --- a/internal/component/loki/process/stages/pipeline_test.go +++ b/internal/component/loki/process/stages/pipeline_test.go @@ -9,8 +9,8 @@ import ( "github.com/grafana/alloy/internal/component/common/loki/client/fake" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax" "github.com/grafana/loki/pkg/logproto" util_log "github.com/grafana/loki/pkg/util/log" diff --git a/internal/component/loki/process/stages/regex.go b/internal/component/loki/process/stages/regex.go index bf02a258d4..531c230515 100644 --- a/internal/component/loki/process/stages/regex.go +++ b/internal/component/loki/process/stages/regex.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/mitchellh/mapstructure" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/replace.go b/internal/component/loki/process/stages/replace.go index 098255dc3b..ed34927a73 100644 --- a/internal/component/loki/process/stages/replace.go +++ b/internal/component/loki/process/stages/replace.go @@ -10,7 +10,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/static_labels.go b/internal/component/loki/process/stages/static_labels.go index 2d9a7713d0..8ffaaa56f1 100644 --- a/internal/component/loki/process/stages/static_labels.go +++ b/internal/component/loki/process/stages/static_labels.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/template.go b/internal/component/loki/process/stages/template.go index 020042f720..00ace665d9 100644 --- a/internal/component/loki/process/stages/template.go +++ b/internal/component/loki/process/stages/template.go @@ -13,7 +13,7 @@ import ( "github.com/Masterminds/sprig/v3" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" "golang.org/x/crypto/sha3" diff --git a/internal/component/loki/process/stages/tenant.go b/internal/component/loki/process/stages/tenant.go index e9c452132b..16aafca9e3 100644 --- a/internal/component/loki/process/stages/tenant.go +++ b/internal/component/loki/process/stages/tenant.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/process/stages/timestamp.go b/internal/component/loki/process/stages/timestamp.go index 65dddfacdc..a2dc46c5d5 100644 --- a/internal/component/loki/process/stages/timestamp.go +++ b/internal/component/loki/process/stages/timestamp.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" lru "github.com/hashicorp/golang-lru" "github.com/prometheus/common/model" diff --git a/internal/component/loki/relabel/relabel.go b/internal/component/loki/relabel/relabel.go index fac11f526d..fb067bf0c8 100644 --- a/internal/component/loki/relabel/relabel.go +++ b/internal/component/loki/relabel/relabel.go @@ -5,11 +5,11 @@ import ( "reflect" "sync" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" lru "github.com/hashicorp/golang-lru" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/loki/relabel/relabel_test.go b/internal/component/loki/relabel/relabel_test.go index 6b863dd4d4..b6f3abdf63 100644 --- a/internal/component/loki/relabel/relabel_test.go +++ b/internal/component/loki/relabel/relabel_test.go @@ -7,12 +7,12 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" "github.com/grafana/alloy/internal/component/discovery" lsf "github.com/grafana/alloy/internal/component/loki/source/file" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/loki/pkg/logproto" diff --git a/internal/component/loki/rules/kubernetes/events.go b/internal/component/loki/rules/kubernetes/events.go index 453a3e290d..f6a708e66a 100644 --- a/internal/component/loki/rules/kubernetes/events.go +++ b/internal/component/loki/rules/kubernetes/events.go @@ -6,8 +6,8 @@ import ( "regexp" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/kubernetes" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/hashicorp/go-multierror" promv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/prometheus/prometheus/model/rulefmt" diff --git a/internal/component/loki/rules/kubernetes/rules.go b/internal/component/loki/rules/kubernetes/rules.go index 2cfbccdc6e..0643c4234f 100644 --- a/internal/component/loki/rules/kubernetes/rules.go +++ b/internal/component/loki/rules/kubernetes/rules.go @@ -7,11 +7,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" commonK8s "github.com/grafana/alloy/internal/component/common/kubernetes" "github.com/grafana/alloy/internal/featuregate" lokiClient "github.com/grafana/alloy/internal/loki/client" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/instrument" promListers "github.com/prometheus-operator/prometheus-operator/pkg/client/listers/monitoring/v1" diff --git a/internal/component/loki/source/api/internal/lokipush/push_api_server.go b/internal/component/loki/source/api/internal/lokipush/push_api_server.go index aeed301a4e..06b06051b2 100644 --- a/internal/component/loki/source/api/internal/lokipush/push_api_server.go +++ b/internal/component/loki/source/api/internal/lokipush/push_api_server.go @@ -11,10 +11,10 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" fnet "github.com/grafana/alloy/internal/component/common/net" frelabel "github.com/grafana/alloy/internal/component/common/relabel" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/tenant" "github.com/grafana/loki/pkg/loghttp/push" "github.com/grafana/loki/pkg/logproto" diff --git a/internal/component/loki/source/aws_firehose/internal/handler.go b/internal/component/loki/source/aws_firehose/internal/handler.go index 34a53033f7..a828e3de1a 100644 --- a/internal/component/loki/source/aws_firehose/internal/handler.go +++ b/internal/component/loki/source/aws_firehose/internal/handler.go @@ -15,7 +15,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go b/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go index d7c086b58d..7f5cb23afe 100644 --- a/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go +++ b/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go @@ -7,13 +7,13 @@ import ( "sync" "github.com/IBM/sarama" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" "github.com/grafana/alloy/internal/component/loki/source/azure_event_hubs/internal/parser" kt "github.com/grafana/alloy/internal/component/loki/source/internal/kafkatarget" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/flagext" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/cloudflare/cloudflare.go b/internal/component/loki/source/cloudflare/cloudflare.go index f8639b7161..47e5357b44 100644 --- a/internal/component/loki/source/cloudflare/cloudflare.go +++ b/internal/component/loki/source/cloudflare/cloudflare.go @@ -13,12 +13,12 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" cft "github.com/grafana/alloy/internal/component/loki/source/cloudflare/internal/cloudflaretarget" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax/alloytypes" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target.go index 9d1de17c42..90be69fdde 100644 --- a/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target.go +++ b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target.go @@ -13,9 +13,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/cloudflare-go" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/concurrency" diff --git a/internal/component/loki/source/docker/docker.go b/internal/component/loki/source/docker/docker.go index a64b142d8f..88e3be629b 100644 --- a/internal/component/loki/source/docker/docker.go +++ b/internal/component/loki/source/docker/docker.go @@ -15,7 +15,6 @@ import ( "github.com/docker/docker/client" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" types "github.com/grafana/alloy/internal/component/common/config" "github.com/grafana/alloy/internal/component/common/loki" @@ -24,6 +23,7 @@ import ( "github.com/grafana/alloy/internal/component/discovery" dt "github.com/grafana/alloy/internal/component/loki/source/docker/internal/dockertarget" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/useragent" "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/docker/docker_test.go b/internal/component/loki/source/docker/docker_test.go index 96d847a66c..e1e79a9e7e 100644 --- a/internal/component/loki/source/docker/docker_test.go +++ b/internal/component/loki/source/docker/docker_test.go @@ -14,11 +14,11 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki/client/fake" "github.com/grafana/alloy/internal/component/common/loki/positions" dt "github.com/grafana/alloy/internal/component/loki/source/docker/internal/dockertarget" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/component/loki/source/docker/internal/dockertarget/target.go b/internal/component/loki/source/docker/internal/dockertarget/target.go index 02d48b31c9..2e169aead9 100644 --- a/internal/component/loki/source/docker/internal/dockertarget/target.go +++ b/internal/component/loki/source/docker/internal/dockertarget/target.go @@ -18,9 +18,9 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/pkg/stdcopy" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/loki/source/docker/runner.go b/internal/component/loki/source/docker/runner.go index 7f3dfdd0c8..8faf7fd4f3 100644 --- a/internal/component/loki/source/docker/runner.go +++ b/internal/component/loki/source/docker/runner.go @@ -9,11 +9,11 @@ import ( "github.com/docker/docker/client" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" dt "github.com/grafana/alloy/internal/component/loki/source/docker/internal/dockertarget" "github.com/grafana/alloy/internal/runner" + "github.com/grafana/alloy/internal/runtime/logging/level" ) // A manager manages a set of running tailers. diff --git a/internal/component/loki/source/file/decompresser.go b/internal/component/loki/source/file/decompresser.go index 32d8925ca3..89fc580850 100644 --- a/internal/component/loki/source/file/decompresser.go +++ b/internal/component/loki/source/file/decompresser.go @@ -19,9 +19,9 @@ import ( "unsafe" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "go.uber.org/atomic" diff --git a/internal/component/loki/source/file/file.go b/internal/component/loki/source/file/file.go index c074e29907..dc1222e1fd 100644 --- a/internal/component/loki/source/file/file.go +++ b/internal/component/loki/source/file/file.go @@ -9,12 +9,12 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/tail/watch" "github.com/prometheus/common/model" ) diff --git a/internal/component/loki/source/file/file_test.go b/internal/component/loki/source/file/file_test.go index 816a81c738..fcd418b6f1 100644 --- a/internal/component/loki/source/file/file_test.go +++ b/internal/component/loki/source/file/file_test.go @@ -11,10 +11,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/discovery" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/file/tailer.go b/internal/component/loki/source/file/tailer.go index 78f3732351..8d3535bc2d 100644 --- a/internal/component/loki/source/file/tailer.go +++ b/internal/component/loki/source/file/tailer.go @@ -12,9 +12,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/util" "github.com/grafana/tail" diff --git a/internal/component/loki/source/gcplog/gcplog.go b/internal/component/loki/source/gcplog/gcplog.go index 6ef11d4735..9228a42efb 100644 --- a/internal/component/loki/source/gcplog/gcplog.go +++ b/internal/component/loki/source/gcplog/gcplog.go @@ -6,8 +6,8 @@ import ( "strings" "sync" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/relabel" diff --git a/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go index 593824df6e..1fe0efa7df 100644 --- a/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go @@ -13,7 +13,7 @@ import ( "cloud.google.com/go/pubsub" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/backoff" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" diff --git a/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target.go index ed446076c5..c90247422a 100644 --- a/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target.go @@ -14,7 +14,7 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" diff --git a/internal/component/loki/source/gelf/internal/target/gelftarget.go b/internal/component/loki/source/gelf/internal/target/gelftarget.go index 563eae6db8..6390e47b61 100644 --- a/internal/component/loki/source/gelf/internal/target/gelftarget.go +++ b/internal/component/loki/source/gelf/internal/target/gelftarget.go @@ -14,7 +14,7 @@ import ( "github.com/grafana/alloy/internal/component/common/loki" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/go-gelf/v2/gelf" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/loki/source/heroku/heroku.go b/internal/component/loki/source/heroku/heroku.go index b32222fef2..e6f511b102 100644 --- a/internal/component/loki/source/heroku/heroku.go +++ b/internal/component/loki/source/heroku/heroku.go @@ -5,13 +5,13 @@ import ( "reflect" "sync" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" fnet "github.com/grafana/alloy/internal/component/common/net" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" ht "github.com/grafana/alloy/internal/component/loki/source/heroku/internal/herokutarget" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/heroku/internal/herokutarget/herokutarget.go b/internal/component/loki/source/heroku/internal/herokutarget/herokutarget.go index 053dc3c79b..7b73e818f5 100644 --- a/internal/component/loki/source/heroku/internal/herokutarget/herokutarget.go +++ b/internal/component/loki/source/heroku/internal/herokutarget/herokutarget.go @@ -12,9 +12,9 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" fnet "github.com/grafana/alloy/internal/component/common/net" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" herokuEncoding "github.com/heroku/x/logplex/encoding" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/component/loki/source/internal/kafkatarget/consumer.go b/internal/component/loki/source/internal/kafkatarget/consumer.go index 0eb514f209..d3fa0e2be4 100644 --- a/internal/component/loki/source/internal/kafkatarget/consumer.go +++ b/internal/component/loki/source/internal/kafkatarget/consumer.go @@ -12,7 +12,7 @@ import ( "github.com/IBM/sarama" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/backoff" "github.com/grafana/loki/clients/pkg/promtail/targets/target" diff --git a/internal/component/loki/source/internal/kafkatarget/kafkatarget.go b/internal/component/loki/source/internal/kafkatarget/kafkatarget.go index ad3d4b1eb1..d8b6d3d1bd 100644 --- a/internal/component/loki/source/internal/kafkatarget/kafkatarget.go +++ b/internal/component/loki/source/internal/kafkatarget/kafkatarget.go @@ -10,8 +10,8 @@ import ( "github.com/IBM/sarama" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/loki/source/internal/kafkatarget/target_syncer.go b/internal/component/loki/source/internal/kafkatarget/target_syncer.go index e17325cd2e..966ccbbb5c 100644 --- a/internal/component/loki/source/internal/kafkatarget/target_syncer.go +++ b/internal/component/loki/source/internal/kafkatarget/target_syncer.go @@ -13,7 +13,7 @@ import ( "github.com/IBM/sarama" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" promconfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/loki/source/journal/internal/target/journaltarget.go b/internal/component/loki/source/journal/internal/target/journaltarget.go index 92b70b3fc4..c718d57b3d 100644 --- a/internal/component/loki/source/journal/internal/target/journaltarget.go +++ b/internal/component/loki/source/journal/internal/target/journaltarget.go @@ -18,7 +18,7 @@ import ( "github.com/coreos/go-systemd/sdjournal" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/journal/journal_stub.go b/internal/component/loki/source/journal/journal_stub.go index cbbbd8e5ab..5ce02dd9d8 100644 --- a/internal/component/loki/source/journal/journal_stub.go +++ b/internal/component/loki/source/journal/journal_stub.go @@ -5,9 +5,9 @@ package journal import ( "context" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/loki/source/kafka/kafka.go b/internal/component/loki/source/kafka/kafka.go index 1dbee69dc2..1d49f3311f 100644 --- a/internal/component/loki/source/kafka/kafka.go +++ b/internal/component/loki/source/kafka/kafka.go @@ -5,13 +5,13 @@ import ( "sync" "github.com/IBM/sarama" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/config" "github.com/grafana/alloy/internal/component/common/loki" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" kt "github.com/grafana/alloy/internal/component/loki/source/internal/kafkatarget" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax/alloytypes" "github.com/grafana/dskit/flagext" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/kubernetes/kubernetes.go b/internal/component/loki/source/kubernetes/kubernetes.go index 62591c4bec..e9cf40fc55 100644 --- a/internal/component/loki/source/kubernetes/kubernetes.go +++ b/internal/component/loki/source/kubernetes/kubernetes.go @@ -11,7 +11,6 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" commonk8s "github.com/grafana/alloy/internal/component/common/kubernetes" "github.com/grafana/alloy/internal/component/common/loki" @@ -19,6 +18,7 @@ import ( "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/loki/source/kubernetes/kubetail" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "k8s.io/client-go/kubernetes" ) diff --git a/internal/component/loki/source/kubernetes/kubetail/kubetail.go b/internal/component/loki/source/kubernetes/kubetail/kubetail.go index 5df3651d46..744ce88f60 100644 --- a/internal/component/loki/source/kubernetes/kubetail/kubetail.go +++ b/internal/component/loki/source/kubernetes/kubetail/kubetail.go @@ -6,10 +6,10 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" "github.com/grafana/alloy/internal/runner" + "github.com/grafana/alloy/internal/runtime/logging/level" "k8s.io/client-go/kubernetes" ) diff --git a/internal/component/loki/source/kubernetes/kubetail/tailer.go b/internal/component/loki/source/kubernetes/kubetail/tailer.go index 1fb6280c69..aa566feddd 100644 --- a/internal/component/loki/source/kubernetes/kubetail/tailer.go +++ b/internal/component/loki/source/kubernetes/kubetail/tailer.go @@ -11,9 +11,9 @@ import ( "github.com/blang/semver/v4" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/runner" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/backoff" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/kubernetes_events/event_controller.go b/internal/component/loki/source/kubernetes_events/event_controller.go index 6c0bba10f6..d6ed8be8ad 100644 --- a/internal/component/loki/source/kubernetes_events/event_controller.go +++ b/internal/component/loki/source/kubernetes_events/event_controller.go @@ -10,10 +10,10 @@ import ( "github.com/cespare/xxhash/v2" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" "github.com/grafana/alloy/internal/runner" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" corev1 "k8s.io/api/core/v1" diff --git a/internal/component/loki/source/kubernetes_events/kubernetes_events.go b/internal/component/loki/source/kubernetes_events/kubernetes_events.go index 3654fa6265..bf161db7b2 100644 --- a/internal/component/loki/source/kubernetes_events/kubernetes_events.go +++ b/internal/component/loki/source/kubernetes_events/kubernetes_events.go @@ -12,13 +12,13 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/kubernetes" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/positions" "github.com/grafana/alloy/internal/featuregate" "github.com/grafana/alloy/internal/runner" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/oklog/run" "k8s.io/client-go/rest" ) diff --git a/internal/component/loki/source/podlogs/controller.go b/internal/component/loki/source/podlogs/controller.go index bbdfe76afe..18c1b16c6b 100644 --- a/internal/component/loki/source/podlogs/controller.go +++ b/internal/component/loki/source/podlogs/controller.go @@ -8,8 +8,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" monitoringv1alpha2 "github.com/grafana/alloy/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2" + "github.com/grafana/alloy/internal/runtime/logging/level" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/internal/component/loki/source/podlogs/podlogs.go b/internal/component/loki/source/podlogs/podlogs.go index a993389065..db1bca5d99 100644 --- a/internal/component/loki/source/podlogs/podlogs.go +++ b/internal/component/loki/source/podlogs/podlogs.go @@ -10,7 +10,6 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/config" commonk8s "github.com/grafana/alloy/internal/component/common/kubernetes" @@ -19,6 +18,7 @@ import ( "github.com/grafana/alloy/internal/component/loki/source/kubernetes" "github.com/grafana/alloy/internal/component/loki/source/kubernetes/kubetail" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/oklog/run" kubeclient "k8s.io/client-go/kubernetes" diff --git a/internal/component/loki/source/podlogs/reconciler.go b/internal/component/loki/source/podlogs/reconciler.go index 66219d4cc1..977cb57bba 100644 --- a/internal/component/loki/source/podlogs/reconciler.go +++ b/internal/component/loki/source/podlogs/reconciler.go @@ -9,9 +9,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/loki/source/kubernetes/kubetail" monitoringv1alpha2 "github.com/grafana/alloy/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/grafana/ckit/shard" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go b/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go index cec1eda45a..49fd1d3d23 100644 --- a/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go +++ b/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go @@ -12,7 +12,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/influxdata/go-syslog/v3" "github.com/influxdata/go-syslog/v3/rfc5424" "github.com/prometheus/common/model" diff --git a/internal/component/loki/source/syslog/internal/syslogtarget/transport.go b/internal/component/loki/source/syslog/internal/syslogtarget/transport.go index 90218193d5..0773ad534f 100644 --- a/internal/component/loki/source/syslog/internal/syslogtarget/transport.go +++ b/internal/component/loki/source/syslog/internal/syslogtarget/transport.go @@ -21,7 +21,7 @@ import ( "github.com/mwitkow/go-conntrack" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/influxdata/go-syslog/v3" "github.com/prometheus/common/config" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/loki/source/syslog/syslog.go b/internal/component/loki/source/syslog/syslog.go index 808f66814e..37258a3535 100644 --- a/internal/component/loki/source/syslog/syslog.go +++ b/internal/component/loki/source/syslog/syslog.go @@ -5,12 +5,12 @@ import ( "reflect" "sync" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" st "github.com/grafana/alloy/internal/component/loki/source/syslog/internal/syslogtarget" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/prometheus/prometheus/model/relabel" ) diff --git a/internal/component/loki/source/windowsevent/component_stub.go b/internal/component/loki/source/windowsevent/component_stub.go index a050c1164b..c75cedacdb 100644 --- a/internal/component/loki/source/windowsevent/component_stub.go +++ b/internal/component/loki/source/windowsevent/component_stub.go @@ -5,9 +5,9 @@ package windowsevent import ( "context" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/loki/write/write_test.go b/internal/component/loki/write/write_test.go index 0b58a5a8d1..b610fe108d 100644 --- a/internal/component/loki/write/write_test.go +++ b/internal/component/loki/write/write_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/common/loki/wal" "github.com/grafana/alloy/internal/component/discovery" lsf "github.com/grafana/alloy/internal/component/loki/source/file" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/prometheus/common/model" diff --git a/internal/component/mimir/rules/kubernetes/events.go b/internal/component/mimir/rules/kubernetes/events.go index 2a4d6794b6..3fc30e230f 100644 --- a/internal/component/mimir/rules/kubernetes/events.go +++ b/internal/component/mimir/rules/kubernetes/events.go @@ -8,9 +8,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/kubernetes" "github.com/grafana/alloy/internal/mimir/client" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/hashicorp/go-multierror" promv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" promListers "github.com/prometheus-operator/prometheus-operator/pkg/client/listers/monitoring/v1" diff --git a/internal/component/mimir/rules/kubernetes/rules.go b/internal/component/mimir/rules/kubernetes/rules.go index f3bb58ffcc..82ab5b14bd 100644 --- a/internal/component/mimir/rules/kubernetes/rules.go +++ b/internal/component/mimir/rules/kubernetes/rules.go @@ -9,11 +9,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" commonK8s "github.com/grafana/alloy/internal/component/common/kubernetes" "github.com/grafana/alloy/internal/featuregate" mimirClient "github.com/grafana/alloy/internal/mimir/client" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/grafana/ckit/shard" "github.com/grafana/dskit/backoff" diff --git a/internal/component/otelcol/auth/auth_test.go b/internal/component/otelcol/auth/auth_test.go index 3647c91cbe..464e659f45 100644 --- a/internal/component/otelcol/auth/auth_test.go +++ b/internal/component/otelcol/auth/auth_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/auth" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/internal/component/otelcol/auth/basic/basic_test.go b/internal/component/otelcol/auth/basic/basic_test.go index 319f8f4385..33e48a5a58 100644 --- a/internal/component/otelcol/auth/basic/basic_test.go +++ b/internal/component/otelcol/auth/basic/basic_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/auth" "github.com/grafana/alloy/internal/component/otelcol/auth/basic" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/stretchr/testify/assert" diff --git a/internal/component/otelcol/auth/bearer/bearer_test.go b/internal/component/otelcol/auth/bearer/bearer_test.go index 99cf0d3585..3595e542b4 100644 --- a/internal/component/otelcol/auth/bearer/bearer_test.go +++ b/internal/component/otelcol/auth/bearer/bearer_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/auth" "github.com/grafana/alloy/internal/component/otelcol/auth/bearer" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/stretchr/testify/assert" diff --git a/internal/component/otelcol/auth/headers/headers_test.go b/internal/component/otelcol/auth/headers/headers_test.go index 636bee8ea0..5e57d2803a 100644 --- a/internal/component/otelcol/auth/headers/headers_test.go +++ b/internal/component/otelcol/auth/headers/headers_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/auth" "github.com/grafana/alloy/internal/component/otelcol/auth/headers" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension" diff --git a/internal/component/otelcol/auth/oauth2/oauth2_test.go b/internal/component/otelcol/auth/oauth2/oauth2_test.go index 95abab69b9..bb37bb242d 100644 --- a/internal/component/otelcol/auth/oauth2/oauth2_test.go +++ b/internal/component/otelcol/auth/oauth2/oauth2_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/auth" "github.com/grafana/alloy/internal/component/otelcol/auth/oauth2" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/stretchr/testify/require" diff --git a/internal/component/otelcol/auth/sigv4/sigv4_test.go b/internal/component/otelcol/auth/sigv4/sigv4_test.go index 5aff71024b..1f2ffa17ad 100644 --- a/internal/component/otelcol/auth/sigv4/sigv4_test.go +++ b/internal/component/otelcol/auth/sigv4/sigv4_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/auth" "github.com/grafana/alloy/internal/component/otelcol/auth/sigv4" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/stretchr/testify/assert" diff --git a/internal/component/otelcol/connector/spanlogs/spanlogs.go b/internal/component/otelcol/connector/spanlogs/spanlogs.go index b97584809d..72e00d70fd 100644 --- a/internal/component/otelcol/connector/spanlogs/spanlogs.go +++ b/internal/component/otelcol/connector/spanlogs/spanlogs.go @@ -5,12 +5,12 @@ import ( "context" "fmt" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fanoutconsumer" "github.com/grafana/alloy/internal/component/otelcol/internal/lazyconsumer" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax" ) diff --git a/internal/component/otelcol/connector/spanlogs/spanlogs_test.go b/internal/component/otelcol/connector/spanlogs/spanlogs_test.go index f2fc444e33..f4a95522e1 100644 --- a/internal/component/otelcol/connector/spanlogs/spanlogs_test.go +++ b/internal/component/otelcol/connector/spanlogs/spanlogs_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/connector/spanlogs" "github.com/grafana/alloy/internal/component/otelcol/processor/processortest" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/stretchr/testify/require" diff --git a/internal/component/otelcol/connector/spanmetrics/spanmetrics_test.go b/internal/component/otelcol/connector/spanmetrics/spanmetrics_test.go index 70b3a5824b..74646ed367 100644 --- a/internal/component/otelcol/connector/spanmetrics/spanmetrics_test.go +++ b/internal/component/otelcol/connector/spanmetrics/spanmetrics_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/connector/spanmetrics" "github.com/grafana/alloy/internal/component/otelcol/processor/processortest" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector" diff --git a/internal/component/otelcol/exporter/exporter_test.go b/internal/component/otelcol/exporter/exporter_test.go index 3e9f1dfcf4..b3daf8b140 100644 --- a/internal/component/otelcol/exporter/exporter_test.go +++ b/internal/component/otelcol/exporter/exporter_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/exporter" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/internal/component/otelcol/exporter/loki/internal/convert/convert.go b/internal/component/otelcol/exporter/loki/internal/convert/convert.go index 88b9428923..31f6e2cf45 100644 --- a/internal/component/otelcol/exporter/loki/internal/convert/convert.go +++ b/internal/component/otelcol/exporter/loki/internal/convert/convert.go @@ -13,8 +13,8 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" + "github.com/grafana/alloy/internal/runtime/logging/level" loki_translator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki" "github.com/prometheus/client_golang/prometheus" "go.opentelemetry.io/collector/consumer" diff --git a/internal/component/otelcol/exporter/otlp/otlp_test.go b/internal/component/otelcol/exporter/otlp/otlp_test.go index 250b5dc320..31e2a753e8 100644 --- a/internal/component/otelcol/exporter/otlp/otlp_test.go +++ b/internal/component/otelcol/exporter/otlp/otlp_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/exporter/otlp" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/dskit/backoff" diff --git a/internal/component/otelcol/exporter/otlphttp/otlphttp_test.go b/internal/component/otelcol/exporter/otlphttp/otlphttp_test.go index 6f4e0e5eb8..45bb65cd9f 100644 --- a/internal/component/otelcol/exporter/otlphttp/otlphttp_test.go +++ b/internal/component/otelcol/exporter/otlphttp/otlphttp_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/exporter/otlphttp" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/dskit/backoff" diff --git a/internal/component/otelcol/exporter/prometheus/internal/convert/convert.go b/internal/component/otelcol/exporter/prometheus/internal/convert/convert.go index f41028cad2..27625dbfc0 100644 --- a/internal/component/otelcol/exporter/prometheus/internal/convert/convert.go +++ b/internal/component/otelcol/exporter/prometheus/internal/convert/convert.go @@ -18,7 +18,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/exemplar" diff --git a/internal/component/otelcol/extension/extension_test.go b/internal/component/otelcol/extension/extension_test.go index cc57ebc2d6..9fccec5c13 100644 --- a/internal/component/otelcol/extension/extension_test.go +++ b/internal/component/otelcol/extension/extension_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/extension" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go index a0c633183a..d21d82b529 100644 --- a/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go +++ b/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/extension/jaeger_remote_sampling" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/phayes/freeport" diff --git a/internal/component/otelcol/internal/scheduler/host.go b/internal/component/otelcol/internal/scheduler/host.go index 9a4d823df3..ce79d72b84 100644 --- a/internal/component/otelcol/internal/scheduler/host.go +++ b/internal/component/otelcol/internal/scheduler/host.go @@ -2,7 +2,7 @@ package scheduler import ( "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/internal/component/otelcol/internal/scheduler/scheduler.go b/internal/component/otelcol/internal/scheduler/scheduler.go index a6178e488f..022c09dadf 100644 --- a/internal/component/otelcol/internal/scheduler/scheduler.go +++ b/internal/component/otelcol/internal/scheduler/scheduler.go @@ -9,8 +9,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/logging/level" otelcomponent "go.opentelemetry.io/collector/component" "go.uber.org/multierr" ) diff --git a/internal/component/otelcol/internal/scheduler/scheduler_test.go b/internal/component/otelcol/internal/scheduler/scheduler_test.go index 0c07e71f24..5f238b33de 100644 --- a/internal/component/otelcol/internal/scheduler/scheduler_test.go +++ b/internal/component/otelcol/internal/scheduler/scheduler_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/internal/scheduler" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/internal/component/otelcol/processor/attributes/attributes_test.go b/internal/component/otelcol/processor/attributes/attributes_test.go index 918a217f14..e2019982cd 100644 --- a/internal/component/otelcol/processor/attributes/attributes_test.go +++ b/internal/component/otelcol/processor/attributes/attributes_test.go @@ -6,10 +6,10 @@ import ( "net" "testing" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/processor/attributes" "github.com/grafana/alloy/internal/component/otelcol/processor/processortest" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/mitchellh/mapstructure" diff --git a/internal/component/otelcol/processor/batch/batch_test.go b/internal/component/otelcol/processor/batch/batch_test.go index 8e6aed93d3..12604eff83 100644 --- a/internal/component/otelcol/processor/batch/batch_test.go +++ b/internal/component/otelcol/processor/batch/batch_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" "github.com/grafana/alloy/internal/component/otelcol/processor/batch" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/dskit/backoff" diff --git a/internal/component/otelcol/processor/discovery/discovery.go b/internal/component/otelcol/processor/discovery/discovery.go index 8aa357796c..dbbf2e6c8f 100644 --- a/internal/component/otelcol/processor/discovery/discovery.go +++ b/internal/component/otelcol/processor/discovery/discovery.go @@ -6,13 +6,13 @@ import ( "fmt" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fanoutconsumer" "github.com/grafana/alloy/internal/component/otelcol/internal/lazyconsumer" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" promsdconsumer "github.com/grafana/alloy/internal/static/traces/promsdprocessor/consumer" "github.com/grafana/alloy/syntax" ) diff --git a/internal/component/otelcol/processor/discovery/discovery_test.go b/internal/component/otelcol/processor/discovery/discovery_test.go index 001050650a..a94332fc1b 100644 --- a/internal/component/otelcol/processor/discovery/discovery_test.go +++ b/internal/component/otelcol/processor/discovery/discovery_test.go @@ -5,9 +5,9 @@ import ( "fmt" "testing" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/processor/discovery" "github.com/grafana/alloy/internal/component/otelcol/processor/processortest" + "github.com/grafana/alloy/internal/runtime/componenttest" promsdconsumer "github.com/grafana/alloy/internal/static/traces/promsdprocessor/consumer" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" diff --git a/internal/component/otelcol/processor/memorylimiter/memorylimiter_test.go b/internal/component/otelcol/processor/memorylimiter/memorylimiter_test.go index bb0122e5ca..ec72aaf4e5 100644 --- a/internal/component/otelcol/processor/memorylimiter/memorylimiter_test.go +++ b/internal/component/otelcol/processor/memorylimiter/memorylimiter_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" "github.com/grafana/alloy/internal/component/otelcol/processor/memorylimiter" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/dskit/backoff" diff --git a/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go index 48e6829917..358b7972d6 100644 --- a/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go +++ b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/grafana/alloy/internal/alloy/componenttest" probabilisticsampler "github.com/grafana/alloy/internal/component/otelcol/processor/probabilistic_sampler" "github.com/grafana/alloy/internal/component/otelcol/processor/processortest" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor" diff --git a/internal/component/otelcol/processor/processor_test.go b/internal/component/otelcol/processor/processor_test.go index d167342550..060e882d3c 100644 --- a/internal/component/otelcol/processor/processor_test.go +++ b/internal/component/otelcol/processor/processor_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" "github.com/grafana/alloy/internal/component/otelcol/processor" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/internal/component/otelcol/processor/processortest/processortest.go b/internal/component/otelcol/processor/processortest/processortest.go index 573c915b50..3dfb99f108 100644 --- a/internal/component/otelcol/processor/processortest/processortest.go +++ b/internal/component/otelcol/processor/processortest/processortest.go @@ -6,11 +6,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/dskit/backoff" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/plog" diff --git a/internal/component/otelcol/processor/span/span_test.go b/internal/component/otelcol/processor/span/span_test.go index 98ce61e076..0de7e98f41 100644 --- a/internal/component/otelcol/processor/span/span_test.go +++ b/internal/component/otelcol/processor/span/span_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol/processor/processortest" "github.com/grafana/alloy/internal/component/otelcol/processor/span" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/mitchellh/mapstructure" diff --git a/internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go b/internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go index 4a26635d76..4235abc6a7 100644 --- a/internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go +++ b/internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/dskit/backoff" diff --git a/internal/component/otelcol/receiver/file_stats/file_stats_shim.go b/internal/component/otelcol/receiver/file_stats/file_stats_shim.go index ac9ed2f9ad..d2f03b8552 100644 --- a/internal/component/otelcol/receiver/file_stats/file_stats_shim.go +++ b/internal/component/otelcol/receiver/file_stats/file_stats_shim.go @@ -9,9 +9,9 @@ import ( "runtime" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/otelcol/receiver/jaeger/jaeger_test.go b/internal/component/otelcol/receiver/jaeger/jaeger_test.go index dba0e77d27..fb008409d0 100644 --- a/internal/component/otelcol/receiver/jaeger/jaeger_test.go +++ b/internal/component/otelcol/receiver/jaeger/jaeger_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/receiver/jaeger" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/phayes/freeport" diff --git a/internal/component/otelcol/receiver/loki/loki.go b/internal/component/otelcol/receiver/loki/loki.go index 88d0282478..a839d9dd8d 100644 --- a/internal/component/otelcol/receiver/loki/loki.go +++ b/internal/component/otelcol/receiver/loki/loki.go @@ -8,12 +8,12 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fanoutconsumer" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" loki_translator "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/translator/loki" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog" diff --git a/internal/component/otelcol/receiver/loki/loki_test.go b/internal/component/otelcol/receiver/loki/loki_test.go index b46c116a42..b44a960397 100644 --- a/internal/component/otelcol/receiver/loki/loki_test.go +++ b/internal/component/otelcol/receiver/loki/loki_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" lokiapi "github.com/grafana/alloy/internal/component/common/loki" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/loki/pkg/logproto" diff --git a/internal/component/otelcol/receiver/opencensus/opencensus_test.go b/internal/component/otelcol/receiver/opencensus/opencensus_test.go index 3bf30519fa..e0cf268cd5 100644 --- a/internal/component/otelcol/receiver/opencensus/opencensus_test.go +++ b/internal/component/otelcol/receiver/opencensus/opencensus_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/receiver/opencensus" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver" diff --git a/internal/component/otelcol/receiver/otlp/otlp_test.go b/internal/component/otelcol/receiver/otlp/otlp_test.go index 72d65785c8..6f3259cce2 100644 --- a/internal/component/otelcol/receiver/otlp/otlp_test.go +++ b/internal/component/otelcol/receiver/otlp/otlp_test.go @@ -8,11 +8,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" "github.com/grafana/alloy/internal/component/otelcol/receiver/otlp" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/dskit/backoff" diff --git a/internal/component/otelcol/receiver/prometheus/prometheus_test.go b/internal/component/otelcol/receiver/prometheus/prometheus_test.go index d4cf331c80..f6d101678b 100644 --- a/internal/component/otelcol/receiver/prometheus/prometheus_test.go +++ b/internal/component/otelcol/receiver/prometheus/prometheus_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" "github.com/grafana/alloy/internal/component/otelcol/receiver/prometheus" alloyprometheus "github.com/grafana/alloy/internal/component/prometheus" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/prometheus/common/model" diff --git a/internal/component/otelcol/receiver/receiver_test.go b/internal/component/otelcol/receiver/receiver_test.go index ddfcb6f112..866c90c1ab 100644 --- a/internal/component/otelcol/receiver/receiver_test.go +++ b/internal/component/otelcol/receiver/receiver_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/internal/fakeconsumer" "github.com/grafana/alloy/internal/component/otelcol/receiver" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/internal/component/otelcol/receiver/zipkin/zipkin_test.go b/internal/component/otelcol/receiver/zipkin/zipkin_test.go index 88be6ca730..a831c194ea 100644 --- a/internal/component/otelcol/receiver/zipkin/zipkin_test.go +++ b/internal/component/otelcol/receiver/zipkin/zipkin_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/otelcol" "github.com/grafana/alloy/internal/component/otelcol/receiver/zipkin" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver" diff --git a/internal/component/prometheus/exporter/exporter.go b/internal/component/prometheus/exporter/exporter.go index c198c5973f..7c873e64b2 100644 --- a/internal/component/prometheus/exporter/exporter.go +++ b/internal/component/prometheus/exporter/exporter.go @@ -9,9 +9,9 @@ import ( "strings" "sync" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/discovery" + "github.com/grafana/alloy/internal/runtime/logging/level" http_service "github.com/grafana/alloy/internal/service/http" "github.com/grafana/alloy/internal/static/integrations" "github.com/prometheus/common/model" diff --git a/internal/component/prometheus/operator/common/component.go b/internal/component/prometheus/operator/common/component.go index addfd19a2b..666ec42aeb 100644 --- a/internal/component/prometheus/operator/common/component.go +++ b/internal/component/prometheus/operator/common/component.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/prometheus/operator" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/grafana/alloy/internal/service/labelstore" "gopkg.in/yaml.v3" diff --git a/internal/component/prometheus/operator/common/crdmanager.go b/internal/component/prometheus/operator/common/crdmanager.go index 73da1e6cb0..f1f0140d46 100644 --- a/internal/component/prometheus/operator/common/crdmanager.go +++ b/internal/component/prometheus/operator/common/crdmanager.go @@ -10,9 +10,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/prometheus" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/grafana/alloy/internal/service/http" "github.com/grafana/alloy/internal/service/labelstore" diff --git a/internal/component/prometheus/receive_http/receive_http.go b/internal/component/prometheus/receive_http/receive_http.go index b2d49dc81f..7a1f80aca4 100644 --- a/internal/component/prometheus/receive_http/receive_http.go +++ b/internal/component/prometheus/receive_http/receive_http.go @@ -8,11 +8,11 @@ import ( "sync" "github.com/gorilla/mux" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" fnet "github.com/grafana/alloy/internal/component/common/net" alloyprom "github.com/grafana/alloy/internal/component/prometheus" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/labelstore" "github.com/grafana/alloy/internal/util" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/component/prometheus/relabel/relabel_test.go b/internal/component/prometheus/relabel/relabel_test.go index 9ae7629b1f..33695cd140 100644 --- a/internal/component/prometheus/relabel/relabel_test.go +++ b/internal/component/prometheus/relabel/relabel_test.go @@ -8,10 +8,10 @@ import ( "context" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" alloy_relabel "github.com/grafana/alloy/internal/component/common/relabel" "github.com/grafana/alloy/internal/component/prometheus" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/service/labelstore" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" diff --git a/internal/component/prometheus/remotewrite/remote_write.go b/internal/component/prometheus/remotewrite/remote_write.go index 8bfc905b90..c9b26475db 100644 --- a/internal/component/prometheus/remotewrite/remote_write.go +++ b/internal/component/prometheus/remotewrite/remote_write.go @@ -10,11 +10,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/alloyseed" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/prometheus" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/labelstore" "github.com/grafana/alloy/internal/static/metrics/wal" "github.com/grafana/alloy/internal/useragent" diff --git a/internal/component/prometheus/remotewrite/remote_write_test.go b/internal/component/prometheus/remotewrite/remote_write_test.go index b7fc1b331f..08440c1580 100644 --- a/internal/component/prometheus/remotewrite/remote_write_test.go +++ b/internal/component/prometheus/remotewrite/remote_write_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component/prometheus/remotewrite" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/prometheus/scrape/scrape.go b/internal/component/prometheus/scrape/scrape.go index 4693d08959..7f517a7fea 100644 --- a/internal/component/prometheus/scrape/scrape.go +++ b/internal/component/prometheus/scrape/scrape.go @@ -17,12 +17,12 @@ import ( "github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/storage" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" component_config "github.com/grafana/alloy/internal/component/common/config" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/prometheus" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/grafana/alloy/internal/service/http" "github.com/grafana/alloy/internal/service/labelstore" diff --git a/internal/component/pyroscope/ebpf/ebpf_linux.go b/internal/component/pyroscope/ebpf/ebpf_linux.go index fe9c771e86..2d00a72c0c 100644 --- a/internal/component/pyroscope/ebpf/ebpf_linux.go +++ b/internal/component/pyroscope/ebpf/ebpf_linux.go @@ -10,10 +10,10 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/pyroscope" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ebpfspy "github.com/grafana/pyroscope/ebpf" demangle2 "github.com/grafana/pyroscope/ebpf/cpp/demangle" "github.com/grafana/pyroscope/ebpf/pprof" diff --git a/internal/component/pyroscope/ebpf/ebpf_placeholder.go b/internal/component/pyroscope/ebpf/ebpf_placeholder.go index 3cff40c64c..822a944660 100644 --- a/internal/component/pyroscope/ebpf/ebpf_placeholder.go +++ b/internal/component/pyroscope/ebpf/ebpf_placeholder.go @@ -5,9 +5,9 @@ package ebpf import ( "context" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/pyroscope/java/java.go b/internal/component/pyroscope/java/java.go index d659651cb4..ef0c0ca602 100644 --- a/internal/component/pyroscope/java/java.go +++ b/internal/component/pyroscope/java/java.go @@ -9,11 +9,11 @@ import ( "strconv" "sync" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/pyroscope" "github.com/grafana/alloy/internal/component/pyroscope/java/asprof" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) const ( diff --git a/internal/component/pyroscope/java/java_stub.go b/internal/component/pyroscope/java/java_stub.go index 4ea7478b30..eb7179bc7c 100644 --- a/internal/component/pyroscope/java/java_stub.go +++ b/internal/component/pyroscope/java/java_stub.go @@ -5,9 +5,9 @@ package java import ( "context" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/component/pyroscope/java/loop.go b/internal/component/pyroscope/java/loop.go index 2ba57330ac..1dfa3605a4 100644 --- a/internal/component/pyroscope/java/loop.go +++ b/internal/component/pyroscope/java/loop.go @@ -13,10 +13,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/discovery" "github.com/grafana/alloy/internal/component/pyroscope" "github.com/grafana/alloy/internal/component/pyroscope/java/asprof" + "github.com/grafana/alloy/internal/runtime/logging/level" jfrpprof "github.com/grafana/jfr-parser/pprof" jfrpprofPyroscope "github.com/grafana/jfr-parser/pprof/pyroscope" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/component/pyroscope/scrape/manager.go b/internal/component/pyroscope/scrape/manager.go index 14a9c1ae8b..e6f469b481 100644 --- a/internal/component/pyroscope/scrape/manager.go +++ b/internal/component/pyroscope/scrape/manager.go @@ -6,8 +6,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/pyroscope" + "github.com/grafana/alloy/internal/runtime/logging/level" config_util "github.com/prometheus/common/config" "github.com/prometheus/prometheus/discovery/targetgroup" ) diff --git a/internal/component/pyroscope/scrape/scrape.go b/internal/component/pyroscope/scrape/scrape.go index 906d3f067b..504ee6ae6f 100644 --- a/internal/component/pyroscope/scrape/scrape.go +++ b/internal/component/pyroscope/scrape/scrape.go @@ -11,9 +11,9 @@ import ( "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/pyroscope" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service/cluster" "github.com/grafana/alloy/internal/service/http" diff --git a/internal/component/pyroscope/scrape/scrape_loop.go b/internal/component/pyroscope/scrape/scrape_loop.go index 3127316c29..c68cde74e9 100644 --- a/internal/component/pyroscope/scrape/scrape_loop.go +++ b/internal/component/pyroscope/scrape/scrape_loop.go @@ -11,8 +11,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/pyroscope" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/useragent" commonconfig "github.com/prometheus/common/config" "github.com/prometheus/prometheus/discovery/targetgroup" diff --git a/internal/component/pyroscope/write/write.go b/internal/component/pyroscope/write/write.go index 1fb8c8cb88..a2ce640c71 100644 --- a/internal/component/pyroscope/write/write.go +++ b/internal/component/pyroscope/write/write.go @@ -7,10 +7,10 @@ import ( "time" "connectrpc.com/connect" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/alloyseed" "github.com/grafana/alloy/internal/component/pyroscope" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/useragent" "github.com/oklog/run" commonconfig "github.com/prometheus/common/config" diff --git a/internal/component/remote/http/http.go b/internal/component/remote/http/http.go index e9ad2862e8..4582a3a58c 100644 --- a/internal/component/remote/http/http.go +++ b/internal/component/remote/http/http.go @@ -11,10 +11,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" common_config "github.com/grafana/alloy/internal/component/common/config" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/useragent" "github.com/grafana/alloy/syntax/alloytypes" prom_config "github.com/prometheus/common/config" diff --git a/internal/component/remote/http/http_test.go b/internal/component/remote/http/http_test.go index 672afabbe3..7bb3ef5379 100644 --- a/internal/component/remote/http/http_test.go +++ b/internal/component/remote/http/http_test.go @@ -10,9 +10,9 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging/level" http_component "github.com/grafana/alloy/internal/component/remote/http" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/alloy/syntax/alloytypes" diff --git a/internal/component/remote/vault/refresher.go b/internal/component/remote/vault/refresher.go index 49191b3da9..68afd24cd9 100644 --- a/internal/component/remote/vault/refresher.go +++ b/internal/component/remote/vault/refresher.go @@ -7,8 +7,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/logging/level" vault "github.com/hashicorp/vault/api" "github.com/prometheus/client_golang/prometheus" ) diff --git a/internal/component/remote/vault/vault.go b/internal/component/remote/vault/vault.go index 4c88e63fca..deb48caf08 100644 --- a/internal/component/remote/vault/vault.go +++ b/internal/component/remote/vault/vault.go @@ -7,9 +7,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax/alloytypes" "github.com/oklog/run" diff --git a/internal/component/remote/vault/vault_test.go b/internal/component/remote/vault/vault_test.go index 64ad917aab..d5d60dc3de 100644 --- a/internal/component/remote/vault/vault_test.go +++ b/internal/component/remote/vault/vault_test.go @@ -12,7 +12,7 @@ import ( "github.com/docker/go-connections/nat" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/componenttest" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" "github.com/grafana/alloy/syntax/alloytypes" diff --git a/internal/converter/internal/staticconvert/internal/build/builder_logging.go b/internal/converter/internal/staticconvert/internal/build/builder_logging.go index 7dec8a2bee..ee4f12aee0 100644 --- a/internal/converter/internal/staticconvert/internal/build/builder_logging.go +++ b/internal/converter/internal/staticconvert/internal/build/builder_logging.go @@ -3,8 +3,8 @@ package build import ( "reflect" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/converter/internal/common" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/static/server" ) diff --git a/internal/converter/internal/test_common/testing.go b/internal/converter/internal/test_common/testing.go index e4df4aa966..393d71d1fa 100644 --- a/internal/converter/internal/test_common/testing.go +++ b/internal/converter/internal/test_common/testing.go @@ -12,10 +12,10 @@ import ( "strings" "testing" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/converter/diag" "github.com/grafana/alloy/internal/featuregate" + alloy_runtime "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/service" cluster_service "github.com/grafana/alloy/internal/service/cluster" http_service "github.com/grafana/alloy/internal/service/http" @@ -174,7 +174,7 @@ func validateAlloy(t *testing.T, expectedAlloy []byte, actualAlloy []byte, loadA // attemptLoadingAlloyConfig will attempt to load the Alloy config and report any errors. func attemptLoadingAlloyConfig(t *testing.T, bb []byte) { - cfg, err := alloy.ParseSource(t.Name(), bb) + cfg, err := alloy_runtime.ParseSource(t.Name(), bb) require.NoError(t, err, "the output Alloy config failed to parse: %s", string(normalizeLineEndings(bb))) // The below check suffers from test race conditions on Windows. Our goal here is to verify config conversions, @@ -194,7 +194,7 @@ func attemptLoadingAlloyConfig(t *testing.T, bb []byte) { }) require.NoError(t, err) - f := alloy.New(alloy.Options{ + f := alloy_runtime.New(alloy_runtime.Options{ Logger: logger, DataPath: t.TempDir(), MinStability: featuregate.StabilityExperimental, diff --git a/internal/filedetector/detector.go b/internal/filedetector/detector.go index 1740155785..62e1f41556 100644 --- a/internal/filedetector/detector.go +++ b/internal/filedetector/detector.go @@ -9,7 +9,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" ) // Detector is used to specify how changes to the file should be detected. diff --git a/internal/alloy/alloy.go b/internal/runtime/alloy.go similarity index 92% rename from internal/alloy/alloy.go rename to internal/runtime/alloy.go index fa8285ca24..a5117584b7 100644 --- a/internal/alloy/alloy.go +++ b/internal/runtime/alloy.go @@ -1,4 +1,4 @@ -// Package alloy implements the Alloy component graph system. Alloy configuration +// Package runtime implements the Alloy component graph system. Alloy configuration // sources are parsed from Alloy syntax, which contain a listing of components to run. // // # Components @@ -43,7 +43,7 @@ // state if a node shuts down or is given an invalid config. This prevents // a domino effect of a single failed node taking down other node // which are otherwise healthy. -package alloy +package runtime import ( "context" @@ -51,12 +51,12 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/worker" - "github.com/grafana/alloy/internal/alloy/logging" - "github.com/grafana/alloy/internal/alloy/logging/level" - "github.com/grafana/alloy/internal/alloy/tracing" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/worker" + "github.com/grafana/alloy/internal/runtime/logging" + "github.com/grafana/alloy/internal/runtime/logging/level" + "github.com/grafana/alloy/internal/runtime/tracing" "github.com/grafana/alloy/internal/service" "github.com/prometheus/client_golang/prometheus" "go.uber.org/atomic" @@ -108,8 +108,8 @@ type Options struct { Services []service.Service } -// Alloy is the Alloy system. -type Alloy struct { +// Runtime is the Alloy system. +type Runtime struct { log *logging.Logger tracer *tracing.Tracer opts controllerOptions @@ -126,7 +126,7 @@ type Alloy struct { } // New creates a new, unstarted Alloy controller. Call Run to run the controller. -func New(o Options) *Alloy { +func New(o Options) *Runtime { return newController(controllerOptions{ Options: o, ModuleRegistry: newModuleRegistry(), @@ -150,7 +150,7 @@ type controllerOptions struct { // newController creates a new, unstarted Alloy controller with a specific // moduleRegistry. Modules created by the controller will be passed to the // given modReg. -func newController(o controllerOptions) *Alloy { +func newController(o controllerOptions) *Runtime { var ( log = o.Logger tracer = o.Tracer @@ -171,7 +171,7 @@ func newController(o controllerOptions) *Alloy { workerPool = worker.NewDefaultWorkerPool() } - f := &Alloy{ + f := &Runtime{ log: log, tracer: tracer, opts: o, @@ -233,7 +233,7 @@ func newController(o controllerOptions) *Alloy { // Run starts the Alloy controller, blocking until the provided context is // canceled. Run must only be called once. -func (f *Alloy) Run(ctx context.Context) { +func (f *Runtime) Run(ctx context.Context) { defer func() { _ = f.sched.Close() }() defer f.loader.Cleanup(!f.opts.IsModule) defer level.Debug(f.log).Log("msg", "Alloy controller exiting") @@ -290,12 +290,12 @@ func (f *Alloy) Run(ctx context.Context) { // The controller will only start running components after Load is called once // without any configuration errors. // LoadSource uses default loader configuration. -func (f *Alloy) LoadSource(source *Source, args map[string]any) error { +func (f *Runtime) LoadSource(source *Source, args map[string]any) error { return f.loadSource(source, args, nil) } // Same as above but with a customComponentRegistry that provides custom component definitions. -func (f *Alloy) loadSource(source *Source, args map[string]any, customComponentRegistry *controller.CustomComponentRegistry) error { +func (f *Runtime) loadSource(source *Source, args map[string]any, customComponentRegistry *controller.CustomComponentRegistry) error { f.loadMut.Lock() defer f.loadMut.Unlock() @@ -324,6 +324,6 @@ func (f *Alloy) loadSource(source *Source, args map[string]any, customComponentR } // Ready returns whether the Alloy controller has finished its initial load. -func (f *Alloy) Ready() bool { +func (f *Runtime) Ready() bool { return f.loadedOnce.Load() } diff --git a/internal/alloy/alloy_components.go b/internal/runtime/alloy_components.go similarity index 86% rename from internal/alloy/alloy_components.go rename to internal/runtime/alloy_components.go index 02d18f2a7a..5f252ed1bf 100644 --- a/internal/alloy/alloy_components.go +++ b/internal/runtime/alloy_components.go @@ -1,15 +1,15 @@ -package alloy +package runtime import ( "fmt" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/dag" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/dag" ) // GetComponent implements [component.Provider]. -func (f *Alloy) GetComponent(id component.ID, opts component.InfoOptions) (*component.Info, error) { +func (f *Runtime) GetComponent(id component.ID, opts component.InfoOptions) (*component.Info, error) { f.loadMut.RLock() defer f.loadMut.RUnlock() @@ -38,7 +38,7 @@ func (f *Alloy) GetComponent(id component.ID, opts component.InfoOptions) (*comp } // ListComponents implements [component.Provider]. -func (f *Alloy) ListComponents(moduleID string, opts component.InfoOptions) ([]*component.Info, error) { +func (f *Runtime) ListComponents(moduleID string, opts component.InfoOptions) ([]*component.Info, error) { f.loadMut.RLock() defer f.loadMut.RUnlock() @@ -63,7 +63,7 @@ func (f *Alloy) ListComponents(moduleID string, opts component.InfoOptions) ([]* return detail, nil } -func (f *Alloy) getComponentDetail(cn controller.ComponentNode, graph *dag.Graph, opts component.InfoOptions) *component.Info { +func (f *Runtime) getComponentDetail(cn controller.ComponentNode, graph *dag.Graph, opts component.InfoOptions) *component.Info { var references, referencedBy []string // Skip over any edge which isn't between two component nodes. This is a diff --git a/internal/alloy/alloy_services.go b/internal/runtime/alloy_services.go similarity index 86% rename from internal/alloy/alloy_services.go rename to internal/runtime/alloy_services.go index cd3d4939f2..d760f3a44c 100644 --- a/internal/alloy/alloy_services.go +++ b/internal/runtime/alloy_services.go @@ -1,18 +1,18 @@ -package alloy +package runtime import ( "context" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/dag" - "github.com/grafana/alloy/internal/alloy/internal/worker" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/dag" + "github.com/grafana/alloy/internal/runtime/internal/worker" "github.com/grafana/alloy/internal/service" ) // GetServiceConsumers implements [service.Host]. It returns a slice of // [component.Component] and [service.Service]s which declared a dependency on // the named service. -func (f *Alloy) GetServiceConsumers(serviceName string) []service.Consumer { +func (f *Runtime) GetServiceConsumers(serviceName string) []service.Consumer { consumers := serviceConsumersForGraph(f.loader.OriginalGraph(), serviceName, true) // Iterate through all modules to find other components that depend on the @@ -28,7 +28,7 @@ func (f *Alloy) GetServiceConsumers(serviceName string) []service.Consumer { // GetService implements [service.Host]. It looks up a [service.Service] by // name. -func (f *Alloy) GetService(name string) (service.Service, bool) { +func (f *Runtime) GetService(name string) (service.Service, bool) { for _, svc := range f.opts.Services { if svc.Definition().Name == name { return svc, true @@ -69,7 +69,7 @@ func serviceConsumersForGraph(graph *dag.Graph, serviceName string, includePeerS // NewController returns a new, unstarted, isolated Alloy controller so that // services can instantiate their own components. -func (f *Alloy) NewController(id string) service.Controller { +func (f *Runtime) NewController(id string) service.Controller { return serviceController{ f: newController(controllerOptions{ Options: Options{ @@ -90,7 +90,7 @@ func (f *Alloy) NewController(id string) service.Controller { } type serviceController struct { - f *Alloy + f *Runtime } func (sc serviceController) Run(ctx context.Context) { sc.f.Run(ctx) } diff --git a/internal/alloy/alloy_services_test.go b/internal/runtime/alloy_services_test.go similarity index 97% rename from internal/alloy/alloy_services_test.go rename to internal/runtime/alloy_services_test.go index e7349a5b6a..089fd00144 100644 --- a/internal/alloy/alloy_services_test.go +++ b/internal/runtime/alloy_services_test.go @@ -1,15 +1,15 @@ -package alloy +package runtime import ( "context" "testing" "time" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents" - "github.com/grafana/alloy/internal/alloy/internal/testservices" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents" + "github.com/grafana/alloy/internal/runtime/internal/testservices" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" diff --git a/internal/alloy/alloy_test.go b/internal/runtime/alloy_test.go similarity index 88% rename from internal/alloy/alloy_test.go rename to internal/runtime/alloy_test.go index 5134df8b2f..a9c7efcf01 100644 --- a/internal/alloy/alloy_test.go +++ b/internal/runtime/alloy_test.go @@ -1,16 +1,16 @@ -package alloy +package runtime import ( "context" "os" "testing" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/dag" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/dag" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/stretchr/testify/require" "go.uber.org/goleak" ) @@ -78,7 +78,7 @@ func testOptions(t *testing.T) Options { } } -func cleanUpController(ctrl *Alloy) { +func cleanUpController(ctrl *Runtime) { // To avoid leaking goroutines and clean-up, we need to run and shut down the controller. ctx, cancel := context.WithCancel(context.Background()) done := make(chan struct{}) diff --git a/internal/alloy/alloy_updates_test.go b/internal/runtime/alloy_updates_test.go similarity index 98% rename from internal/alloy/alloy_updates_test.go rename to internal/runtime/alloy_updates_test.go index a59d527b20..3bc4a631d3 100644 --- a/internal/alloy/alloy_updates_test.go +++ b/internal/runtime/alloy_updates_test.go @@ -1,12 +1,12 @@ -package alloy +package runtime import ( "context" "testing" "time" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents" - "github.com/grafana/alloy/internal/alloy/internal/worker" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents" + "github.com/grafana/alloy/internal/runtime/internal/worker" "github.com/stretchr/testify/require" ) @@ -370,7 +370,7 @@ func TestController_Updates_WithLaggingComponent(t *testing.T) { require.Equal(t, 10, in.(testcomponents.SummationConfig).Input) } -func newTestController(t *testing.T) *Alloy { +func newTestController(t *testing.T) *Runtime { return newController(controllerOptions{ Options: testOptions(t), ModuleRegistry: newModuleRegistry(), diff --git a/internal/alloy/componenttest/componenttest.go b/internal/runtime/componenttest/componenttest.go similarity index 98% rename from internal/alloy/componenttest/componenttest.go rename to internal/runtime/componenttest/componenttest.go index 09bad2873c..1793a6b96a 100644 --- a/internal/alloy/componenttest/componenttest.go +++ b/internal/runtime/componenttest/componenttest.go @@ -14,8 +14,8 @@ import ( "go.uber.org/atomic" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/logging" "go.opentelemetry.io/otel/trace/noop" ) diff --git a/internal/alloy/componenttest/context.go b/internal/runtime/componenttest/context.go similarity index 100% rename from internal/alloy/componenttest/context.go rename to internal/runtime/componenttest/context.go diff --git a/internal/alloy/componenttest/testfailmodule.go b/internal/runtime/componenttest/testfailmodule.go similarity index 95% rename from internal/alloy/componenttest/testfailmodule.go rename to internal/runtime/componenttest/testfailmodule.go index b2995e960a..46f5e34d5e 100644 --- a/internal/alloy/componenttest/testfailmodule.go +++ b/internal/runtime/componenttest/testfailmodule.go @@ -4,9 +4,9 @@ import ( "context" "fmt" - mod "github.com/grafana/alloy/internal/alloy/internal/testcomponents/module" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + mod "github.com/grafana/alloy/internal/runtime/internal/testcomponents/module" ) func init() { diff --git a/internal/alloy/declare_test.go b/internal/runtime/declare_test.go similarity index 94% rename from internal/alloy/declare_test.go rename to internal/runtime/declare_test.go index 663f0f4778..54ebd2f9f2 100644 --- a/internal/alloy/declare_test.go +++ b/internal/runtime/declare_test.go @@ -1,4 +1,4 @@ -package alloy_test +package runtime_test import ( "context" @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/service" "github.com/stretchr/testify/require" ) @@ -297,8 +297,8 @@ func TestDeclare(t *testing.T) { for _, tc := range tt { t.Run(tc.name, func(t *testing.T) { - ctrl := alloy.New(testOptions(t)) - f, err := alloy.ParseSource(t.Name(), []byte(tc.config)) + ctrl := runtime.New(testOptions(t)) + f, err := runtime.ParseSource(t.Name(), []byte(tc.config)) require.NoError(t, err) require.NotNil(t, f) @@ -416,14 +416,14 @@ func TestDeclareError(t *testing.T) { defer verifyNoGoroutineLeaks(t) s, err := logging.New(os.Stderr, logging.DefaultOptions) require.NoError(t, err) - ctrl := alloy.New(alloy.Options{ + ctrl := runtime.New(runtime.Options{ Logger: s, DataPath: t.TempDir(), MinStability: featuregate.StabilityPublicPreview, Reg: nil, Services: []service.Service{}, }) - f, err := alloy.ParseSource(t.Name(), []byte(tc.config)) + f, err := runtime.ParseSource(t.Name(), []byte(tc.config)) require.NoError(t, err) require.NotNil(t, f) @@ -506,8 +506,8 @@ func TestDeclareUpdateConfig(t *testing.T) { for _, tc := range tt { t.Run(tc.name, func(t *testing.T) { - ctrl := alloy.New(testOptions(t)) - f, err := alloy.ParseSource(t.Name(), []byte(tc.config)) + ctrl := runtime.New(testOptions(t)) + f, err := runtime.ParseSource(t.Name(), []byte(tc.config)) require.NoError(t, err) require.NotNil(t, f) @@ -530,7 +530,7 @@ func TestDeclareUpdateConfig(t *testing.T) { return export.LastAdded == tc.expected }, 3*time.Second, 10*time.Millisecond) - f, err = alloy.ParseSource(t.Name(), []byte(tc.newConfig)) + f, err = runtime.ParseSource(t.Name(), []byte(tc.newConfig)) require.NoError(t, err) require.NotNil(t, f) diff --git a/internal/alloy/import_git_test.go b/internal/runtime/import_git_test.go similarity index 99% rename from internal/alloy/import_git_test.go rename to internal/runtime/import_git_test.go index 0d933f067e..912f28e808 100644 --- a/internal/alloy/import_git_test.go +++ b/internal/runtime/import_git_test.go @@ -1,6 +1,6 @@ //go:build linux -package alloy_test +package runtime_test import ( "bufio" diff --git a/internal/alloy/import_test.go b/internal/runtime/import_test.go similarity index 95% rename from internal/alloy/import_test.go rename to internal/runtime/import_test.go index b908fab6ae..dab9400d31 100644 --- a/internal/alloy/import_test.go +++ b/internal/runtime/import_test.go @@ -1,4 +1,4 @@ -package alloy_test +package runtime_test import ( "context" @@ -10,16 +10,16 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/featuregate" + alloy_runtime "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/internal/util" "github.com/stretchr/testify/require" "golang.org/x/tools/txtar" - _ "github.com/grafana/alloy/internal/alloy/internal/testcomponents/module/string" + _ "github.com/grafana/alloy/internal/runtime/internal/testcomponents/module/string" ) // use const to avoid lint error @@ -298,7 +298,7 @@ func testConfig(t *testing.T, config string, reloadConfig string, update func()) } if reloadConfig != "" { - f, err = alloy.ParseSource(t.Name(), []byte(reloadConfig)) + f, err = alloy_runtime.ParseSource(t.Name(), []byte(reloadConfig)) require.NoError(t, err) require.NotNil(t, f) @@ -333,17 +333,17 @@ func testConfigError(t *testing.T, config string, expectedError string) { }() } -func setup(t *testing.T, config string) (*alloy.Alloy, *alloy.Source) { +func setup(t *testing.T, config string) (*alloy_runtime.Runtime, *alloy_runtime.Source) { s, err := logging.New(os.Stderr, logging.DefaultOptions) require.NoError(t, err) - ctrl := alloy.New(alloy.Options{ + ctrl := alloy_runtime.New(alloy_runtime.Options{ Logger: s, DataPath: t.TempDir(), MinStability: featuregate.StabilityPublicPreview, Reg: nil, Services: []service.Service{}, }) - f, err := alloy.ParseSource(t.Name(), []byte(config)) + f, err := alloy_runtime.ParseSource(t.Name(), []byte(config)) require.NoError(t, err) require.NotNil(t, f) return ctrl, f diff --git a/internal/alloy/internal/controller/block_node.go b/internal/runtime/internal/controller/block_node.go similarity index 91% rename from internal/alloy/internal/controller/block_node.go rename to internal/runtime/internal/controller/block_node.go index f8f1699a89..10867b5719 100644 --- a/internal/alloy/internal/controller/block_node.go +++ b/internal/runtime/internal/controller/block_node.go @@ -1,7 +1,7 @@ package controller import ( - "github.com/grafana/alloy/internal/alloy/internal/dag" + "github.com/grafana/alloy/internal/runtime/internal/dag" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/vm" ) diff --git a/internal/alloy/internal/controller/component_node.go b/internal/runtime/internal/controller/component_node.go similarity index 100% rename from internal/alloy/internal/controller/component_node.go rename to internal/runtime/internal/controller/component_node.go diff --git a/internal/alloy/internal/controller/component_node_manager.go b/internal/runtime/internal/controller/component_node_manager.go similarity index 100% rename from internal/alloy/internal/controller/component_node_manager.go rename to internal/runtime/internal/controller/component_node_manager.go diff --git a/internal/alloy/internal/controller/component_references.go b/internal/runtime/internal/controller/component_references.go similarity index 98% rename from internal/alloy/internal/controller/component_references.go rename to internal/runtime/internal/controller/component_references.go index 00a923ef7e..cd624a1c68 100644 --- a/internal/alloy/internal/controller/component_references.go +++ b/internal/runtime/internal/controller/component_references.go @@ -3,7 +3,7 @@ package controller import ( "fmt" - "github.com/grafana/alloy/internal/alloy/internal/dag" + "github.com/grafana/alloy/internal/runtime/internal/dag" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/diag" "github.com/grafana/alloy/syntax/vm" diff --git a/internal/alloy/internal/controller/component_registry.go b/internal/runtime/internal/controller/component_registry.go similarity index 100% rename from internal/alloy/internal/controller/component_registry.go rename to internal/runtime/internal/controller/component_registry.go diff --git a/internal/alloy/internal/controller/custom_component_registry.go b/internal/runtime/internal/controller/custom_component_registry.go similarity index 100% rename from internal/alloy/internal/controller/custom_component_registry.go rename to internal/runtime/internal/controller/custom_component_registry.go diff --git a/internal/alloy/internal/controller/loader.go b/internal/runtime/internal/controller/loader.go similarity index 99% rename from internal/alloy/internal/controller/loader.go rename to internal/runtime/internal/controller/loader.go index 90732eaf61..b37f201a58 100644 --- a/internal/alloy/internal/controller/loader.go +++ b/internal/runtime/internal/controller/loader.go @@ -10,11 +10,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/internal/dag" - "github.com/grafana/alloy/internal/alloy/internal/worker" - "github.com/grafana/alloy/internal/alloy/logging/level" - "github.com/grafana/alloy/internal/alloy/tracing" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/dag" + "github.com/grafana/alloy/internal/runtime/internal/worker" + "github.com/grafana/alloy/internal/runtime/logging/level" + "github.com/grafana/alloy/internal/runtime/tracing" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/diag" diff --git a/internal/alloy/internal/controller/loader_test.go b/internal/runtime/internal/controller/loader_test.go similarity index 98% rename from internal/alloy/internal/controller/loader_test.go rename to internal/runtime/internal/controller/loader_test.go index 3e04f31164..1adf0deccd 100644 --- a/internal/alloy/internal/controller/loader_test.go +++ b/internal/runtime/internal/controller/loader_test.go @@ -7,11 +7,11 @@ import ( "strings" "testing" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/dag" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/dag" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/diag" @@ -20,7 +20,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/trace/noop" - _ "github.com/grafana/alloy/internal/alloy/internal/testcomponents" // Include test components + _ "github.com/grafana/alloy/internal/runtime/internal/testcomponents" // Include test components ) func TestLoader(t *testing.T) { diff --git a/internal/alloy/internal/controller/metrics.go b/internal/runtime/internal/controller/metrics.go similarity index 100% rename from internal/alloy/internal/controller/metrics.go rename to internal/runtime/internal/controller/metrics.go diff --git a/internal/alloy/internal/controller/module.go b/internal/runtime/internal/controller/module.go similarity index 100% rename from internal/alloy/internal/controller/module.go rename to internal/runtime/internal/controller/module.go diff --git a/internal/alloy/internal/controller/node_builtin_component.go b/internal/runtime/internal/controller/node_builtin_component.go similarity index 98% rename from internal/alloy/internal/controller/node_builtin_component.go rename to internal/runtime/internal/controller/node_builtin_component.go index edf9609635..b035d5016f 100644 --- a/internal/alloy/internal/controller/node_builtin_component.go +++ b/internal/runtime/internal/controller/node_builtin_component.go @@ -13,11 +13,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging" - "github.com/grafana/alloy/internal/alloy/logging/level" - "github.com/grafana/alloy/internal/alloy/tracing" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging" + "github.com/grafana/alloy/internal/runtime/logging/level" + "github.com/grafana/alloy/internal/runtime/tracing" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/vm" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/alloy/internal/controller/node_builtin_component_test.go b/internal/runtime/internal/controller/node_builtin_component_test.go similarity index 100% rename from internal/alloy/internal/controller/node_builtin_component_test.go rename to internal/runtime/internal/controller/node_builtin_component_test.go diff --git a/internal/alloy/internal/controller/node_config.go b/internal/runtime/internal/controller/node_config.go similarity index 98% rename from internal/alloy/internal/controller/node_config.go rename to internal/runtime/internal/controller/node_config.go index d36a43e91e..1293eac305 100644 --- a/internal/alloy/internal/controller/node_config.go +++ b/internal/runtime/internal/controller/node_config.go @@ -3,7 +3,7 @@ package controller import ( "fmt" - "github.com/grafana/alloy/internal/alloy/internal/importsource" + "github.com/grafana/alloy/internal/runtime/internal/importsource" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/diag" ) diff --git a/internal/alloy/internal/controller/node_config_argument.go b/internal/runtime/internal/controller/node_config_argument.go similarity index 100% rename from internal/alloy/internal/controller/node_config_argument.go rename to internal/runtime/internal/controller/node_config_argument.go diff --git a/internal/alloy/internal/controller/node_config_export.go b/internal/runtime/internal/controller/node_config_export.go similarity index 100% rename from internal/alloy/internal/controller/node_config_export.go rename to internal/runtime/internal/controller/node_config_export.go diff --git a/internal/alloy/internal/controller/node_config_import.go b/internal/runtime/internal/controller/node_config_import.go similarity index 98% rename from internal/alloy/internal/controller/node_config_import.go rename to internal/runtime/internal/controller/node_config_import.go index 82881cfa55..829ee9bc36 100644 --- a/internal/alloy/internal/controller/node_config_import.go +++ b/internal/runtime/internal/controller/node_config_import.go @@ -14,11 +14,11 @@ import ( "go.uber.org/atomic" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/internal/importsource" - "github.com/grafana/alloy/internal/alloy/logging/level" - "github.com/grafana/alloy/internal/alloy/tracing" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/runner" + "github.com/grafana/alloy/internal/runtime/internal/importsource" + "github.com/grafana/alloy/internal/runtime/logging/level" + "github.com/grafana/alloy/internal/runtime/tracing" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/parser" "github.com/grafana/alloy/syntax/vm" diff --git a/internal/alloy/internal/controller/node_config_logging.go b/internal/runtime/internal/controller/node_config_logging.go similarity index 98% rename from internal/alloy/internal/controller/node_config_logging.go rename to internal/runtime/internal/controller/node_config_logging.go index 7f41d9da47..3945e25890 100644 --- a/internal/alloy/internal/controller/node_config_logging.go +++ b/internal/runtime/internal/controller/node_config_logging.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/vm" ) diff --git a/internal/alloy/internal/controller/node_config_tracing.go b/internal/runtime/internal/controller/node_config_tracing.go similarity index 98% rename from internal/alloy/internal/controller/node_config_tracing.go rename to internal/runtime/internal/controller/node_config_tracing.go index a40d613b25..0e8476a9aa 100644 --- a/internal/alloy/internal/controller/node_config_tracing.go +++ b/internal/runtime/internal/controller/node_config_tracing.go @@ -5,7 +5,7 @@ import ( "strings" "sync" - "github.com/grafana/alloy/internal/alloy/tracing" + "github.com/grafana/alloy/internal/runtime/tracing" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/vm" "go.opentelemetry.io/otel/trace" diff --git a/internal/alloy/internal/controller/node_custom_component.go b/internal/runtime/internal/controller/node_custom_component.go similarity index 99% rename from internal/alloy/internal/controller/node_custom_component.go rename to internal/runtime/internal/controller/node_custom_component.go index 3bb8243796..6f4340231f 100644 --- a/internal/alloy/internal/controller/node_custom_component.go +++ b/internal/runtime/internal/controller/node_custom_component.go @@ -10,8 +10,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/vm" ) diff --git a/internal/alloy/internal/controller/node_declare.go b/internal/runtime/internal/controller/node_declare.go similarity index 100% rename from internal/alloy/internal/controller/node_declare.go rename to internal/runtime/internal/controller/node_declare.go diff --git a/internal/alloy/internal/controller/node_service.go b/internal/runtime/internal/controller/node_service.go similarity index 100% rename from internal/alloy/internal/controller/node_service.go rename to internal/runtime/internal/controller/node_service.go diff --git a/internal/alloy/internal/controller/queue.go b/internal/runtime/internal/controller/queue.go similarity index 100% rename from internal/alloy/internal/controller/queue.go rename to internal/runtime/internal/controller/queue.go diff --git a/internal/alloy/internal/controller/queue_test.go b/internal/runtime/internal/controller/queue_test.go similarity index 100% rename from internal/alloy/internal/controller/queue_test.go rename to internal/runtime/internal/controller/queue_test.go diff --git a/internal/alloy/internal/controller/scheduler.go b/internal/runtime/internal/controller/scheduler.go similarity index 100% rename from internal/alloy/internal/controller/scheduler.go rename to internal/runtime/internal/controller/scheduler.go diff --git a/internal/alloy/internal/controller/scheduler_test.go b/internal/runtime/internal/controller/scheduler_test.go similarity index 97% rename from internal/alloy/internal/controller/scheduler_test.go rename to internal/runtime/internal/controller/scheduler_test.go index 42f496a4e8..b571f4e312 100644 --- a/internal/alloy/internal/controller/scheduler_test.go +++ b/internal/runtime/internal/controller/scheduler_test.go @@ -5,8 +5,8 @@ import ( "sync" "testing" - "github.com/grafana/alloy/internal/alloy/internal/controller" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/internal/controller" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/vm" "github.com/stretchr/testify/require" diff --git a/internal/alloy/internal/controller/service_map.go b/internal/runtime/internal/controller/service_map.go similarity index 100% rename from internal/alloy/internal/controller/service_map.go rename to internal/runtime/internal/controller/service_map.go diff --git a/internal/alloy/internal/controller/value_cache.go b/internal/runtime/internal/controller/value_cache.go similarity index 100% rename from internal/alloy/internal/controller/value_cache.go rename to internal/runtime/internal/controller/value_cache.go diff --git a/internal/alloy/internal/controller/value_cache_test.go b/internal/runtime/internal/controller/value_cache_test.go similarity index 100% rename from internal/alloy/internal/controller/value_cache_test.go rename to internal/runtime/internal/controller/value_cache_test.go diff --git a/internal/alloy/internal/dag/dag.go b/internal/runtime/internal/dag/dag.go similarity index 100% rename from internal/alloy/internal/dag/dag.go rename to internal/runtime/internal/dag/dag.go diff --git a/internal/alloy/internal/dag/ops.go b/internal/runtime/internal/dag/ops.go similarity index 100% rename from internal/alloy/internal/dag/ops.go rename to internal/runtime/internal/dag/ops.go diff --git a/internal/alloy/internal/dag/ops_test.go b/internal/runtime/internal/dag/ops_test.go similarity index 100% rename from internal/alloy/internal/dag/ops_test.go rename to internal/runtime/internal/dag/ops_test.go diff --git a/internal/alloy/internal/dag/tarjan.go b/internal/runtime/internal/dag/tarjan.go similarity index 100% rename from internal/alloy/internal/dag/tarjan.go rename to internal/runtime/internal/dag/tarjan.go diff --git a/internal/alloy/internal/dag/tarjan_test.go b/internal/runtime/internal/dag/tarjan_test.go similarity index 100% rename from internal/alloy/internal/dag/tarjan_test.go rename to internal/runtime/internal/dag/tarjan_test.go diff --git a/internal/alloy/internal/dag/walk.go b/internal/runtime/internal/dag/walk.go similarity index 100% rename from internal/alloy/internal/dag/walk.go rename to internal/runtime/internal/dag/walk.go diff --git a/internal/alloy/internal/importsource/import_file.go b/internal/runtime/internal/importsource/import_file.go similarity index 99% rename from internal/alloy/internal/importsource/import_file.go rename to internal/runtime/internal/importsource/import_file.go index 214e520c7e..811047bb48 100644 --- a/internal/alloy/internal/importsource/import_file.go +++ b/internal/runtime/internal/importsource/import_file.go @@ -13,9 +13,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" filedetector "github.com/grafana/alloy/internal/filedetector" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/syntax/vm" ) diff --git a/internal/alloy/internal/importsource/import_git.go b/internal/runtime/internal/importsource/import_git.go similarity index 99% rename from internal/alloy/internal/importsource/import_git.go rename to internal/runtime/internal/importsource/import_git.go index 10329ccf34..2ab507f720 100644 --- a/internal/alloy/internal/importsource/import_git.go +++ b/internal/runtime/internal/importsource/import_git.go @@ -12,8 +12,8 @@ import ( "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/vcs" "github.com/grafana/alloy/syntax/vm" ) diff --git a/internal/alloy/internal/importsource/import_http.go b/internal/runtime/internal/importsource/import_http.go similarity index 100% rename from internal/alloy/internal/importsource/import_http.go rename to internal/runtime/internal/importsource/import_http.go diff --git a/internal/alloy/internal/importsource/import_source.go b/internal/runtime/internal/importsource/import_source.go similarity index 100% rename from internal/alloy/internal/importsource/import_source.go rename to internal/runtime/internal/importsource/import_source.go diff --git a/internal/alloy/internal/importsource/import_string.go b/internal/runtime/internal/importsource/import_string.go similarity index 100% rename from internal/alloy/internal/importsource/import_string.go rename to internal/runtime/internal/importsource/import_string.go diff --git a/internal/alloy/internal/testcomponents/count.go b/internal/runtime/internal/testcomponents/count.go similarity index 97% rename from internal/alloy/internal/testcomponents/count.go rename to internal/runtime/internal/testcomponents/count.go index 02d13421db..d05070f313 100644 --- a/internal/alloy/internal/testcomponents/count.go +++ b/internal/runtime/internal/testcomponents/count.go @@ -7,9 +7,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "go.uber.org/atomic" ) diff --git a/internal/alloy/internal/testcomponents/doc.go b/internal/runtime/internal/testcomponents/doc.go similarity index 100% rename from internal/alloy/internal/testcomponents/doc.go rename to internal/runtime/internal/testcomponents/doc.go diff --git a/internal/alloy/internal/testcomponents/experimental.go b/internal/runtime/internal/testcomponents/experimental.go similarity index 100% rename from internal/alloy/internal/testcomponents/experimental.go rename to internal/runtime/internal/testcomponents/experimental.go diff --git a/internal/alloy/internal/testcomponents/fake.go b/internal/runtime/internal/testcomponents/fake.go similarity index 100% rename from internal/alloy/internal/testcomponents/fake.go rename to internal/runtime/internal/testcomponents/fake.go diff --git a/internal/alloy/internal/testcomponents/module/file/file.go b/internal/runtime/internal/testcomponents/module/file/file.go similarity index 98% rename from internal/alloy/internal/testcomponents/module/file/file.go rename to internal/runtime/internal/testcomponents/module/file/file.go index a2ed6ad96c..c2d11395a4 100644 --- a/internal/alloy/internal/testcomponents/module/file/file.go +++ b/internal/runtime/internal/testcomponents/module/file/file.go @@ -6,10 +6,10 @@ import ( "go.uber.org/atomic" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents/module" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/component/local/file" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents/module" "github.com/grafana/alloy/syntax/alloytypes" ) diff --git a/internal/alloy/internal/testcomponents/module/git/git.go b/internal/runtime/internal/testcomponents/module/git/git.go similarity index 97% rename from internal/alloy/internal/testcomponents/module/git/git.go rename to internal/runtime/internal/testcomponents/module/git/git.go index f2aa00d83f..b4cf2fb984 100644 --- a/internal/alloy/internal/testcomponents/module/git/git.go +++ b/internal/runtime/internal/testcomponents/module/git/git.go @@ -10,10 +10,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents/module" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents/module" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/vcs" ) diff --git a/internal/alloy/internal/testcomponents/module/http/http.go b/internal/runtime/internal/testcomponents/module/http/http.go similarity index 98% rename from internal/alloy/internal/testcomponents/module/http/http.go rename to internal/runtime/internal/testcomponents/module/http/http.go index 183d31d982..07950d35dc 100644 --- a/internal/alloy/internal/testcomponents/module/http/http.go +++ b/internal/runtime/internal/testcomponents/module/http/http.go @@ -6,10 +6,10 @@ import ( "go.uber.org/atomic" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents/module" "github.com/grafana/alloy/internal/component" remote_http "github.com/grafana/alloy/internal/component/remote/http" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents/module" "github.com/grafana/alloy/syntax/alloytypes" ) diff --git a/internal/alloy/internal/testcomponents/module/module.go b/internal/runtime/internal/testcomponents/module/module.go similarity index 98% rename from internal/alloy/internal/testcomponents/module/module.go rename to internal/runtime/internal/testcomponents/module/module.go index 6ea10c9ca6..f7a420b2c4 100644 --- a/internal/alloy/internal/testcomponents/module/module.go +++ b/internal/runtime/internal/testcomponents/module/module.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime/logging/level" ) // ModuleComponent holds the common properties for module components. diff --git a/internal/alloy/internal/testcomponents/module/string/string.go b/internal/runtime/internal/testcomponents/module/string/string.go similarity index 96% rename from internal/alloy/internal/testcomponents/module/string/string.go rename to internal/runtime/internal/testcomponents/module/string/string.go index 5682459a8c..249acaa6d2 100644 --- a/internal/alloy/internal/testcomponents/module/string/string.go +++ b/internal/runtime/internal/testcomponents/module/string/string.go @@ -3,9 +3,9 @@ package string import ( "context" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents/module" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents/module" "github.com/grafana/alloy/syntax/alloytypes" ) diff --git a/internal/alloy/internal/testcomponents/passthrough.go b/internal/runtime/internal/testcomponents/passthrough.go similarity index 97% rename from internal/alloy/internal/testcomponents/passthrough.go rename to internal/runtime/internal/testcomponents/passthrough.go index f36fce2947..690a0bf30d 100644 --- a/internal/alloy/internal/testcomponents/passthrough.go +++ b/internal/runtime/internal/testcomponents/passthrough.go @@ -5,9 +5,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/alloy/internal/testcomponents/sumation.go b/internal/runtime/internal/testcomponents/sumation.go similarity index 96% rename from internal/alloy/internal/testcomponents/sumation.go rename to internal/runtime/internal/testcomponents/sumation.go index f12aa5c931..00023da53f 100644 --- a/internal/alloy/internal/testcomponents/sumation.go +++ b/internal/runtime/internal/testcomponents/sumation.go @@ -4,9 +4,9 @@ import ( "context" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "go.uber.org/atomic" ) diff --git a/internal/alloy/internal/testcomponents/tick.go b/internal/runtime/internal/testcomponents/tick.go similarity index 97% rename from internal/alloy/internal/testcomponents/tick.go rename to internal/runtime/internal/testcomponents/tick.go index 3d02c20e20..fb2687f2af 100644 --- a/internal/alloy/internal/testcomponents/tick.go +++ b/internal/runtime/internal/testcomponents/tick.go @@ -7,9 +7,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" ) func init() { diff --git a/internal/alloy/internal/testservices/doc.go b/internal/runtime/internal/testservices/doc.go similarity index 100% rename from internal/alloy/internal/testservices/doc.go rename to internal/runtime/internal/testservices/doc.go diff --git a/internal/alloy/internal/testservices/fake.go b/internal/runtime/internal/testservices/fake.go similarity index 100% rename from internal/alloy/internal/testservices/fake.go rename to internal/runtime/internal/testservices/fake.go diff --git a/internal/alloy/internal/worker/worker_pool.go b/internal/runtime/internal/worker/worker_pool.go similarity index 100% rename from internal/alloy/internal/worker/worker_pool.go rename to internal/runtime/internal/worker/worker_pool.go diff --git a/internal/alloy/internal/worker/worker_pool_test.go b/internal/runtime/internal/worker/worker_pool_test.go similarity index 100% rename from internal/alloy/internal/worker/worker_pool_test.go rename to internal/runtime/internal/worker/worker_pool_test.go diff --git a/internal/alloy/logging/deferred_handler.go b/internal/runtime/logging/deferred_handler.go similarity index 100% rename from internal/alloy/logging/deferred_handler.go rename to internal/runtime/logging/deferred_handler.go diff --git a/internal/alloy/logging/deferred_handler_test.go b/internal/runtime/logging/deferred_handler_test.go similarity index 100% rename from internal/alloy/logging/deferred_handler_test.go rename to internal/runtime/logging/deferred_handler_test.go diff --git a/internal/alloy/logging/handler.go b/internal/runtime/logging/handler.go similarity index 100% rename from internal/alloy/logging/handler.go rename to internal/runtime/logging/handler.go diff --git a/internal/alloy/logging/handler_test.go b/internal/runtime/logging/handler_test.go similarity index 100% rename from internal/alloy/logging/handler_test.go rename to internal/runtime/logging/handler_test.go diff --git a/internal/alloy/logging/level/level.go b/internal/runtime/logging/level/level.go similarity index 96% rename from internal/alloy/logging/level/level.go rename to internal/runtime/logging/level/level.go index bb46c29af9..eea67634e8 100644 --- a/internal/alloy/logging/level/level.go +++ b/internal/runtime/logging/level/level.go @@ -6,7 +6,7 @@ import ( "github.com/go-kit/log" gokitlevel "github.com/go-kit/log/level" - "github.com/grafana/alloy/internal/alloy/logging" + "github.com/grafana/alloy/internal/runtime/logging" ) const ( diff --git a/internal/alloy/logging/logger.go b/internal/runtime/logging/logger.go similarity index 100% rename from internal/alloy/logging/logger.go rename to internal/runtime/logging/logger.go diff --git a/internal/alloy/logging/logger_test.go b/internal/runtime/logging/logger_test.go similarity index 97% rename from internal/alloy/logging/logger_test.go rename to internal/runtime/logging/logger_test.go index 8068011075..c49f7a984f 100644 --- a/internal/alloy/logging/logger_test.go +++ b/internal/runtime/logging/logger_test.go @@ -11,9 +11,9 @@ import ( "github.com/go-kit/log" gokitlevel "github.com/go-kit/log/level" - "github.com/grafana/alloy/internal/alloy/logging" - alloylevel "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component/common/loki" + "github.com/grafana/alloy/internal/runtime/logging" + alloylevel "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/stretchr/testify/require" ) @@ -21,7 +21,7 @@ import ( $ go test -count=1 -benchmem ./internal/alloy/logging -run ^$ -bench BenchmarkLogging_ goos: darwin goarch: arm64 -pkg: github.com/grafana/alloy/internal/alloy/logging +pkg: github.com/grafana/alloy/internal/runtime/logging BenchmarkLogging_NoLevel_Prints-8 722358 1524 ns/op 368 B/op 11 allocs/op BenchmarkLogging_NoLevel_Drops-8 47103154 25.59 ns/op 8 B/op 0 allocs/op BenchmarkLogging_GoKitLevel_Drops_Sprintf-8 3585387 332.1 ns/op 320 B/op 8 allocs/op diff --git a/internal/alloy/logging/options.go b/internal/runtime/logging/options.go similarity index 100% rename from internal/alloy/logging/options.go rename to internal/runtime/logging/options.go diff --git a/internal/alloy/module.go b/internal/runtime/module.go similarity index 94% rename from internal/alloy/module.go rename to internal/runtime/module.go index 0c75bd2f49..d0bb36450d 100644 --- a/internal/alloy/module.go +++ b/internal/runtime/module.go @@ -1,4 +1,4 @@ -package alloy +package runtime import ( "context" @@ -6,13 +6,13 @@ import ( "path" "sync" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/worker" - "github.com/grafana/alloy/internal/alloy/logging" - "github.com/grafana/alloy/internal/alloy/logging/level" - "github.com/grafana/alloy/internal/alloy/tracing" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/worker" + "github.com/grafana/alloy/internal/runtime/logging" + "github.com/grafana/alloy/internal/runtime/logging/level" + "github.com/grafana/alloy/internal/runtime/tracing" "github.com/grafana/alloy/syntax/ast" "github.com/grafana/alloy/syntax/scanner" "github.com/prometheus/client_golang/prometheus" @@ -111,7 +111,7 @@ func (m *moduleController) ModuleIDs() []string { } type module struct { - f *Alloy + f *Runtime o *moduleOptions } diff --git a/internal/alloy/module_eval_test.go b/internal/runtime/module_eval_test.go similarity index 90% rename from internal/alloy/module_eval_test.go rename to internal/runtime/module_eval_test.go index 384ea6cda2..0b3f88f918 100644 --- a/internal/alloy/module_eval_test.go +++ b/internal/runtime/module_eval_test.go @@ -1,4 +1,4 @@ -package alloy_test +package runtime_test // This file contains tests which verify that the Alloy controller correctly // evaluates and updates modules, including the module's arguments and exports. @@ -10,11 +10,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/internal/testcomponents" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/internal/testcomponents" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/service" cluster_service "github.com/grafana/alloy/internal/service/cluster" http_service "github.com/grafana/alloy/internal/service/http" @@ -24,7 +24,7 @@ import ( "github.com/stretchr/testify/require" "go.uber.org/goleak" - _ "github.com/grafana/alloy/internal/alloy/internal/testcomponents/module/string" + _ "github.com/grafana/alloy/internal/runtime/internal/testcomponents/module/string" ) func TestUpdates_EmptyModule(t *testing.T) { @@ -56,8 +56,8 @@ func TestUpdates_EmptyModule(t *testing.T) { } ` - ctrl := alloy.New(testOptions(t)) - f, err := alloy.ParseSource(t.Name(), []byte(config)) + ctrl := runtime.New(testOptions(t)) + f, err := runtime.ParseSource(t.Name(), []byte(config)) require.NoError(t, err) require.NotNil(t, f) @@ -117,8 +117,8 @@ func TestUpdates_ThroughModule(t *testing.T) { } ` - ctrl := alloy.New(testOptions(t)) - f, err := alloy.ParseSource(t.Name(), []byte(config)) + ctrl := runtime.New(testOptions(t)) + f, err := runtime.ParseSource(t.Name(), []byte(config)) require.NoError(t, err) require.NotNil(t, f) @@ -179,8 +179,8 @@ func TestUpdates_TwoModules_SameCompNames(t *testing.T) { } ` - ctrl := alloy.New(testOptions(t)) - f, err := alloy.ParseSource(t.Name(), []byte(config)) + ctrl := runtime.New(testOptions(t)) + f, err := runtime.ParseSource(t.Name(), []byte(config)) require.NoError(t, err) require.NotNil(t, f) @@ -246,8 +246,8 @@ func TestUpdates_ReloadConfig(t *testing.T) { } ` - ctrl := alloy.New(testOptions(t)) - f, err := alloy.ParseSource(t.Name(), []byte(config)) + ctrl := runtime.New(testOptions(t)) + f, err := runtime.ParseSource(t.Name(), []byte(config)) require.NoError(t, err) require.NotNil(t, f) @@ -302,7 +302,7 @@ func TestUpdates_ReloadConfig(t *testing.T) { input = module.string.test.exports.output } ` - f, err = alloy.ParseSource(t.Name(), []byte(config)) + f, err = runtime.ParseSource(t.Name(), []byte(config)) require.NoError(t, err) require.NotNil(t, f) @@ -315,7 +315,7 @@ func TestUpdates_ReloadConfig(t *testing.T) { }, 3*time.Second, 10*time.Millisecond) } -func testOptions(t *testing.T) alloy.Options { +func testOptions(t *testing.T) runtime.Options { t.Helper() s, err := logging.New(os.Stderr, logging.DefaultOptions) require.NoError(t, err) @@ -331,7 +331,7 @@ func testOptions(t *testing.T) alloy.Options { otelService := otel_service.New(s) require.NotNil(t, otelService) - return alloy.Options{ + return runtime.Options{ Logger: s, DataPath: t.TempDir(), MinStability: featuregate.StabilityPublicPreview, @@ -345,7 +345,7 @@ func testOptions(t *testing.T) alloy.Options { } } -func getExport[T any](t *testing.T, ctrl *alloy.Alloy, moduleId string, nodeId string) T { +func getExport[T any](t *testing.T, ctrl *runtime.Runtime, moduleId string, nodeId string) T { t.Helper() info, err := ctrl.GetComponent(component.ID{ ModuleID: moduleId, diff --git a/internal/alloy/module_fail_test.go b/internal/runtime/module_fail_test.go similarity index 94% rename from internal/alloy/module_fail_test.go rename to internal/runtime/module_fail_test.go index 1742816466..8b792b26b0 100644 --- a/internal/alloy/module_fail_test.go +++ b/internal/runtime/module_fail_test.go @@ -1,12 +1,12 @@ -package alloy +package runtime import ( "context" "testing" "time" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/internal/controller" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/internal/controller" "github.com/stretchr/testify/require" ) diff --git a/internal/alloy/module_registry.go b/internal/runtime/module_registry.go similarity index 98% rename from internal/alloy/module_registry.go rename to internal/runtime/module_registry.go index 266cf68d3b..db944f38ae 100644 --- a/internal/alloy/module_registry.go +++ b/internal/runtime/module_registry.go @@ -1,4 +1,4 @@ -package alloy +package runtime import ( "fmt" diff --git a/internal/alloy/module_test.go b/internal/runtime/module_test.go similarity index 97% rename from internal/alloy/module_test.go rename to internal/runtime/module_test.go index 0c7011913a..a869ca6189 100644 --- a/internal/alloy/module_test.go +++ b/internal/runtime/module_test.go @@ -1,4 +1,4 @@ -package alloy +package runtime import ( "context" @@ -6,11 +6,11 @@ import ( "testing" "time" - "github.com/grafana/alloy/internal/alloy/internal/controller" - "github.com/grafana/alloy/internal/alloy/internal/worker" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/internal/controller" + "github.com/grafana/alloy/internal/runtime/internal/worker" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/service" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" diff --git a/internal/alloy/source.go b/internal/runtime/source.go similarity index 99% rename from internal/alloy/source.go rename to internal/runtime/source.go index 030a670969..f02e71c6e4 100644 --- a/internal/alloy/source.go +++ b/internal/runtime/source.go @@ -1,4 +1,4 @@ -package alloy +package runtime import ( "crypto/sha256" diff --git a/internal/alloy/source_test.go b/internal/runtime/source_test.go similarity index 96% rename from internal/alloy/source_test.go rename to internal/runtime/source_test.go index 5847cabe43..0128b342fc 100644 --- a/internal/alloy/source_test.go +++ b/internal/runtime/source_test.go @@ -1,4 +1,4 @@ -package alloy +package runtime import ( "strings" @@ -8,7 +8,7 @@ import ( "github.com/grafana/alloy/syntax/diag" "github.com/stretchr/testify/require" - _ "github.com/grafana/alloy/internal/alloy/internal/testcomponents" // Include test components + _ "github.com/grafana/alloy/internal/runtime/internal/testcomponents" // Include test components ) func TestParseSource(t *testing.T) { diff --git a/internal/alloy/testdata/.gitignore b/internal/runtime/testdata/.gitignore similarity index 100% rename from internal/alloy/testdata/.gitignore rename to internal/runtime/testdata/.gitignore diff --git a/internal/alloy/testdata/import_error/import_error_1.txtar b/internal/runtime/testdata/import_error/import_error_1.txtar similarity index 100% rename from internal/alloy/testdata/import_error/import_error_1.txtar rename to internal/runtime/testdata/import_error/import_error_1.txtar diff --git a/internal/alloy/testdata/import_error/import_error_2.txtar b/internal/runtime/testdata/import_error/import_error_2.txtar similarity index 100% rename from internal/alloy/testdata/import_error/import_error_2.txtar rename to internal/runtime/testdata/import_error/import_error_2.txtar diff --git a/internal/alloy/testdata/import_error/import_error_3.txtar b/internal/runtime/testdata/import_error/import_error_3.txtar similarity index 100% rename from internal/alloy/testdata/import_error/import_error_3.txtar rename to internal/runtime/testdata/import_error/import_error_3.txtar diff --git a/internal/alloy/testdata/import_error/import_error_4.txtar b/internal/runtime/testdata/import_error/import_error_4.txtar similarity index 100% rename from internal/alloy/testdata/import_error/import_error_4.txtar rename to internal/runtime/testdata/import_error/import_error_4.txtar diff --git a/internal/alloy/testdata/import_file/import_file_1.txtar b/internal/runtime/testdata/import_file/import_file_1.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_1.txtar rename to internal/runtime/testdata/import_file/import_file_1.txtar diff --git a/internal/alloy/testdata/import_file/import_file_10.txtar b/internal/runtime/testdata/import_file/import_file_10.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_10.txtar rename to internal/runtime/testdata/import_file/import_file_10.txtar diff --git a/internal/alloy/testdata/import_file/import_file_11.txtar b/internal/runtime/testdata/import_file/import_file_11.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_11.txtar rename to internal/runtime/testdata/import_file/import_file_11.txtar diff --git a/internal/alloy/testdata/import_file/import_file_12.txtar b/internal/runtime/testdata/import_file/import_file_12.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_12.txtar rename to internal/runtime/testdata/import_file/import_file_12.txtar diff --git a/internal/alloy/testdata/import_file/import_file_13.txtar b/internal/runtime/testdata/import_file/import_file_13.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_13.txtar rename to internal/runtime/testdata/import_file/import_file_13.txtar diff --git a/internal/alloy/testdata/import_file/import_file_14.txtar b/internal/runtime/testdata/import_file/import_file_14.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_14.txtar rename to internal/runtime/testdata/import_file/import_file_14.txtar diff --git a/internal/alloy/testdata/import_file/import_file_15.txtar b/internal/runtime/testdata/import_file/import_file_15.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_15.txtar rename to internal/runtime/testdata/import_file/import_file_15.txtar diff --git a/internal/alloy/testdata/import_file/import_file_16.txtar b/internal/runtime/testdata/import_file/import_file_16.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_16.txtar rename to internal/runtime/testdata/import_file/import_file_16.txtar diff --git a/internal/alloy/testdata/import_file/import_file_17.txtar b/internal/runtime/testdata/import_file/import_file_17.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_17.txtar rename to internal/runtime/testdata/import_file/import_file_17.txtar diff --git a/internal/alloy/testdata/import_file/import_file_2.txtar b/internal/runtime/testdata/import_file/import_file_2.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_2.txtar rename to internal/runtime/testdata/import_file/import_file_2.txtar diff --git a/internal/alloy/testdata/import_file/import_file_3.txtar b/internal/runtime/testdata/import_file/import_file_3.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_3.txtar rename to internal/runtime/testdata/import_file/import_file_3.txtar diff --git a/internal/alloy/testdata/import_file/import_file_4.txtar b/internal/runtime/testdata/import_file/import_file_4.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_4.txtar rename to internal/runtime/testdata/import_file/import_file_4.txtar diff --git a/internal/alloy/testdata/import_file/import_file_5.txtar b/internal/runtime/testdata/import_file/import_file_5.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_5.txtar rename to internal/runtime/testdata/import_file/import_file_5.txtar diff --git a/internal/alloy/testdata/import_file/import_file_6.txtar b/internal/runtime/testdata/import_file/import_file_6.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_6.txtar rename to internal/runtime/testdata/import_file/import_file_6.txtar diff --git a/internal/alloy/testdata/import_file/import_file_7.txtar b/internal/runtime/testdata/import_file/import_file_7.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_7.txtar rename to internal/runtime/testdata/import_file/import_file_7.txtar diff --git a/internal/alloy/testdata/import_file/import_file_8.txtar b/internal/runtime/testdata/import_file/import_file_8.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_8.txtar rename to internal/runtime/testdata/import_file/import_file_8.txtar diff --git a/internal/alloy/testdata/import_file/import_file_9.txtar b/internal/runtime/testdata/import_file/import_file_9.txtar similarity index 100% rename from internal/alloy/testdata/import_file/import_file_9.txtar rename to internal/runtime/testdata/import_file/import_file_9.txtar diff --git a/internal/alloy/testdata/import_file_folder/import_file_folder_1.txtar b/internal/runtime/testdata/import_file_folder/import_file_folder_1.txtar similarity index 100% rename from internal/alloy/testdata/import_file_folder/import_file_folder_1.txtar rename to internal/runtime/testdata/import_file_folder/import_file_folder_1.txtar diff --git a/internal/alloy/testdata/import_file_folder/import_file_folder_2.txtar b/internal/runtime/testdata/import_file_folder/import_file_folder_2.txtar similarity index 100% rename from internal/alloy/testdata/import_file_folder/import_file_folder_2.txtar rename to internal/runtime/testdata/import_file_folder/import_file_folder_2.txtar diff --git a/internal/alloy/testdata/import_file_folder/import_file_folder_3.txtar b/internal/runtime/testdata/import_file_folder/import_file_folder_3.txtar similarity index 100% rename from internal/alloy/testdata/import_file_folder/import_file_folder_3.txtar rename to internal/runtime/testdata/import_file_folder/import_file_folder_3.txtar diff --git a/internal/alloy/testdata/import_file_folder/import_file_folder_4.txtar b/internal/runtime/testdata/import_file_folder/import_file_folder_4.txtar similarity index 100% rename from internal/alloy/testdata/import_file_folder/import_file_folder_4.txtar rename to internal/runtime/testdata/import_file_folder/import_file_folder_4.txtar diff --git a/internal/alloy/testdata/import_file_folder/import_file_folder_5.txtar b/internal/runtime/testdata/import_file_folder/import_file_folder_5.txtar similarity index 100% rename from internal/alloy/testdata/import_file_folder/import_file_folder_5.txtar rename to internal/runtime/testdata/import_file_folder/import_file_folder_5.txtar diff --git a/internal/alloy/testdata/import_git/import_git_1.txtar b/internal/runtime/testdata/import_git/import_git_1.txtar similarity index 100% rename from internal/alloy/testdata/import_git/import_git_1.txtar rename to internal/runtime/testdata/import_git/import_git_1.txtar diff --git a/internal/alloy/testdata/import_git/import_git_2.txtar b/internal/runtime/testdata/import_git/import_git_2.txtar similarity index 100% rename from internal/alloy/testdata/import_git/import_git_2.txtar rename to internal/runtime/testdata/import_git/import_git_2.txtar diff --git a/internal/alloy/testdata/import_git/import_git_3.txtar b/internal/runtime/testdata/import_git/import_git_3.txtar similarity index 100% rename from internal/alloy/testdata/import_git/import_git_3.txtar rename to internal/runtime/testdata/import_git/import_git_3.txtar diff --git a/internal/alloy/testdata/import_http/import_http_1.txtar b/internal/runtime/testdata/import_http/import_http_1.txtar similarity index 100% rename from internal/alloy/testdata/import_http/import_http_1.txtar rename to internal/runtime/testdata/import_http/import_http_1.txtar diff --git a/internal/alloy/testdata/import_string/import_string_1.txtar b/internal/runtime/testdata/import_string/import_string_1.txtar similarity index 100% rename from internal/alloy/testdata/import_string/import_string_1.txtar rename to internal/runtime/testdata/import_string/import_string_1.txtar diff --git a/internal/alloy/testdata/repo.git.tar b/internal/runtime/testdata/repo.git.tar similarity index 100% rename from internal/alloy/testdata/repo.git.tar rename to internal/runtime/testdata/repo.git.tar diff --git a/internal/alloy/testdata/repo2.git.tar b/internal/runtime/testdata/repo2.git.tar similarity index 100% rename from internal/alloy/testdata/repo2.git.tar rename to internal/runtime/testdata/repo2.git.tar diff --git a/internal/alloy/tracing/internal/jaegerremote/LICENSE b/internal/runtime/tracing/internal/jaegerremote/LICENSE similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/LICENSE rename to internal/runtime/tracing/internal/jaegerremote/LICENSE diff --git a/internal/alloy/tracing/internal/jaegerremote/README.md b/internal/runtime/tracing/internal/jaegerremote/README.md similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/README.md rename to internal/runtime/tracing/internal/jaegerremote/README.md diff --git a/internal/alloy/tracing/internal/jaegerremote/constants.go b/internal/runtime/tracing/internal/jaegerremote/constants.go similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/constants.go rename to internal/runtime/tracing/internal/jaegerremote/constants.go diff --git a/internal/alloy/tracing/internal/jaegerremote/doc.go b/internal/runtime/tracing/internal/jaegerremote/doc.go similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/doc.go rename to internal/runtime/tracing/internal/jaegerremote/doc.go diff --git a/internal/alloy/tracing/internal/jaegerremote/sampler.go b/internal/runtime/tracing/internal/jaegerremote/sampler.go similarity index 99% rename from internal/alloy/tracing/internal/jaegerremote/sampler.go rename to internal/runtime/tracing/internal/jaegerremote/sampler.go index 40be8544d7..10dd7abd9d 100644 --- a/internal/alloy/tracing/internal/jaegerremote/sampler.go +++ b/internal/runtime/tracing/internal/jaegerremote/sampler.go @@ -23,7 +23,7 @@ import ( "math" "sync" - "github.com/grafana/alloy/internal/alloy/tracing/internal/jaegerremote/utils" + "github.com/grafana/alloy/internal/runtime/tracing/internal/jaegerremote/utils" jaeger_api_v2 "github.com/jaegertracing/jaeger/proto-gen/api_v2" "go.opentelemetry.io/otel/sdk/trace" oteltrace "go.opentelemetry.io/otel/trace" diff --git a/internal/alloy/tracing/internal/jaegerremote/sampler_remote.go b/internal/runtime/tracing/internal/jaegerremote/sampler_remote.go similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/sampler_remote.go rename to internal/runtime/tracing/internal/jaegerremote/sampler_remote.go diff --git a/internal/alloy/tracing/internal/jaegerremote/sampler_remote_options.go b/internal/runtime/tracing/internal/jaegerremote/sampler_remote_options.go similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/sampler_remote_options.go rename to internal/runtime/tracing/internal/jaegerremote/sampler_remote_options.go diff --git a/internal/alloy/tracing/internal/jaegerremote/utils/http_json.go b/internal/runtime/tracing/internal/jaegerremote/utils/http_json.go similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/utils/http_json.go rename to internal/runtime/tracing/internal/jaegerremote/utils/http_json.go diff --git a/internal/alloy/tracing/internal/jaegerremote/utils/rate_limiter.go b/internal/runtime/tracing/internal/jaegerremote/utils/rate_limiter.go similarity index 100% rename from internal/alloy/tracing/internal/jaegerremote/utils/rate_limiter.go rename to internal/runtime/tracing/internal/jaegerremote/utils/rate_limiter.go diff --git a/internal/alloy/tracing/lazy_sampler.go b/internal/runtime/tracing/lazy_sampler.go similarity index 100% rename from internal/alloy/tracing/lazy_sampler.go rename to internal/runtime/tracing/lazy_sampler.go diff --git a/internal/alloy/tracing/otelcol_client.go b/internal/runtime/tracing/otelcol_client.go similarity index 100% rename from internal/alloy/tracing/otelcol_client.go rename to internal/runtime/tracing/otelcol_client.go diff --git a/internal/alloy/tracing/tracing.go b/internal/runtime/tracing/tracing.go similarity index 98% rename from internal/alloy/tracing/tracing.go rename to internal/runtime/tracing/tracing.go index 8161ffa0f0..ab25b9fb55 100644 --- a/internal/alloy/tracing/tracing.go +++ b/internal/runtime/tracing/tracing.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/grafana/alloy/internal/alloy/tracing/internal/jaegerremote" "github.com/grafana/alloy/internal/build" "github.com/grafana/alloy/internal/component/otelcol" + "github.com/grafana/alloy/internal/runtime/tracing/internal/jaegerremote" "go.opentelemetry.io/otel/exporters/otlp/otlptrace" "go.opentelemetry.io/otel/sdk/resource" tracesdk "go.opentelemetry.io/otel/sdk/trace" diff --git a/internal/alloy/tracing/wrap_tracer.go b/internal/runtime/tracing/wrap_tracer.go similarity index 100% rename from internal/alloy/tracing/wrap_tracer.go rename to internal/runtime/tracing/wrap_tracer.go diff --git a/internal/service/cluster/cluster.go b/internal/service/cluster/cluster.go index b35cc01798..d534dd6c34 100644 --- a/internal/service/cluster/cluster.go +++ b/internal/service/cluster/cluster.go @@ -14,9 +14,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service" http_service "github.com/grafana/alloy/internal/service/http" "github.com/grafana/ckit" diff --git a/internal/service/http/http.go b/internal/service/http/http.go index b20d265c56..e8154220c8 100644 --- a/internal/service/http/http.go +++ b/internal/service/http/http.go @@ -16,10 +16,10 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/component" "github.com/grafana/alloy/internal/featuregate" + alloy_runtime "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/internal/static/server" "github.com/grafana/ckit/memconn" @@ -44,7 +44,7 @@ type Options struct { Gatherer prometheus.Gatherer // Where to collect metrics from. ReadyFunc func() bool - ReloadFunc func() (*alloy.Source, error) + ReloadFunc func() (*alloy_runtime.Source, error) HTTPListenAddr string // Address to listen for HTTP traffic on. MemoryListenAddr string // Address to accept in-memory traffic on. diff --git a/internal/service/http/http_test.go b/internal/service/http/http_test.go index 90a80a4051..15a76f46ea 100644 --- a/internal/service/http/http_test.go +++ b/internal/service/http/http_test.go @@ -6,9 +6,9 @@ import ( "net/http" "testing" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/componenttest" "github.com/grafana/alloy/internal/component" + "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/componenttest" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" @@ -172,7 +172,7 @@ func newTestEnvironment(t *testing.T) (*testEnvironment, error) { Gatherer: prometheus.NewRegistry(), ReadyFunc: func() bool { return true }, - ReloadFunc: func() (*alloy.Source, error) { return nil, nil }, + ReloadFunc: func() (*runtime.Source, error) { return nil, nil }, HTTPListenAddr: fmt.Sprintf("127.0.0.1:%d", port), MemoryListenAddr: "alloy.internal:12345", diff --git a/internal/service/labelstore/service.go b/internal/service/labelstore/service.go index b5cc8f22a1..79362d990c 100644 --- a/internal/service/labelstore/service.go +++ b/internal/service/labelstore/service.go @@ -6,8 +6,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" alloy_service "github.com/grafana/alloy/internal/service" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/service/remotecfg/remotecfg.go b/internal/service/remotecfg/remotecfg.go index 3c3c56a9c5..25c1b3eeda 100644 --- a/internal/service/remotecfg/remotecfg.go +++ b/internal/service/remotecfg/remotecfg.go @@ -15,10 +15,10 @@ import ( "github.com/go-kit/log" collectorv1 "github.com/grafana/alloy-remote-config/api/gen/proto/go/collector/v1" "github.com/grafana/alloy-remote-config/api/gen/proto/go/collector/v1/collectorv1connect" - "github.com/grafana/alloy/internal/alloy/logging/level" "github.com/grafana/alloy/internal/alloyseed" "github.com/grafana/alloy/internal/component/common/config" "github.com/grafana/alloy/internal/featuregate" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/syntax" commonconfig "github.com/prometheus/common/config" diff --git a/internal/service/remotecfg/remotecfg_test.go b/internal/service/remotecfg/remotecfg_test.go index 03194b79d1..99a2011793 100644 --- a/internal/service/remotecfg/remotecfg_test.go +++ b/internal/service/remotecfg/remotecfg_test.go @@ -11,12 +11,12 @@ import ( "connectrpc.com/connect" collectorv1 "github.com/grafana/alloy-remote-config/api/gen/proto/go/collector/v1" - "github.com/grafana/alloy/internal/alloy" - "github.com/grafana/alloy/internal/alloy/componenttest" - "github.com/grafana/alloy/internal/alloy/logging" "github.com/grafana/alloy/internal/component" _ "github.com/grafana/alloy/internal/component/loki/process" "github.com/grafana/alloy/internal/featuregate" + alloy_runtime "github.com/grafana/alloy/internal/runtime" + "github.com/grafana/alloy/internal/runtime/componenttest" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/alloy/internal/service" "github.com/grafana/alloy/internal/util" "github.com/grafana/alloy/syntax" @@ -165,7 +165,7 @@ func (fakeHost) GetService(_ string) (service.Service, bool) { return nil, f func (f fakeHost) NewController(id string) service.Controller { logger, _ := logging.New(io.Discard, logging.DefaultOptions) - ctrl := alloy.New(alloy.Options{ + ctrl := alloy_runtime.New(alloy_runtime.Options{ ControllerID: ServiceName, Logger: logger, Tracer: nil, @@ -211,12 +211,12 @@ func (ag *collectorClient) ListCollectors(context.Context, *connect.Request[coll } type serviceController struct { - f *alloy.Alloy + f *alloy_runtime.Runtime } func (sc serviceController) Run(ctx context.Context) { sc.f.Run(ctx) } func (sc serviceController) LoadSource(b []byte, args map[string]any) error { - source, err := alloy.ParseSource("", b) + source, err := alloy_runtime.ParseSource("", b) if err != nil { return err } diff --git a/internal/static/integrations/kafka_exporter/kafka_exporter.go b/internal/static/integrations/kafka_exporter/kafka_exporter.go index b81f289a01..7e7e50631b 100644 --- a/internal/static/integrations/kafka_exporter/kafka_exporter.go +++ b/internal/static/integrations/kafka_exporter/kafka_exporter.go @@ -7,7 +7,7 @@ import ( "github.com/IBM/sarama" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging/level" + "github.com/grafana/alloy/internal/runtime/logging/level" "github.com/grafana/alloy/internal/static/integrations" integrations_v2 "github.com/grafana/alloy/internal/static/integrations/v2" "github.com/grafana/alloy/internal/static/integrations/v2/metricsutils" diff --git a/internal/static/server/config.go b/internal/static/server/config.go index a44c2ad197..6007fa05fd 100644 --- a/internal/static/server/config.go +++ b/internal/static/server/config.go @@ -3,7 +3,7 @@ package server import ( "flag" - "github.com/grafana/alloy/internal/alloy/logging" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/grafana/dskit/log" ) diff --git a/internal/util/test_logger.go b/internal/util/test_logger.go index 8e19b6c66a..be3932d4e8 100644 --- a/internal/util/test_logger.go +++ b/internal/util/test_logger.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/alloy/internal/alloy/logging" + "github.com/grafana/alloy/internal/runtime/logging" "github.com/stretchr/testify/require" )