From 04295c4a2e8bb080333c806cb1f40c14efbc3460 Mon Sep 17 00:00:00 2001 From: Piotr <17101802+thampiotr@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:00:52 +0000 Subject: [PATCH 1/9] Update loki dep to k190 (#6543) * Update loki dep to k190 * port renames * fix loki push api --- component/common/net/config.go | 4 +-- component/common/net/config_test.go | 8 ++--- .../api/internal/lokipush/push_api_server.go | 2 +- .../internal/common/weaveworks_server.go | 4 +-- go.mod | 18 ++++++---- go.sum | 34 +++++++++++++------ pkg/logs/logs_test.go | 2 +- 7 files changed, 45 insertions(+), 27 deletions(-) diff --git a/component/common/net/config.go b/component/common/net/config.go index 6ce1ae0bdd..444627bf50 100644 --- a/component/common/net/config.go +++ b/component/common/net/config.go @@ -77,9 +77,9 @@ func (g *GRPCConfig) Into(c *dskit.Config) { c.GRPCServerMaxConnectionAge = g.MaxConnectionAge c.GRPCServerMaxConnectionAgeGrace = g.MaxConnectionAgeGrace c.GRPCServerMaxConnectionIdle = g.MaxConnectionIdle - c.GPRCServerMaxRecvMsgSize = g.ServerMaxRecvMsg + c.GRPCServerMaxRecvMsgSize = g.ServerMaxRecvMsg c.GRPCServerMaxSendMsgSize = g.ServerMaxSendMsg - c.GPRCServerMaxConcurrentStreams = g.ServerMaxConcurrentStreams + c.GRPCServerMaxConcurrentStreams = g.ServerMaxConcurrentStreams } // Convert converts the River-based ServerConfig into a dskit.Config object. diff --git a/component/common/net/config_test.go b/component/common/net/config_test.go index 1e296ed695..0eb8bf1082 100644 --- a/component/common/net/config_test.go +++ b/component/common/net/config_test.go @@ -50,7 +50,7 @@ func TestConfig(t *testing.T) { require.Equal(t, time.Second*30, config.ServerGracefulShutdownTimeout) require.Equal(t, size4MB, config.GRPCServerMaxSendMsgSize) - require.Equal(t, size4MB, config.GPRCServerMaxRecvMsgSize) + require.Equal(t, size4MB, config.GRPCServerMaxRecvMsgSize) }, }, "overriding defaults": { @@ -97,7 +97,7 @@ func TestConfig(t *testing.T) { require.Equal(t, "0.0.0.0", config.GRPCListenAddress) require.Equal(t, 10, config.GRPCServerMaxSendMsgSize) // this should have the default applied - require.Equal(t, size4MB, config.GPRCServerMaxRecvMsgSize) + require.Equal(t, size4MB, config.GRPCServerMaxRecvMsgSize) require.Equal(t, time.Minute, config.ServerGracefulShutdownTimeout) }, @@ -141,9 +141,9 @@ func TestConfig(t *testing.T) { require.Equal(t, 5*time.Minute, config.GRPCServerMaxConnectionAge) require.Equal(t, 6*time.Minute, config.GRPCServerMaxConnectionAgeGrace) require.Equal(t, 7*time.Minute, config.GRPCServerMaxConnectionIdle) - require.Equal(t, 5, config.GPRCServerMaxRecvMsgSize) + require.Equal(t, 5, config.GRPCServerMaxRecvMsgSize) require.Equal(t, 6, config.GRPCServerMaxSendMsgSize) - require.Equal(t, uint(7), config.GPRCServerMaxConcurrentStreams) + require.Equal(t, uint(7), config.GRPCServerMaxConcurrentStreams) }, }, } diff --git a/component/loki/source/api/internal/lokipush/push_api_server.go b/component/loki/source/api/internal/lokipush/push_api_server.go index 9a9a20f759..d2813d2755 100644 --- a/component/loki/source/api/internal/lokipush/push_api_server.go +++ b/component/loki/source/api/internal/lokipush/push_api_server.go @@ -137,7 +137,7 @@ func (s *PushAPIServer) getRelabelRules() []*relabel.Config { func (s *PushAPIServer) handleLoki(w http.ResponseWriter, r *http.Request) { logger := util_log.WithContext(r.Context(), util_log.Logger) userID, _ := tenant.TenantID(r.Context()) - req, err := push.ParseRequest(logger, userID, r, nil) + req, err := push.ParseRequest(logger, userID, r, nil, nil, push.ParseLokiRequest) if err != nil { level.Warn(s.logger).Log("msg", "failed to parse incoming push request", "err", err.Error()) http.Error(w, err.Error(), http.StatusBadRequest) diff --git a/converter/internal/common/weaveworks_server.go b/converter/internal/common/weaveworks_server.go index 9211ca47f4..5fa665d77e 100644 --- a/converter/internal/common/weaveworks_server.go +++ b/converter/internal/common/weaveworks_server.go @@ -32,9 +32,9 @@ func WeaveWorksServerToFlowServer(config server.Config) *fnet.ServerConfig { MaxConnectionAge: config.GRPCServerMaxConnectionAge, MaxConnectionAgeGrace: config.GRPCServerMaxConnectionAgeGrace, MaxConnectionIdle: config.GRPCServerMaxConnectionIdle, - ServerMaxRecvMsg: config.GPRCServerMaxRecvMsgSize, + ServerMaxRecvMsg: config.GRPCServerMaxRecvMsgSize, ServerMaxSendMsg: config.GRPCServerMaxSendMsgSize, - ServerMaxConcurrentStreams: config.GPRCServerMaxConcurrentStreams, + ServerMaxConcurrentStreams: config.GRPCServerMaxConcurrentStreams, }, GracefulShutdownTimeout: config.ServerGracefulShutdownTimeout, } diff --git a/go.mod b/go.mod index deab3814d8..81e677a27a 100644 --- a/go.mod +++ b/go.mod @@ -52,10 +52,9 @@ require ( github.com/gorilla/mux v1.8.0 github.com/grafana/ckit v0.0.0-20230906125525-c046c99a5c04 github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 - github.com/grafana/dskit v0.0.0-20230829141140-06955c011ffd + github.com/grafana/dskit v0.0.0-20240104111617-ea101a3b86eb github.com/grafana/go-gelf/v2 v2.0.1 - // Loki main commit where the Prometheus dependency matches ours. TODO(@tpaschalis) Update to kXYZ branch once it's available - github.com/grafana/loki v1.6.2-0.20231004111112-07cbef92268a + github.com/grafana/loki v1.6.2-0.20240221085104-f9d188620153 // k190 branch github.com/grafana/pyroscope-go/godeltaprof v0.1.7 github.com/grafana/pyroscope/api v0.4.0 github.com/grafana/pyroscope/ebpf v0.4.3 @@ -81,7 +80,7 @@ require ( github.com/hashicorp/vault/api/auth/userpass v0.2.0 github.com/heroku/x v0.0.61 github.com/iamseth/oracledb_exporter v0.0.0-20230918193147-95e16f21ceee - github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 + github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 github.com/jaegertracing/jaeger v1.50.0 github.com/jmespath/go-jmespath v0.4.0 github.com/json-iterator/go v1.1.12 @@ -303,7 +302,7 @@ require ( github.com/blang/semver v3.5.2-0.20180723201105-3c1074078d32+incompatible // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/boynux/squid-exporter v1.10.5-0.20230618153315-c1fae094e18e - github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee // indirect + github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b // indirect github.com/cenkalti/backoff/v3 v3.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect @@ -393,7 +392,7 @@ require ( github.com/gophercloud/gophercloud v1.7.0 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/gosnmp/gosnmp v1.36.0 // indirect - github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 // indirect + github.com/grafana/gomemcache v0.0.0-20231204155601-7de47a8c3cb0 // indirect github.com/grafana/loki/pkg/push v0.0.0-20231212100434-384e5c2dc872 // k180 branch github.com/grobie/gomemcache v0.0.0-20230213081705-239240bbc445 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.18.0 // indirect @@ -624,6 +623,7 @@ require ( dario.cat/mergo v1.0.0 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/compute/armcompute/v4 v4.2.1 // indirect github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/network/armnetwork/v2 v2.2.1 // indirect + github.com/DataDog/sketches-go v1.4.4 // indirect github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 // indirect github.com/Shopify/sarama v1.38.1 // indirect github.com/Showmax/go-fqdn v1.0.0 // indirect @@ -638,15 +638,19 @@ require ( github.com/aws/aws-sdk-go-v2/service/secretsmanager v1.27.0 // indirect github.com/aws/aws-sdk-go-v2/service/shield v1.24.0 // indirect github.com/aws/aws-sdk-go-v2/service/storagegateway v1.26.0 // indirect + github.com/axiomhq/hyperloglog v0.0.0-20240124082744-24bca3a5b39b // indirect github.com/channelmeter/iso8601duration v0.0.0-20150204201828-8da3af7a2a61 // indirect github.com/cloudflare/circl v1.3.7 // indirect github.com/containerd/log v0.1.0 // indirect + github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc // indirect github.com/drone/envsubst v1.0.3 // indirect github.com/go-jose/go-jose/v3 v3.0.1 // indirect github.com/golang-jwt/jwt/v5 v5.0.0 // indirect github.com/google/gnostic-models v0.6.8 // indirect github.com/grafana/jfr-parser v0.8.0 // indirect + github.com/grafana/jsonparser v0.0.0-20240209175146-098958973a2d // indirect github.com/hetznercloud/hcloud-go/v2 v2.4.0 // indirect + github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b // indirect github.com/julienschmidt/httprouter v1.3.0 // indirect github.com/knadh/koanf/v2 v2.0.1 // indirect github.com/lightstep/go-expohisto v1.0.0 // indirect @@ -664,7 +668,7 @@ require ( github.com/openshift/client-go v0.0.0-20210521082421-73d9475a9142 // indirect github.com/pjbgf/sha1cd v0.3.0 // indirect github.com/prometheus-community/prom-label-proxy v0.6.0 // indirect - github.com/sercand/kuberesolver/v4 v4.0.0 // indirect + github.com/sercand/kuberesolver/v5 v5.1.1 // indirect github.com/skeema/knownhosts v1.2.1 // indirect github.com/sony/gobreaker v0.5.0 // indirect github.com/tidwall/gjson v1.10.2 // indirect diff --git a/go.sum b/go.sum index f756dab4a7..95dd6c93ba 100644 --- a/go.sum +++ b/go.sum @@ -181,6 +181,10 @@ github.com/DATA-DOG/go-sqlmock v1.5.0 h1:Shsta01QNfFxHCfpW6YH2STWB0MudeXXEWMr20O github.com/DATA-DOG/go-sqlmock v1.5.0/go.mod h1:f/Ixk793poVmq4qj/V1dPUg2JEAKC73Q5eFN3EC/SaM= github.com/DataDog/datadog-go v0.0.0-20160329135253-cc2f4770f4d6/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= +github.com/DataDog/sketches-go v1.4.4 h1:dF52vzXRFSPOj2IjXSWLvXq3jubL4CI69kwYjJ1w5Z8= +github.com/DataDog/sketches-go v1.4.4/go.mod h1:XR0ns2RtEEF09mDKXiKZiQg+nfZStrq1ZuL1eezeZe0= +github.com/DmitriyVTitov/size v1.5.0 h1:/PzqxYrOyOUX1BXj6J9OuVRVGe+66VL4D9FlUaW515g= +github.com/DmitriyVTitov/size v1.5.0/go.mod h1:le6rNI4CoLQV1b9gzp1+3d7hMAD/uu2QcJ+aYbNgiU0= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw= github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo= github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.20.0 h1:tk85AYGwOf6VNtoOQi8w/kVDi2vmPxp3/OU2FsUpdcA= @@ -387,6 +391,8 @@ github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAm github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/aws/smithy-go v1.20.0 h1:6+kZsCXZwKxZS9RfISnPc4EXlHoyAkm2hPuM8X2BrrQ= github.com/aws/smithy-go v1.20.0/go.mod h1:uo5RKksAl4PzhqaAbjd4rLgFoq5koTsQKYuGe7dklGc= +github.com/axiomhq/hyperloglog v0.0.0-20240124082744-24bca3a5b39b h1:F3yMzKumBUQ6Fn0sYI1YQ16vQRucpZOfBQ9HXWl5+XI= +github.com/axiomhq/hyperloglog v0.0.0-20240124082744-24bca3a5b39b/go.mod h1:k08r+Yj1PRAmuayFiRK6MYuR5Ve4IuZtTfxErMIh0+c= github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0 h1:0NmehRCgyk5rljDQLKUO+cRJCnduDyn11+zGZIc9Z48= github.com/aybabtme/iocontrol v0.0.0-20150809002002-ad15bcfc95a0/go.mod h1:6L7zgvqo0idzI7IO8de6ZC051AfXb5ipkIJ7bIA2tGA= github.com/basgys/goxml2json v1.1.0 h1:4ln5i4rseYfXNd86lGEB+Vi652IsIXIvggKM/BhUKVw= @@ -423,8 +429,8 @@ github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx2 github.com/burningalchemist/sql_exporter v0.0.0-20240103092044-466b38b6abc4 h1:dgjwrjeVe90AeMhrx04TmDKjZe7xqKKEUxT3QKNx9RU= github.com/burningalchemist/sql_exporter v0.0.0-20240103092044-466b38b6abc4/go.mod h1:aRr7CZ/KleZpcDkQVsNeXE1BFT3xRG8baUHJ7J+j8NI= github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= -github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee h1:BnPxIde0gjtTnc9Er7cxvBk8DHLWhEux0SxayC8dP6I= -github.com/c2h5oh/datasize v0.0.0-20200112174442-28bbd4740fee/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= +github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b h1:6+ZFm0flnudZzdSE0JxlhR2hKnGPcNB35BjQf4RYQDY= +github.com/c2h5oh/datasize v0.0.0-20220606134207-859f65c6625b/go.mod h1:S/7n9copUssQ56c7aAgHqftWO4LTf4xY6CGWt8Bc+3M= github.com/caio/go-tdigest v2.3.0+incompatible/go.mod h1:sHQM/ubZStBUmF1WbB8FAm8q9GjDajLC5T7ydxE3JHI= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/casbin/casbin/v2 v2.31.6/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= @@ -552,6 +558,8 @@ github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba/go.mod h1:dV8l github.com/devigned/tab v0.1.1/go.mod h1:XG9mPq0dFghrYvoBF3xdRrJzSTX1b7IQrvaL9mzjeJY= github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ= github.com/dgrijalva/jwt-go/v4 v4.0.0-preview1/go.mod h1:+hnT3ywWDTAFrW5aE+u2Sa/wT555ZqwoCS+pk3p6ry4= +github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc h1:8WFBn63wegobsYAX0YjD+8suexZDga5CctH4CCTx2+8= +github.com/dgryski/go-metro v0.0.0-20180109044635-280f6062b5bc/go.mod h1:c9O8+fpSOX1DM8cPNSkX/qsBWdkD4yd2dpciOWQjpBw= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/digitalocean/godo v1.1.1/go.mod h1:h6faOIcZ8lWIwNQ+DN7b3CgX4Kwby5T+nbpNqkUIozU= @@ -1039,19 +1047,21 @@ github.com/grafana/ckit v0.0.0-20230906125525-c046c99a5c04 h1:tG8Qxq4dN1WqakMmsP github.com/grafana/ckit v0.0.0-20230906125525-c046c99a5c04/go.mod h1:HOnDIbkxfvVlDM5FBujt0uawGLfdpdTeqE7fIwfBmQk= github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2 h1:qhugDMdQ4Vp68H0tp/0iN17DM2ehRo1rLEdOFe/gB8I= github.com/grafana/cloudflare-go v0.0.0-20230110200409-c627cf6792f2/go.mod h1:w/aiO1POVIeXUQyl0VQSZjl5OAGDTL5aX+4v0RA1tcw= -github.com/grafana/dskit v0.0.0-20230829141140-06955c011ffd h1:RHZuBHWNS2HRJ5XhQK7cKP11EMMJPtJO2xKvQ+ws+PU= -github.com/grafana/dskit v0.0.0-20230829141140-06955c011ffd/go.mod h1:3u7fr4hmOhuUL9Yc1QP/oa3za73kxvqJnRJH4BA5fOM= +github.com/grafana/dskit v0.0.0-20240104111617-ea101a3b86eb h1:AWE6+kvtE18HP+lRWNUCyvymyrFSXs6TcS2vXIXGIuw= +github.com/grafana/dskit v0.0.0-20240104111617-ea101a3b86eb/go.mod h1:kkWM4WUV230bNG3urVRWPBnSJHs64y/0RmWjftnnn0c= github.com/grafana/go-gelf/v2 v2.0.1 h1:BOChP0h/jLeD+7F9mL7tq10xVkDG15he3T1zHuQaWak= github.com/grafana/go-gelf/v2 v2.0.1/go.mod h1:lexHie0xzYGwCgiRGcvZ723bSNyNI8ZRD4s0CLobh90= github.com/grafana/gocql v0.0.0-20200605141915-ba5dc39ece85/go.mod h1:crI9WX6p0IhrqB+DqIUHulRW853PaNFf7o4UprV//3I= -github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9 h1:WB3bGH2f1UN6jkd6uAEWfHB8OD7dKJ0v2Oo6SNfhpfQ= -github.com/grafana/gomemcache v0.0.0-20230316202710-a081dae0aba9/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= +github.com/grafana/gomemcache v0.0.0-20231204155601-7de47a8c3cb0 h1:aLBiDMjTtXx2800iCIp+8kdjIlvGX0MF/zICQMQO2qU= +github.com/grafana/gomemcache v0.0.0-20231204155601-7de47a8c3cb0/go.mod h1:PGk3RjYHpxMM8HFPhKKo+vve3DdlPUELZLSDEFehPuU= github.com/grafana/jfr-parser v0.8.0 h1:/uo2wZNXrxw7tKLFwP2omJ3EQGMkD9wzhPsRogVofc0= github.com/grafana/jfr-parser v0.8.0/go.mod h1:M5u1ux34Qo47ZBWksbMYVk40s7dvU3WMVYpxweEu4R0= github.com/grafana/jfr-parser/pprof v0.0.0-20240126072739-986e71dc0361 h1:TtNajaiSRfM2Mz8N7ouFQDFlviXbIEk9Hts0yoZnhGM= github.com/grafana/jfr-parser/pprof v0.0.0-20240126072739-986e71dc0361/go.mod h1:P5406BrWxjahTzVF6aCSumNI1KPlZJc0zO0v+zKZ4gc= -github.com/grafana/loki v1.6.2-0.20231004111112-07cbef92268a h1:lvSHlNONeo/H+aWRk86QEfBpRDCEX1yoqpsCK0Tys+g= -github.com/grafana/loki v1.6.2-0.20231004111112-07cbef92268a/go.mod h1:a5c5ZTC6FNufKkvF8NeDAb2nCWJpgkVDrejmV+O9hac= +github.com/grafana/jsonparser v0.0.0-20240209175146-098958973a2d h1:YwbJJ/PrVWVdnR+j/EAVuazdeP+Za5qbiH1Vlr+wFXs= +github.com/grafana/jsonparser v0.0.0-20240209175146-098958973a2d/go.mod h1:796sq+UcONnSlzA3RtlBZ+b/hrerkZXiEmO8oMjyRwY= +github.com/grafana/loki v1.6.2-0.20240221085104-f9d188620153 h1:C191g5Ls8lIf9lkJEoScTQgoVDwUdK4HXKP5XtL+zAM= +github.com/grafana/loki v1.6.2-0.20240221085104-f9d188620153/go.mod h1:j2XCl3SmslPf+3Vs7uyoaJE/QkmUlL9JzTBTShSOSiU= github.com/grafana/loki/pkg/push v0.0.0-20231212100434-384e5c2dc872 h1:6kPX7bngjBgUlHqADwZ6249UtzMaoQW5n0H8bOtnYeM= github.com/grafana/loki/pkg/push v0.0.0-20231212100434-384e5c2dc872/go.mod h1:f3JSoxBTPXX5ec4FxxeC19nTBSxoTz+cBgS3cYLMcr0= github.com/grafana/mysqld_exporter v0.12.2-0.20231005125903-364b9c41e595 h1:I9sRknI5ajd8whPOX0nBDXy5B6xUfhItClMy+6R4oqE= @@ -1291,11 +1301,13 @@ github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLf github.com/infinityworks/go-common v0.0.0-20170820165359-7f20a140fd37 h1:Lm6kyC3JBiJQvJrus66He0E4viqDc/m5BdiFNSkIFfU= github.com/infinityworks/go-common v0.0.0-20170820165359-7f20a140fd37/go.mod h1:+OaHNKQvQ9oOCr+DgkF95PkiDx20fLHpzMp8SmRPQTg= github.com/influxdata/go-syslog/v2 v2.0.1/go.mod h1:hjvie1UTaD5E1fTnDmxaCw8RRDrT4Ve+XHr5O2dKSCo= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6 h1:s9ZL6ZhFF8y6ebnm1FLvobkzoIu5xwDQUcRPk/IEhpM= -github.com/influxdata/go-syslog/v3 v3.0.1-0.20210608084020-ac565dc76ba6/go.mod h1:aXdIdfn2OcGnMhOTojXmwZqXKgC3MU5riiNvzwwG9OY= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4 h1:2r2WiFeAwiJ/uyx1qIKnV1L4C9w/2V8ehlbJY4gjFaM= +github.com/influxdata/go-syslog/v3 v3.0.1-0.20230911200830-875f5bc594a4/go.mod h1:1yEQhaLb/cETXCqQmdh7lDjupNAReO7c83AHyK2dJ48= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/influxdata/tail v1.0.1-0.20200707181643-03a791b270e4/go.mod h1:VeiWgI3qaGdJWust2fP27a6J+koITo/1c/UhxeOxgaM= +github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b h1:i44CesU68ZBRvtCjBi3QSosCIKrjmMbYlQMFAwVLds4= +github.com/influxdata/tdigest v0.0.2-0.20210216194612-fc98d27c9e8b/go.mod h1:Z0kXnxzbTC2qrx4NaIzYkE1k66+6oEDQTvL95hQFh5Y= github.com/influxdata/telegraf v1.16.3 h1:x0qeuSGGMg5y+YqP/5ZHwXZu3bcBrO8AAQOTNlYEb1c= github.com/influxdata/telegraf v1.16.3/go.mod h1:fX/6k7qpIqzVPWyeIamb0wN5hbwc0ANUaTS80lPYFB8= github.com/influxdata/toml v0.0.0-20190415235208-270119a8ce65/go.mod h1:zApaNFpP/bTpQItGZNNUMISDMDAnTXu9UqJ4yT3ocz8= @@ -2921,9 +2933,11 @@ golang.zx2c4.com/wireguard/wgctrl v0.0.0-20200205215550-e35592f146e4/go.mod h1:U gomodules.xyz/jsonpatch/v2 v2.4.0 h1:Ci3iUJyx9UeRx7CeFN8ARgGbkESwJK+KB9lLcWxY/Zw= gomodules.xyz/jsonpatch/v2 v2.4.0/go.mod h1:AH3dM2RI6uoBZxn3LVrfvJ3E0/9dG4cSrbuBJT4moAY= gonum.org/v1/gonum v0.0.0-20180816165407-929014505bf4/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= +gonum.org/v1/gonum v0.0.0-20181121035319-3f7ecaa7e8ca/go.mod h1:Y+Yx5eoAFn32cQvJDxZx5Dpnq+c3wtXuadVZAcxbbBo= gonum.org/v1/gonum v0.6.2/go.mod h1:9mxDZsDKxgMAuccQkewq682L+0eCu4dCN2yonUJTCLU= gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= +gonum.org/v1/netlib v0.0.0-20181029234149-ec6d1f5cefe6/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0/go.mod h1:wa6Ws7BG/ESfp6dHfk7C6KdzKA7wR7u/rKwOGE66zvw= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b/go.mod h1:Wt8AAjI+ypCyYX3nZBvf6cAIx93T+c/OS2HFAYskSZc= google.golang.org/api v0.0.0-20180829000535-087779f1d2c9/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0= diff --git a/pkg/logs/logs_test.go b/pkg/logs/logs_test.go index 1f542b8813..ca25a50905 100644 --- a/pkg/logs/logs_test.go +++ b/pkg/logs/logs_test.go @@ -54,7 +54,7 @@ func TestLogs(t *testing.T) { }) go func() { _ = http.Serve(lis, http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) { - req, err := push.ParseRequest(log.NewNopLogger(), "user_id", r, nil) + req, err := push.ParseRequest(log.NewNopLogger(), "user_id", r, nil, nil, push.ParseLokiRequest) require.NoError(t, err) pushes <- req From 92d888eb15ad93ebaa42e289f1e07ac66d71f1f4 Mon Sep 17 00:00:00 2001 From: mattdurham Date: Wed, 28 Feb 2024 14:33:14 -0500 Subject: [PATCH 2/9] Add windows build for boring crypto (#6535) * Add windows build for boring crypto * add changelog * add details on cngcrypto and fips * put some jsonnet into a function Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --------- Signed-off-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> Co-authored-by: erikbaranowski <39704712+erikbaranowski@users.noreply.github.com> --- .drone/drone.yml | 133 +++++++++++++----------- .drone/pipelines/crosscompile.jsonnet | 55 ++++------ CHANGELOG.md | 2 + Makefile | 23 ++-- cmd/grafana-agent-operator/Dockerfile | 2 +- cmd/grafana-agent/Dockerfile | 2 +- cmd/grafana-agent/Dockerfile.windows | 2 +- cmd/grafana-agentctl/Dockerfile | 2 +- cmd/grafana-agentctl/Dockerfile.windows | 2 +- pkg/boringcrypto/disabled.go | 6 +- pkg/boringcrypto/enabled.go | 6 +- tools/make/build-container.mk | 2 +- tools/make/packaging.mk | 30 ++++-- 13 files changed, 151 insertions(+), 116 deletions(-) diff --git a/.drone/drone.yml b/.drone/drone.yml index f521c097fe..1070b7e0be 100644 --- a/.drone/drone.yml +++ b/.drone/drone.yml @@ -110,7 +110,7 @@ steps: - commands: - apt-get update -y && apt-get install -y libsystemd-dev - make lint - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Lint trigger: event: @@ -128,7 +128,7 @@ steps: - ERR_MSG="Dashboard definitions are out of date. Please run 'make generate-dashboards' and commit changes!" - if [ ! -z "$(git status --porcelain)" ]; then echo $ERR_MSG >&2; exit 1; fi - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Regenerate dashboards trigger: event: @@ -146,7 +146,7 @@ steps: - ERR_MSG="Custom Resource Definitions are out of date. Please run 'make generate-crds' and commit changes!" - if [ ! -z "$(git status --porcelain)" ]; then echo $ERR_MSG >&2; exit 1; fi - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Regenerate crds trigger: event: @@ -161,7 +161,7 @@ platform: steps: - commands: - make GO_TAGS="nodocker" test - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Run Go tests trigger: event: @@ -176,7 +176,7 @@ platform: steps: - commands: - K8S_USE_DOCKER_NETWORK=1 make test - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Run Go tests volumes: - name: docker @@ -199,7 +199,7 @@ platform: steps: - commands: - go test -tags="nodocker,nonetwork" ./... - image: grafana/agent-build-image:0.31.0-windows + image: grafana/agent-build-image:0.32.0-windows name: Run Go tests trigger: ref: @@ -214,7 +214,7 @@ platform: steps: - commands: - make agent-image - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build container volumes: - name: docker @@ -239,7 +239,7 @@ platform: steps: - commands: - make agentctl-image - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build container volumes: - name: docker @@ -264,7 +264,7 @@ platform: steps: - commands: - make operator-image - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build container volumes: - name: docker @@ -290,7 +290,7 @@ platform: steps: - commands: - '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows agent' - image: grafana/agent-build-image:0.31.0-windows + image: grafana/agent-build-image:0.32.0-windows name: Build container volumes: - name: docker @@ -316,7 +316,7 @@ platform: steps: - commands: - '& "C:/Program Files/git/bin/bash.exe" ./tools/ci/docker-containers-windows agentctl' - image: grafana/agent-build-image:0.31.0-windows + image: grafana/agent-build-image:0.32.0-windows name: Build container volumes: - name: docker @@ -343,7 +343,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -360,7 +360,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -377,7 +377,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -394,7 +394,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -410,7 +410,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -426,7 +426,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -442,7 +442,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -458,7 +458,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agent - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -475,7 +475,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -492,7 +492,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -509,7 +509,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -526,7 +526,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -542,7 +542,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -558,7 +558,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -574,7 +574,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -590,7 +590,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agent-flow - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -607,7 +607,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -624,7 +624,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -641,7 +641,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -658,7 +658,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -674,7 +674,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -690,7 +690,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -706,7 +706,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -722,7 +722,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make agentctl - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -739,7 +739,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -756,7 +756,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -773,7 +773,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=ppc64le GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -790,7 +790,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=s390x GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -806,7 +806,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -822,7 +822,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=darwin GOARCH=arm64 GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -838,7 +838,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -854,7 +854,7 @@ steps: - commands: - make generate-ui - GO_TAGS="builtinassets" GOOS=freebsd GOARCH=amd64 GOARM= make operator - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -871,7 +871,7 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=amd64 GOARM= GOEXPERIMENT=boringcrypto make agent-boringcrypto - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Build trigger: event: @@ -888,7 +888,24 @@ steps: - make generate-ui - GO_TAGS="builtinassets promtail_journal_enabled" GOOS=linux GOARCH=arm64 GOARM= GOEXPERIMENT=boringcrypto make agent-boringcrypto - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 + name: Build +trigger: + event: + - pull_request +type: docker +--- +kind: pipeline +name: Build agent-flow-windows-boringcrypto (Windows amd64) +platform: + arch: amd64 + os: linux +steps: +- commands: + - make generate-ui + - GO_TAGS="builtinassets" GOOS=windows GOARCH=amd64 GOARM= GOEXPERIMENT=cngcrypto + make agent-flow-windows-boringcrypto + image: grafana/agent-build-image:0.32.0-boringcrypto name: Build trigger: event: @@ -904,7 +921,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Configure QEMU volumes: - name: docker @@ -924,7 +941,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Publish container volumes: - name: docker @@ -948,7 +965,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Configure QEMU volumes: - name: docker @@ -968,7 +985,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Publish container volumes: - name: docker @@ -992,7 +1009,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Configure QEMU volumes: - name: docker @@ -1012,7 +1029,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Publish container volumes: - name: docker @@ -1036,7 +1053,7 @@ steps: - commands: - docker run --rm --privileged multiarch/qemu-user-static --reset -p yes failure: ignore - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Configure QEMU volumes: - name: docker @@ -1056,7 +1073,7 @@ steps: from_secret: docker_password GCR_CREDS: from_secret: gcr_admin - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Publish container volumes: - name: docker @@ -1085,7 +1102,7 @@ steps: from_secret: docker_login DOCKER_PASSWORD: from_secret: docker_password - image: grafana/agent-build-image:0.31.0-windows + image: grafana/agent-build-image:0.32.0-windows name: Build containers volumes: - name: docker @@ -1114,7 +1131,7 @@ steps: from_secret: docker_login DOCKER_PASSWORD: from_secret: docker_password - image: grafana/agent-build-image:0.31.0-windows + image: grafana/agent-build-image:0.32.0-windows name: Build containers volumes: - name: docker @@ -1231,7 +1248,7 @@ steps: from_secret: gpg_private_key GPG_PUBLIC_KEY: from_secret: gpg_public_key - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Publish release volumes: - name: docker @@ -1256,7 +1273,7 @@ steps: - DOCKER_OPTS="" make dist/grafana-agentctl-linux-amd64 - DOCKER_OPTS="" make dist.temp/grafana-agent-flow-linux-amd64 - DOCKER_OPTS="" make test-packages - image: grafana/agent-build-image:0.31.0 + image: grafana/agent-build-image:0.32.0 name: Test Linux system packages volumes: - name: docker @@ -1352,6 +1369,6 @@ kind: secret name: updater_private_key --- kind: signature -hmac: 2e439110a89f33a78d745a71635d47f9b1a99de6028bb84c258a0be9c09840f2 +hmac: de5b1d2ea6f503ff78e6ed296cde31239b68c60c75b443cf0f06610a79013682 ... diff --git a/.drone/pipelines/crosscompile.jsonnet b/.drone/pipelines/crosscompile.jsonnet index f03a3d4674..6c6f7b2446 100644 --- a/.drone/pipelines/crosscompile.jsonnet +++ b/.drone/pipelines/crosscompile.jsonnet @@ -22,6 +22,7 @@ local os_arch_tuples = [ // Windows { name: 'Windows amd64', os: 'windows', arch: 'amd64' }, + // FreeBSD { name: 'FreeBSD amd64', os: 'freebsd', arch: 'amd64' }, ]; @@ -37,15 +38,22 @@ local targets = [ local targets_boringcrypto = [ 'agent-boringcrypto', ]; +local targets_boringcrypto_windows = [ + 'agent-flow-windows-boringcrypto', +]; + local os_arch_types_boringcrypto = [ // Linux boringcrypto { name: 'Linux amd64 boringcrypto', os: 'linux', arch: 'amd64', experiment: 'boringcrypto' }, { name: 'Linux arm64 boringcrypto', os: 'linux', arch: 'arm64', experiment: 'boringcrypto' }, ]; +local windows_os_arch_types_boringcrypto = [ + // Windows boringcrypto + { name: 'Windows amd64', os: 'windows', arch: 'amd64', experiment: 'cngcrypto' }, +]; - -std.flatMap(function(target) ( +local build_environments(targets, tuples, image) = std.flatMap(function(target) ( std.map(function(platform) ( pipelines.linux('Build %s (%s)' % [target, platform.name]) { local env = { @@ -56,47 +64,26 @@ std.flatMap(function(target) ( target: target, tags: go_tags[platform.os], - }, + } + (if 'experiment' in platform then { GOEXPERIMENT: platform.experiment } else { }), trigger: { event: ['pull_request'], }, - steps: [{ - name: 'Build', - image: build_image.linux, - commands: [ - 'make generate-ui', - 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s make %(target)s' % env, - ], - }], - } - ), os_arch_tuples) -), targets) + -std.flatMap(function(target) ( - std.map(function(platform) ( - pipelines.linux('Build %s (%s)' % [target, platform.name]) { - local env = { - GOOS: platform.os, - GOARCH: platform.arch, - GOARM: if 'arm' in platform then platform.arm else '', - GOEXPERIMENT: platform.experiment, - - target: target, - - tags: go_tags[platform.os], - }, - trigger: { - event: ['pull_request'], - }, steps: [{ name: 'Build', - image: build_image.linux, + image: image, commands: [ 'make generate-ui', - 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s GOEXPERIMENT=%(GOEXPERIMENT)s make %(target)s' % env, + (if 'GOEXPERIMENT' in env + then 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s GOEXPERIMENT=%(GOEXPERIMENT)s make %(target)s' % env + else 'GO_TAGS="%(tags)s" GOOS=%(GOOS)s GOARCH=%(GOARCH)s GOARM=%(GOARM)s make %(target)s') % env, ], }], } - ), os_arch_types_boringcrypto) -), targets_boringcrypto) + ), tuples) +), targets); + +build_environments(targets, os_arch_tuples, build_image.linux) + +build_environments(targets_boringcrypto, os_arch_types_boringcrypto, build_image.linux) + +build_environments(targets_boringcrypto_windows, windows_os_arch_types_boringcrypto, build_image.boringcrypto) \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c1f2f9f9f4..e621e601b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,8 @@ v0.40.0 (2024-02-27) - Add `otelcol.connector.host_info` component to gather usage metrics for cloud users. (@rlankfo, @jcreixell) +- Add Windows boringcrypto build and executable. (@mattdurham) + ### Enhancements - Include line numbers in profiles produced by `pyrsocope.java` component. (@korniltsev) diff --git a/Makefile b/Makefile index f08f0f9d89..4281a954d6 100644 --- a/Makefile +++ b/Makefile @@ -21,13 +21,14 @@ ## ## Targets for building binaries: ## -## binaries Compiles all binaries. -## agent Compiles cmd/grafana-agent to $(AGENT_BINARY) -## agent-boringcrypto Compiles cmd/grafana-agent with GOEXPERIMENT=boringcrypto to $(AGENT_BORINGCRYPTO_BINARY) -## agent-flow Compiles cmd/grafana-agent-flow to $(FLOW_BINARY) -## agent-service Compiles cmd/grafana-agent-service to $(SERVICE_BINARY) -## agentctl Compiles cmd/grafana-agentctl to $(AGENTCTL_BINARY) -## operator Compiles cmd/grafana-agent-operator to $(OPERATOR_BINARY) +## binaries Compiles all binaries. +## agent Compiles cmd/grafana-agent to $(AGENT_BINARY) +## agent-boringcrypto Compiles cmd/grafana-agent with GOEXPERIMENT=boringcrypto to $(AGENT_BORINGCRYPTO_BINARY) +## agent-flow Compiles cmd/grafana-agent-flow to $(FLOW_BINARY) +## agent-flow-windows-boringcrypto Compiles cmd/grafana-agent-flow to $(FLOW_BINARY)-windows-boringcrypto +## agent-service Compiles cmd/grafana-agent-service to $(SERVICE_BINARY) +## agentctl Compiles cmd/grafana-agentctl to $(AGENTCTL_BINARY) +## operator Compiles cmd/grafana-agent-operator to $(OPERATOR_BINARY) ## ## Targets for building Docker images: ## @@ -98,6 +99,7 @@ AGENTCTL_IMAGE ?= grafana/agentctl:latest OPERATOR_IMAGE ?= grafana/agent-operator:latest AGENT_BINARY ?= build/grafana-agent AGENT_BORINGCRYPTO_BINARY ?= build/grafana-agent-boringcrypto +AGENT_BORINGCRYPTO_WINDOWS_BINARY ?= build/agent-flow-windows-boringcrypto.exe FLOW_BINARY ?= build/grafana-agent-flow SERVICE_BINARY ?= build/grafana-agent-service AGENTCTL_BINARY ?= build/grafana-agentctl @@ -192,6 +194,13 @@ else GOEXPERIMENT=boringcrypto $(GO_ENV) go build $(GO_FLAGS) -o $(AGENT_BORINGCRYPTO_BINARY) ./cmd/grafana-agent endif +agent-flow-windows-boringcrypto: +ifeq ($(USE_CONTAINER),1) + $(RERUN_IN_CONTAINER) +else + GOEXPERIMENT=cngcrypto $(GO_ENV) go build $(GO_FLAGS) -tags cngcrypto -o $(AGENT_BORINGCRYPTO_WINDOWS_BINARY) ./cmd/grafana-agent-flow +endif + agent-flow: ifeq ($(USE_CONTAINER),1) diff --git a/cmd/grafana-agent-operator/Dockerfile b/cmd/grafana-agent-operator/Dockerfile index a86af13209..3759851610 100644 --- a/cmd/grafana-agent-operator/Dockerfile +++ b/cmd/grafana-agent-operator/Dockerfile @@ -4,7 +4,7 @@ # default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set # in environment variables. -FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build +FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build ARG BUILDPLATFORM ARG TARGETPLATFORM ARG TARGETOS diff --git a/cmd/grafana-agent/Dockerfile b/cmd/grafana-agent/Dockerfile index f151d43fd0..9fcdce56b6 100644 --- a/cmd/grafana-agent/Dockerfile +++ b/cmd/grafana-agent/Dockerfile @@ -4,7 +4,7 @@ # default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set # in environment variables. -FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build +FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build ARG BUILDPLATFORM ARG TARGETPLATFORM ARG TARGETOS diff --git a/cmd/grafana-agent/Dockerfile.windows b/cmd/grafana-agent/Dockerfile.windows index 454c93450e..48b40c3d15 100644 --- a/cmd/grafana-agent/Dockerfile.windows +++ b/cmd/grafana-agent/Dockerfile.windows @@ -1,4 +1,4 @@ -FROM grafana/agent-build-image:0.30.4-windows as builder +FROM grafana/agent-build-image:0.32.0-windows as builder ARG VERSION ARG RELEASE_BUILD=1 diff --git a/cmd/grafana-agentctl/Dockerfile b/cmd/grafana-agentctl/Dockerfile index d04f1816ef..a96ac1a6a8 100644 --- a/cmd/grafana-agentctl/Dockerfile +++ b/cmd/grafana-agentctl/Dockerfile @@ -4,7 +4,7 @@ # default when running `docker buildx build` or when DOCKER_BUILDKIT=1 is set # in environment variables. -FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.30.4 as build +FROM --platform=$BUILDPLATFORM grafana/agent-build-image:0.32.0 as build ARG BUILDPLATFORM ARG TARGETPLATFORM ARG TARGETOS diff --git a/cmd/grafana-agentctl/Dockerfile.windows b/cmd/grafana-agentctl/Dockerfile.windows index 80d32f8667..5345428ce4 100644 --- a/cmd/grafana-agentctl/Dockerfile.windows +++ b/cmd/grafana-agentctl/Dockerfile.windows @@ -1,4 +1,4 @@ -FROM grafana/agent-build-image:0.30.4-windows as builder +FROM grafana/agent-build-image:0.32.0-windows as builder ARG VERSION ARG RELEASE_BUILD=1 diff --git a/pkg/boringcrypto/disabled.go b/pkg/boringcrypto/disabled.go index f1b6e3b8d3..84569b630e 100644 --- a/pkg/boringcrypto/disabled.go +++ b/pkg/boringcrypto/disabled.go @@ -1,4 +1,8 @@ -//go:build !(fips || boringcrypto) +//go:build !(fips || boringcrypto || cngcrypto) + +// fips https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md +// fips and boringcrytpo are for enabling via linux experiment using the goexperiment=boringcrytpo flag +// cngcrypto is used for windows builds that use https://github.com/microsoft/go fork, and is passed has a tag and experiment. package boringcrypto diff --git a/pkg/boringcrypto/enabled.go b/pkg/boringcrypto/enabled.go index 156370c88d..eddecceef2 100644 --- a/pkg/boringcrypto/enabled.go +++ b/pkg/boringcrypto/enabled.go @@ -1,4 +1,8 @@ -//go:build fips || boringcrypto +//go:build fips || boringcrypto || cngcrypto + +// fips https://boringssl.googlesource.com/boringssl/+/master/crypto/fipsmodule/FIPS.md +// fips and boringcrytpo are for enabling via linux experiment using the goexperiment=boringcrytpo flag +// cngcrypto is used for windows builds that use https://github.com/microsoft/go fork, and is passed has a tag and experiment. package boringcrypto diff --git a/tools/make/build-container.mk b/tools/make/build-container.mk index be1d4be9ca..22a502e4d9 100644 --- a/tools/make/build-container.mk +++ b/tools/make/build-container.mk @@ -34,7 +34,7 @@ # variable names should be passed through to the container. USE_CONTAINER ?= 0 -BUILD_IMAGE_VERSION ?= 0.31.0 +BUILD_IMAGE_VERSION ?= 0.32.0 BUILD_IMAGE ?= grafana/agent-build-image:$(BUILD_IMAGE_VERSION) DOCKER_OPTS ?= -it diff --git a/tools/make/packaging.mk b/tools/make/packaging.mk index c9421433e6..18c8569c4f 100644 --- a/tools/make/packaging.mk +++ b/tools/make/packaging.mk @@ -20,15 +20,15 @@ PACKAGING_VARS = RELEASE_BUILD=1 GO_TAGS="$(GO_TAGS)" GOOS=$(GOOS) GOARCH=$(GOAR # agent release binaries # -dist-agent-binaries: dist/grafana-agent-linux-amd64 \ - dist/grafana-agent-linux-arm64 \ - dist/grafana-agent-linux-ppc64le \ - dist/grafana-agent-linux-s390x \ - dist/grafana-agent-darwin-amd64 \ - dist/grafana-agent-darwin-arm64 \ - dist/grafana-agent-windows-amd64.exe \ - dist/grafana-agent-freebsd-amd64 \ - dist/grafana-agent-linux-amd64-boringcrypto \ +dist-agent-binaries: dist/grafana-agent-linux-amd64 \ + dist/grafana-agent-linux-arm64 \ + dist/grafana-agent-linux-ppc64le \ + dist/grafana-agent-linux-s390x \ + dist/grafana-agent-darwin-amd64 \ + dist/grafana-agent-darwin-arm64 \ + dist/grafana-agent-windows-amd64.exe \ + dist/grafana-agent-windows-boringcrypto-amd64.exe \ + dist/grafana-agent-freebsd-amd64 \ dist/grafana-agent-linux-arm64-boringcrypto dist/grafana-agent-linux-amd64: GO_TAGS += netgo builtinassets promtail_journal_enabled @@ -78,6 +78,18 @@ dist/grafana-agent-windows-amd64.exe: GOARCH := amd64 dist/grafana-agent-windows-amd64.exe: generate-ui $(PACKAGING_VARS) AGENT_BINARY=$@ "$(MAKE)" -f $(PARENT_MAKEFILE) agent +# NOTE(rfratto): do not use netgo when building Windows binaries, which +# prevents DNS short names from being resovable. See grafana/agent#4665. +# +# TODO(rfratto): add netgo back to Windows builds if a version of Go is +# released which natively supports resolving DNS short names on Windows. +dist/grafana-agent-windows-boringcrypto-amd64.exe: GO_TAGS += builtinassets +dist/grafana-agent-windows-boringcrypto-amd64.exe: GOOS := windows +dist/grafana-agent-windows-boringcrypto-amd64.exe: GOARCH := amd64 +dist/grafana-agent-windows-boringcrypto-amd64.exe: generate-ui + $(PACKAGING_VARS) AGENT_BINARY=$@ "$(MAKE)" -f $(PARENT_MAKEFILE) agent + + dist/grafana-agent-freebsd-amd64: GO_TAGS += netgo builtinassets dist/grafana-agent-freebsd-amd64: GOOS := freebsd dist/grafana-agent-freebsd-amd64: GOARCH := amd64 From c6fbc9236ca6051d612a627b8099a02482beefcc Mon Sep 17 00:00:00 2001 From: mattdurham Date: Wed, 28 Feb 2024 16:23:19 -0500 Subject: [PATCH 3/9] Fix reg delete (#6550) * fix issue with 64 bit registry * fix issue with 64 bit registry --- CHANGELOG.md | 2 ++ packaging/grafana-agent-flow/windows/install_script.nsis | 6 ++++-- packaging/grafana-agent/windows/install_script.nsis | 5 +++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e621e601b8..183490b615 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -129,6 +129,8 @@ v0.40.0 (2024-02-27) - Fix an issue where changing the configuration of `loki.write` would cause a panic. (@rfratto) +- Fix issue where registry was not being properly deleted. (@mattdurham) + ### Other changes - Removed support for Windows 2012 in line with Microsoft end of life. (@mattdurham) diff --git a/packaging/grafana-agent-flow/windows/install_script.nsis b/packaging/grafana-agent-flow/windows/install_script.nsis index 469a2cbd97..5e253890c2 100644 --- a/packaging/grafana-agent-flow/windows/install_script.nsis +++ b/packaging/grafana-agent-flow/windows/install_script.nsis @@ -193,6 +193,8 @@ Section "uninstall" RMDir /r "$APPDATA\${APPNAME}" # Application data. # Remove service and uninstaller information from the registry. - DeleteRegKey HKLM "Software\Grafana\Grafana Agent Flow" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" + nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Grafana\Grafana Agent Flow" /reg:64 /f' + Pop $0 + nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" /reg:64 /f' + Pop $0 SectionEnd diff --git a/packaging/grafana-agent/windows/install_script.nsis b/packaging/grafana-agent/windows/install_script.nsis index b08a8216c6..a39ec0d4dc 100644 --- a/packaging/grafana-agent/windows/install_script.nsis +++ b/packaging/grafana-agent/windows/install_script.nsis @@ -229,6 +229,7 @@ Section "uninstall" RMDir /r $APPDATA\grafana-agent-wal - # Remove uninstaller information from the registry - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" + # Remove service and uninstaller information from the registry. + nsExec::ExecToLog 'Reg.exe delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" /reg:64 /f' + Pop $0 SectionEnd From af59ddbf019a5482f76b85a03ecc94d0115b5344 Mon Sep 17 00:00:00 2001 From: Paschalis Tsilias Date: Thu, 29 Feb 2024 10:47:38 +0200 Subject: [PATCH 4/9] otelcolconvert: support converting span processor (#6504) Signed-off-by: Paschalis Tsilias --- component/otelcol/config_filter.go | 35 ++++ .../otelcolconvert/converter_helpers.go | 24 +++ .../otelcolconvert/converter_spanprocessor.go | 160 ++++++++++++++++++ .../otelcolconvert/testdata/span.river | 23 +++ .../otelcolconvert/testdata/span.yaml | 33 ++++ .../otelcolconvert/testdata/span_full.river | 72 ++++++++ .../otelcolconvert/testdata/span_full.yaml | 67 ++++++++ 7 files changed, 414 insertions(+) create mode 100644 converter/internal/otelcolconvert/converter_spanprocessor.go create mode 100644 converter/internal/otelcolconvert/testdata/span.river create mode 100644 converter/internal/otelcolconvert/testdata/span.yaml create mode 100644 converter/internal/otelcolconvert/testdata/span_full.river create mode 100644 converter/internal/otelcolconvert/testdata/span_full.yaml diff --git a/component/otelcol/config_filter.go b/component/otelcol/config_filter.go index d3199b9ebd..826f876971 100644 --- a/component/otelcol/config_filter.go +++ b/component/otelcol/config_filter.go @@ -269,6 +269,33 @@ var severityLevels = map[SeverityLevel]plog.SeverityNumber{ "FATAL4": 24, } +var severityNumbers = map[plog.SeverityNumber]SeverityLevel{ + 1: "TRACE", + 2: "TRACE2", + 3: "TRACE3", + 4: "TRACE4", + 5: "DEBUG", + 6: "DEBUG2", + 7: "DEBUG3", + 8: "DEBUG4", + 9: "INFO", + 10: "INFO2", + 11: "INFO3", + 12: "INFO4", + 13: "WARN", + 14: "WARN2", + 15: "WARN3", + 16: "WARN4", + 17: "ERROR", + 18: "ERROR2", + 19: "ERROR3", + 20: "ERROR4", + 21: "FATAL", + 22: "FATAL2", + 23: "FATAL3", + 24: "FATAL4", +} + // UnmarshalText implements encoding.TextUnmarshaler for SeverityLevel. func (sl *SeverityLevel) UnmarshalText(text []byte) error { agentSevLevelStr := SeverityLevel(text) @@ -278,3 +305,11 @@ func (sl *SeverityLevel) UnmarshalText(text []byte) error { } return fmt.Errorf("unrecognized severity level %q", string(text)) } + +func LookupSeverityNumber(num plog.SeverityNumber) (SeverityLevel, error) { + if lvl, exists := severityNumbers[num]; exists { + return lvl, nil + } + + return "", fmt.Errorf("unrecognized severity number %q", num) +} diff --git a/converter/internal/otelcolconvert/converter_helpers.go b/converter/internal/otelcolconvert/converter_helpers.go index 99cb630643..ff4179333a 100644 --- a/converter/internal/otelcolconvert/converter_helpers.go +++ b/converter/internal/otelcolconvert/converter_helpers.go @@ -60,3 +60,27 @@ func encodeMapstruct(v any) map[string]any { } return res } + +// encodeMapslice uses mapstruct fields to convert the given argument into a +// []map[string]any. This is useful for being able to convert configuration +// sections for OpenTelemetry components where the configuration type is hidden +// in an internal package. +func encodeMapslice(v any) []map[string]any { + var res []map[string]any + if err := mapstructure.Decode(v, &res); err != nil { + panic(err) + } + return res +} + +// encodeString uses mapstruct fields to convert the given argument into a +// string. This is useful for being able to convert configuration +// sections for OpenTelemetry components where the configuration type is hidden +// in an internal package. +func encodeString(v any) string { + var res string + if err := mapstructure.Decode(v, &res); err != nil { + panic(err) + } + return res +} diff --git a/converter/internal/otelcolconvert/converter_spanprocessor.go b/converter/internal/otelcolconvert/converter_spanprocessor.go new file mode 100644 index 0000000000..bee3039085 --- /dev/null +++ b/converter/internal/otelcolconvert/converter_spanprocessor.go @@ -0,0 +1,160 @@ +package otelcolconvert + +import ( + "fmt" + + "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/component/otelcol/processor/span" + "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/converter/internal/common" + "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/pdata/plog" +) + +func init() { + converters = append(converters, spanProcessorConverter{}) +} + +type spanProcessorConverter struct{} + +func (spanProcessorConverter) Factory() component.Factory { return spanprocessor.NewFactory() } + +func (spanProcessorConverter) InputComponentName() string { return "otelcol.processor.span" } + +func (spanProcessorConverter) ConvertAndAppend(state *state, id component.InstanceID, cfg component.Config) diag.Diagnostics { + var diags diag.Diagnostics + + label := state.FlowComponentLabel() + + args := toSpanProcessor(state, id, cfg.(*spanprocessor.Config)) + block := common.NewBlockWithOverride([]string{"otelcol", "processor", "span"}, label, args) + + diags.Add( + diag.SeverityLevelInfo, + fmt.Sprintf("Converted %s into %s", stringifyInstanceID(id), stringifyBlock(block)), + ) + + state.Body().AppendBlock(block) + return diags +} + +func toSpanProcessor(state *state, id component.InstanceID, cfg *spanprocessor.Config) *span.Arguments { + var ( + nextTraces = state.Next(id, component.DataTypeTraces) + ) + + var setStatus *span.Status + if cfg.SetStatus != nil { + setStatus = &span.Status{ + Code: cfg.SetStatus.Code, + Description: cfg.SetStatus.Description, + } + } + + var toAttributes *span.ToAttributes + if cfg.Rename.ToAttributes != nil { + toAttributes = &span.ToAttributes{ + Rules: cfg.Rename.ToAttributes.Rules, + BreakAfterMatch: cfg.Rename.ToAttributes.BreakAfterMatch, + } + } + + return &span.Arguments{ + Match: otelcol.MatchConfig{ + Include: toMatchProperties(encodeMapstruct(cfg.Include)), + Exclude: toMatchProperties(encodeMapstruct(cfg.Exclude)), + }, + Name: span.Name{ + FromAttributes: cfg.Rename.FromAttributes, + Separator: cfg.Rename.Separator, + ToAttributes: toAttributes, + }, + SetStatus: setStatus, + Output: &otelcol.ConsumerArguments{ + Traces: toTokenizedConsumers(nextTraces), + }, + } +} + +func toMatchProperties(cfg map[string]any) *otelcol.MatchProperties { + if cfg == nil { + return nil + } + + return &otelcol.MatchProperties{ + MatchType: encodeString(cfg["match_type"]), + RegexpConfig: toRegexpConfig(cfg), + LogSeverity: toLogSeverity(cfg), + Services: cfg["services"].([]string), + SpanNames: cfg["span_names"].([]string), + LogBodies: cfg["log_bodies"].([]string), + LogSeverityTexts: cfg["log_severity_texts"].([]string), + MetricNames: cfg["metric_names"].([]string), + SpanKinds: cfg["span_kinds"].([]string), + Attributes: toOtelcolAttributes(encodeMapslice(cfg["attributes"])), + Resources: toOtelcolAttributes(encodeMapslice(cfg["resources"])), + Libraries: toOtelcolInstrumentationLibrary(encodeMapslice(cfg["libraries"])), + } +} + +func toOtelcolAttributes(in []map[string]any) []otelcol.Attribute { + res := make([]otelcol.Attribute, 0, len(in)) + + for _, a := range in { + res = append(res, otelcol.Attribute{ + Key: a["key"].(string), + Value: a["value"], + }) + } + + return res +} + +func toOtelcolInstrumentationLibrary(in []map[string]any) []otelcol.InstrumentationLibrary { + res := make([]otelcol.InstrumentationLibrary, 0, len(in)) + + for _, l := range in { + res = append(res, otelcol.InstrumentationLibrary{ + Name: l["name"].(string), + Version: l["version"].(*string), + }) + } + return res +} + +func toRegexpConfig(cfg map[string]any) *otelcol.RegexpConfig { + if cfg["regexp_config"] == nil { + return nil + } + + rc := cfg["regexp_config"].(map[string]any) + + return &otelcol.RegexpConfig{ + CacheEnabled: rc["cache_enabled"].(bool), + CacheMaxNumEntries: rc["cache_max_num_entries"].(int), + } +} +func toLogSeverity(cfg map[string]any) *otelcol.LogSeverityNumberMatchProperties { + if cfg["log_severity_number"] == nil { + return nil + } + + // Theres's a nested type, so we have to re-encode the field. + ls := encodeMapstruct(cfg["log_severity_number"]) + if ls == nil { + return nil + } + + // This should never error out, but there's no 'unknown' severity level to + // return in case it did. + sn, err := otelcol.LookupSeverityNumber(ls["min"].(plog.SeverityNumber)) + if err != nil { + panic(err) + } + + return &otelcol.LogSeverityNumberMatchProperties{ + Min: sn, + MatchUndefined: ls["match_undefined"].(bool), + } +} diff --git a/converter/internal/otelcolconvert/testdata/span.river b/converter/internal/otelcolconvert/testdata/span.river new file mode 100644 index 0000000000..7ce267fbe6 --- /dev/null +++ b/converter/internal/otelcolconvert/testdata/span.river @@ -0,0 +1,23 @@ +otelcol.receiver.otlp "default" { + grpc { } + + http { } + + output { + metrics = [otelcol.exporter.otlp.default.input] + logs = [otelcol.exporter.otlp.default.input] + traces = [otelcol.processor.span.default.input] + } +} + +otelcol.processor.span "default" { + output { + traces = [otelcol.exporter.otlp.default.input] + } +} + +otelcol.exporter.otlp "default" { + client { + endpoint = "database:4317" + } +} diff --git a/converter/internal/otelcolconvert/testdata/span.yaml b/converter/internal/otelcolconvert/testdata/span.yaml new file mode 100644 index 0000000000..3d61052153 --- /dev/null +++ b/converter/internal/otelcolconvert/testdata/span.yaml @@ -0,0 +1,33 @@ +receivers: + otlp: + protocols: + grpc: + http: + +exporters: + otlp: + # Our defaults have drifted from upstream, so we explicitly set our + # defaults below (balancer_name and queue_size). + endpoint: database:4317 + balancer_name: pick_first + sending_queue: + queue_size: 5000 + +processors: + span: + +service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [otlp] + logs: + receivers: [otlp] + processors: [] + exporters: [otlp] + traces: + receivers: [otlp] + processors: [span] + exporters: [otlp] + diff --git a/converter/internal/otelcolconvert/testdata/span_full.river b/converter/internal/otelcolconvert/testdata/span_full.river new file mode 100644 index 0000000000..a7f8600a7c --- /dev/null +++ b/converter/internal/otelcolconvert/testdata/span_full.river @@ -0,0 +1,72 @@ +otelcol.receiver.otlp "default" { + grpc { } + + http { } + + output { + metrics = [otelcol.exporter.otlp.default.input] + logs = [otelcol.exporter.otlp.default.input] + traces = [otelcol.processor.span.default.input] + } +} + +otelcol.processor.span "default" { + include { + match_type = "strict" + span_names = ["span1", "span2"] + log_bodies = ["lb1", "lb2"] + log_severity_texts = ["ls1", "ls2"] + + attribute { + key = "key1" + value = "value1" + } + span_kinds = ["spankind1", "spankind2"] + } + + exclude { + match_type = "regex" + services = ["svc1", "svc2"] + + log_severity { + min = "TRACE2" + match_undefined = false + } + metric_names = ["mn1", "mn2"] + + resource { + key = "key1" + value = "value1" + } + + library { + name = "name1" + version = "version1" + } + } + + name { + from_attributes = ["db.svc", "operation"] + separator = "::" + + to_attributes { + rules = ["^\\/api\\/v1\\/document\\/(?P.*)\\/update$"] + break_after_match = true + } + } + + status { + code = "Error" + description = "some error description" + } + + output { + traces = [otelcol.exporter.otlp.default.input] + } +} + +otelcol.exporter.otlp "default" { + client { + endpoint = "database:4317" + } +} diff --git a/converter/internal/otelcolconvert/testdata/span_full.yaml b/converter/internal/otelcolconvert/testdata/span_full.yaml new file mode 100644 index 0000000000..e7a5173727 --- /dev/null +++ b/converter/internal/otelcolconvert/testdata/span_full.yaml @@ -0,0 +1,67 @@ +receivers: + otlp: + protocols: + grpc: + http: + +exporters: + otlp: + # Our defaults have drifted from upstream, so we explicitly set our + # defaults below (balancer_name and queue_size). + endpoint: database:4317 + balancer_name: pick_first + sending_queue: + queue_size: 5000 + +processors: + # Since this processor has deeply nested attributes, we're adding a more + # fleshed out testdata case to make sure we're hitting all the possible + # conversion code paths. + span: + name: + from_attributes: ["db.svc", "operation"] + separator: "::" + to_attributes: + break_after_match: true + rules: + - ^\/api\/v1\/document\/(?P.*)\/update$ + status: + code: Error + description: "some error description" + include: + match_type: "strict" + attributes: + - key: "key1" + value: "value1" + span_names: ["span1", "span2"] + span_kinds: ["spankind1", "spankind2"] + log_bodies: ["lb1", "lb2"] + log_severity_texts: ["ls1", "ls2"] + exclude: + match_type: "regex" + services: ["svc1", "svc2"] + resources: + - key: "key1" + value: "value1" + libraries: + - name: "name1" + version: "version1" + log_severity_number: + min: 2 + match_undefined: false + metric_names: ["mn1", "mn2"] + +service: + pipelines: + metrics: + receivers: [otlp] + processors: [] + exporters: [otlp] + logs: + receivers: [otlp] + processors: [] + exporters: [otlp] + traces: + receivers: [otlp] + processors: [span] + exporters: [otlp] From de6a6938997689a5a9bb673c55f05ceb7a037507 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 29 Feb 2024 11:45:24 +0000 Subject: [PATCH 5/9] Update `make docs` procedure (#6553) Co-authored-by: grafanabot --- docs/make-docs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/make-docs b/docs/make-docs index 756e33b62f..43efdb5faa 100755 --- a/docs/make-docs +++ b/docs/make-docs @@ -6,6 +6,12 @@ # [Semantic versioning](https://semver.org/) is used to help the reader identify the significance of changes. # Changes are relevant to this script and the support docs.mk GNU Make interface. # +# ## 6.0.1 (2024-02-28) +# +# ### Added +# +# - Suppress new errors relating to absent content introduced in https://github.com/grafana/website/pull/17561. +# # ## 6.0.0 (2024-02-16) # # ### Changed @@ -822,7 +828,8 @@ EOF -e '/rm -rf dist*/ d' \ -e '/Press Ctrl+C to stop/ d' \ -e '/make/ d' \ - -e '/WARNING: The manual_mount source directory/ d' + -e '/WARNING: The manual_mount source directory/ d' \ + -e '/docs\/_index.md .* not found/ d' fi ;; esac From b691a44b47b3d443cf9fa462190069ed5ff5b98f Mon Sep 17 00:00:00 2001 From: William Dumont Date: Thu, 29 Feb 2024 15:02:48 +0100 Subject: [PATCH 6/9] ignore errors when the logging node empties the log buffer (#6558) --- CHANGELOG.md | 4 ++++ pkg/flow/logging/logger.go | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 183490b615..b9988a7fe3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,10 @@ Main (unreleased) - A new `loki.rules.kubernetes` component that discovers `PrometheusRule` Kubernetes resources and loads them into a Loki Ruler instance. (@EStork09) +### Bugfixes + +- Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum) + v0.40.0 (2024-02-27) -------------------- diff --git a/pkg/flow/logging/logger.go b/pkg/flow/logging/logger.go index da0046a281..5689d00fe0 100644 --- a/pkg/flow/logging/logger.go +++ b/pkg/flow/logging/logger.go @@ -126,9 +126,9 @@ func (l *Logger) Update(o Options) error { // Print out the buffered logs since we determined the log format already for _, bufferedLogChunk := range l.buffer { - if err := slogadapter.GoKit(l.handler).Log(bufferedLogChunk...); err != nil { - return err - } + // the buffered logs are currently only sent to the standard output + // because the components with the receivers are not running yet + slogadapter.GoKit(l.handler).Log(bufferedLogChunk...) } l.buffer = nil From 0dde507f404ca2236789f8fe35ecb5f916ab50e4 Mon Sep 17 00:00:00 2001 From: William Dumont Date: Thu, 29 Feb 2024 16:26:50 +0100 Subject: [PATCH 7/9] Fix wiring of custom component nodes (#6563) * fix wiring of custom component nodes by checking import before local declares * update changelog * add comment in loader to explain why the imports should be checked before the local declare --- CHANGELOG.md | 2 ++ pkg/flow/internal/controller/loader.go | 10 +++--- .../testdata/import_file/import_file_16.txtar | 36 +++++++++++++++++++ 3 files changed, 44 insertions(+), 4 deletions(-) create mode 100644 pkg/flow/testdata/import_file/import_file_16.txtar diff --git a/CHANGELOG.md b/CHANGELOG.md index b9988a7fe3..5b047b7701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,8 @@ Main (unreleased) - Fix an issues where the logging config block would trigger an error when trying to send logs to components that were not running. (@wildum) +- Fix an issue where a custom component might be wired to a local declare instead of an import declare when they have the same label. (@wildum) + v0.40.0 (2024-02-27) -------------------- diff --git a/pkg/flow/internal/controller/loader.go b/pkg/flow/internal/controller/loader.go index 9164ada066..64513d3007 100644 --- a/pkg/flow/internal/controller/loader.go +++ b/pkg/flow/internal/controller/loader.go @@ -589,15 +589,17 @@ func (l *Loader) wireGraphEdges(g *dag.Graph) diag.Diagnostics { // wireCustomComponentNode wires a custom component to the import/declare nodes that it depends on. func (l *Loader) wireCustomComponentNode(g *dag.Graph, cc *CustomComponentNode) { - if declare, ok := l.declareNodes[cc.customComponentName]; ok { + // It's important to check first if the importNamespace matches an import node because there might be a + // local node that has the same label as an imported declare. + if importNode, ok := l.importConfigNodes[cc.importNamespace]; ok { + // add an edge between the custom component and the corresponding import node. + g.AddEdge(dag.Edge{From: cc, To: importNode}) + } else if declare, ok := l.declareNodes[cc.customComponentName]; ok { refs := l.findCustomComponentReferences(declare.Block()) for ref := range refs { // add edges between the custom component and declare/import nodes. g.AddEdge(dag.Edge{From: cc, To: ref}) } - } else if importNode, ok := l.importConfigNodes[cc.importNamespace]; ok { - // add an edge between the custom component and the corresponding import node. - g.AddEdge(dag.Edge{From: cc, To: importNode}) } } diff --git a/pkg/flow/testdata/import_file/import_file_16.txtar b/pkg/flow/testdata/import_file/import_file_16.txtar new file mode 100644 index 0000000000..804c7c6d75 --- /dev/null +++ b/pkg/flow/testdata/import_file/import_file_16.txtar @@ -0,0 +1,36 @@ +Imported declare and local declare have the same label. + +-- main.river -- +testcomponents.count "inc" { + frequency = "10ms" + max = 10 +} + +import.file "certmanager" { + filename = "module.river" +} + +certmanager.config "this" { + input = testcomponents.count.inc.count +} + +declare "config" { +} + +testcomponents.summation "sum" { + input = certmanager.config.this.output +} + +-- module.river -- +declare "config" { + argument "input" {} + + testcomponents.passthrough "pt" { + input = argument.input.value + lag = "1ms" + } + + export "output" { + value = testcomponents.passthrough.pt.output + } +} \ No newline at end of file From bcc9b0a79730598a7e30460b581d335b01d476fb Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Thu, 29 Feb 2024 10:41:42 -0500 Subject: [PATCH 8/9] flow/logging: check for nil values when writing logs (#6561) There may be situations where the flow mode logger receivers a nil value, potentially due to misconfiguration or a component which exports its values only after being ran. Fixes #6557. --- CHANGELOG.md | 2 ++ pkg/flow/logging/logger.go | 9 +++++++++ pkg/flow/logging/logger_test.go | 20 ++++++++++++++++++++ 3 files changed, 31 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b047b7701..6c268fc70b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,8 @@ Main (unreleased) - Fix an issue where a custom component might be wired to a local declare instead of an import declare when they have the same label. (@wildum) +- Fix an issue where flow mode panics if the `logging` config block is given a `null` Loki receiver to write log entries to. (@rfratto) + v0.40.0 (2024-02-27) -------------------- diff --git a/pkg/flow/logging/logger.go b/pkg/flow/logging/logger.go index 5689d00fe0..1856c54654 100644 --- a/pkg/flow/logging/logger.go +++ b/pkg/flow/logging/logger.go @@ -164,6 +164,15 @@ type lokiWriter struct { func (fw *lokiWriter) Write(p []byte) (int, error) { for _, receiver := range fw.f { + // We may have been given a nil value in rare circumstances due to + // misconfiguration or a component which generates exports after + // construction. + // + // Ignore nil values so we don't panic. + if receiver == nil { + continue + } + select { case receiver.Chan() <- loki.Entry{ Labels: model.LabelSet{"component": "agent"}, diff --git a/pkg/flow/logging/logger_test.go b/pkg/flow/logging/logger_test.go index d199f14887..cf3f7a66c1 100644 --- a/pkg/flow/logging/logger_test.go +++ b/pkg/flow/logging/logger_test.go @@ -11,6 +11,7 @@ import ( "github.com/go-kit/log" gokitlevel "github.com/go-kit/log/level" + "github.com/grafana/agent/component/common/loki" "github.com/grafana/agent/pkg/flow/logging" flowlevel "github.com/grafana/agent/pkg/flow/logging/level" "github.com/stretchr/testify/require" @@ -165,6 +166,25 @@ func TestLevels(t *testing.T) { } } +// Test_lokiWriter_nil ensures that writing to a lokiWriter doesn't panic when +// given a nil receiver. +func Test_lokiWriter_nil(t *testing.T) { + logger, err := logging.New(io.Discard, debugLevel()) + require.NoError(t, err) + + err = logger.Update(logging.Options{ + Level: logging.LevelDebug, + Format: logging.FormatLogfmt, + + WriteTo: []loki.LogsReceiver{nil}, + }) + require.NoError(t, err) + + require.NotPanics(t, func() { + _ = logger.Log("msg", "test message") + }) +} + func BenchmarkLogging_NoLevel_Prints(b *testing.B) { logger, err := logging.New(io.Discard, infoLevel()) require.NoError(b, err) From 0e36aa27c95b7d600be1722ba80d56e8227d048b Mon Sep 17 00:00:00 2001 From: Robert Fratto Date: Thu, 29 Feb 2024 11:56:27 -0500 Subject: [PATCH 9/9] misc: move all importable code to internal/ (#6552) Our backwards compatibility guarantees[1] cover importable Go code. This applies once we cut the 1.0 release, which we are rapidly approaching. The Grafana Agent maintainers have agreed that it is more important for 1.0 to focus on stability of the configuration file and usage of the Grafana Agent binaries rather than on the stability of importable code. This PR moves all importable Go code to `internal/` so that it is no longer externally importable. This gives us time to finalize Go APIs without blocking the 1.0 release or removing our commitment to having Go APIs follow semantic versioning. Some time after the 1.0 release, we will have public Go APIs available for consumption. There are some slightly odd artifacts in this PR for the purposes of making sure we have no public Go API surface: * Non-binary tools have been moved to `internal/tools`: * Code for generating documentation has been moved to `internal/tools/docs_generator`. * Code for integration testing system packages has been moved to `internal/tools/packaging_test`. * Binaries (i.e., `package main`) not a part of our release assets have similarly moved to `internal/cmd`: * Code for integration testing Flow components has been moved to `internal/cmd/integration-tests` * Code for linting the codebase has been moved to `internal/cmd/agentlint` * Code for evaluating River files has been moved to `internal/cmd/rivereval` * All flow mode UI code has been moved from `web` to `internal/web`. I don't know if all of these changes are necessary, or if they have been moved to a sensible location. However, for the scope of this PR, I would like to keep the folders in their new location, and follow-up PRs and discussions can be used to reorganize `internal/` as needed. [1]: https://github.com/grafana/agent/blob/main/docs/rfcs/0008-backwards-compatibility.md --- Makefile | 18 +-- cmd/grafana-agent-flow/main.go | 6 +- cmd/grafana-agent-operator/main.go | 8 +- cmd/grafana-agent-service/service_test.go | 4 +- cmd/grafana-agent/entrypoint.go | 16 +- cmd/grafana-agent/main.go | 14 +- cmd/grafana-agent/service_windows.go | 6 +- cmd/grafana-agentctl/main.go | 14 +- component/all/all.go | 142 ------------------ .../prometheusconvert_test.go | 13 -- .../promtailconvert/promtailconvert_test.go | 13 -- docs/Makefile | 6 +- docs/sources/operator/api.md | 4 +- docs/sources/static/api/_index.md | 2 +- .../integrations-next/snmp-config.md | 6 +- .../configuration/integrations/snmp-config.md | 2 +- internal/agentseed/agentseed.go | 2 +- {pkg => internal}/boringcrypto/disabled.go | 0 {pkg => internal}/boringcrypto/enabled.go | 0 {pkg => internal}/build/build.go | 0 {tools => internal/cmd}/agentlint/go.mod | 2 +- {tools => internal/cmd}/agentlint/go.sum | 0 .../internal/findcomponents/findcomponents.go | 6 +- .../agentlint/internal/rivertags/rivertags.go | 0 {tools => internal/cmd}/agentlint/main.go | 4 +- .../cmd/integration-tests}/README.md | 0 .../cmd/integration-tests}/common/common.go | 0 .../cmd/integration-tests}/common/log.go | 0 .../cmd/integration-tests}/common/metric.go | 0 .../common/metrics_assert.go | 0 .../configs/mimir/mimir.yaml | 0 .../configs/otel-metrics-gen}/Dockerfile | 2 +- .../configs/otel-metrics-gen/main.go | 0 .../configs/prom-gen}/Dockerfile | 2 +- .../configs/prom-gen/main.go | 0 .../integration-tests}/docker-compose.yaml | 12 +- .../cmd/integration-tests}/main.go | 0 .../tests/otlp-metrics/config.river | 0 .../tests/otlp-metrics/otlp_metrics_test.go | 2 +- .../otlp-metrics/otlp_to_prom_metrics_test.go | 2 +- .../tests/read-log-file/config.river | 0 .../tests/read-log-file/logs.txt | 0 .../tests/read-log-file/read_log_file_test.go | 2 +- .../tests/redis/config.river | 0 .../tests/redis/redis_metrics_test.go | 2 +- .../tests/scrape-prom-metrics/config.river | 0 .../scrape_prom_metrics_test.go | 2 +- .../tests/unix/config.river | 0 .../tests/unix/unix_metrics_test.go | 2 +- .../cmd/integration-tests}/utils.go | 4 +- .../cmd}/rivereval/example.river | 0 {tools => internal/cmd}/rivereval/main.go | 0 internal/component/all/all.go | 142 ++++++++++++++++++ .../component}/common/config/selectors.go | 0 .../component}/common/config/types.go | 0 .../component}/common/config/types_test.go | 0 .../common/kubernetes/kubernetes.go | 4 +- .../common/kubernetes/kubernetes_test.go | 0 .../component}/common/loki/client/batch.go | 2 +- .../common/loki/client/batch_test.go | 2 +- .../component}/common/loki/client/client.go | 6 +- .../common/loki/client/client_test.go | 2 +- .../component}/common/loki/client/config.go | 0 .../common/loki/client/config_test.go | 0 .../common/loki/client/fake/client.go | 2 +- .../loki/client/internal/marker_encoding.go | 0 .../client/internal/marker_encoding_test.go | 0 .../client/internal/marker_file_handler.go | 2 +- .../internal/marker_file_handler_test.go | 0 .../loki/client/internal/marker_handler.go | 4 +- .../client/internal/marker_handler_test.go | 0 .../common/loki/client/internal/metrics.go | 2 +- .../component}/common/loki/client/logger.go | 6 +- .../common/loki/client/logger_test.go | 2 +- .../component}/common/loki/client/manager.go | 10 +- .../common/loki/client/manager_test.go | 8 +- .../component}/common/loki/client/metrics.go | 2 +- .../common/loki/client/queue_client.go | 2 +- .../common/loki/client/queue_client_test.go | 6 +- .../component}/common/loki/limit/config.go | 0 .../common/loki/positions/positions.go | 2 +- .../common/loki/positions/positions_test.go | 0 .../loki/positions/write_positions_unix.go | 0 .../loki/positions/write_positions_windows.go | 0 .../component}/common/loki/types.go | 0 .../component}/common/loki/utils/convert.go | 0 .../common/loki/utils/remotewrite_server.go | 0 .../component}/common/loki/utils/sync.go | 0 .../component}/common/loki/wal/config.go | 0 .../common/loki/wal/internal/watcher_state.go | 2 +- .../component}/common/loki/wal/reader.go | 2 +- .../component}/common/loki/wal/timer.go | 0 .../component}/common/loki/wal/timer_test.go | 0 .../component}/common/loki/wal/wal.go | 2 +- .../component}/common/loki/wal/watcher.go | 4 +- .../common/loki/wal/watcher_metrics.go | 2 +- .../common/loki/wal/watcher_test.go | 6 +- .../component}/common/loki/wal/writer.go | 4 +- .../component}/common/loki/wal/writer_test.go | 4 +- .../component}/common/net/config.go | 0 .../component}/common/net/config_test.go | 0 .../component}/common/net/server.go | 2 +- .../component}/common/net/server_test.go | 2 +- .../component}/common/relabel/relabel.go | 0 .../component}/common/relabel/relabel_test.go | 0 .../component}/component.go | 0 .../component}/component_health.go | 0 .../component}/component_health_test.go | 2 +- .../component}/component_provider.go | 0 .../component}/discovery/aws/ec2.go | 6 +- .../component}/discovery/aws/ec2_test.go | 2 +- .../component}/discovery/aws/lightsail.go | 6 +- .../component}/discovery/azure/azure.go | 6 +- .../component}/discovery/azure/azure_test.go | 2 +- .../component}/discovery/consul/consul.go | 6 +- .../discovery/consul/consul_test.go | 0 .../discovery/consulagent/consulagent.go | 6 +- .../discovery/consulagent/consulagent_test.go | 0 .../consulagent/promtail_consulagent.go | 2 +- .../consulagent/promtail_consulagent_test.go | 0 .../discovery/digitalocean/digitalocean.go | 6 +- .../digitalocean/digitalocean_test.go | 2 +- .../component}/discovery/discovery.go | 4 +- .../component}/discovery/dns/dns.go | 4 +- .../component}/discovery/dns/dns_test.go | 0 .../component}/discovery/docker/docker.go | 6 +- .../discovery/docker/docker_test.go | 0 .../discovery/dockerswarm/dockerswarm.go | 6 +- .../discovery/dockerswarm/dockerswarm_test.go | 2 +- .../component}/discovery/eureka/eureka.go | 6 +- .../discovery/eureka/eureka_test.go | 2 +- .../component}/discovery/file/file.go | 4 +- .../component}/discovery/file/file_test.go | 0 .../component}/discovery/gce/gce.go | 4 +- .../component}/discovery/gce/gce_test.go | 0 .../component}/discovery/hetzner/hetzner.go | 6 +- .../discovery/hetzner/hetzner_test.go | 0 .../component}/discovery/http/http.go | 6 +- .../component}/discovery/http/http_test.go | 6 +- .../component}/discovery/ionos/ionos.go | 6 +- .../component}/discovery/ionos/ionos_test.go | 2 +- .../component}/discovery/kubelet/kubelet.go | 6 +- .../discovery/kubelet/kubelet_test.go | 2 +- .../discovery/kubernetes/kubernetes.go | 6 +- .../discovery/kubernetes/kubernetes_test.go | 0 .../component}/discovery/kuma/kuma.go | 6 +- .../component}/discovery/kuma/kuma_test.go | 2 +- .../component}/discovery/linode/linode.go | 6 +- .../discovery/linode/linode_test.go | 2 +- .../component}/discovery/marathon/marathon.go | 6 +- .../discovery/marathon/marathon_test.go | 2 +- .../component}/discovery/nerve/nerve.go | 4 +- .../component}/discovery/nerve/nerve_test.go | 0 .../component}/discovery/nomad/nomad.go | 6 +- .../component}/discovery/nomad/nomad_test.go | 0 .../discovery/openstack/openstack.go | 6 +- .../discovery/openstack/openstack_test.go | 2 +- .../component}/discovery/ovhcloud/ovhcloud.go | 4 +- .../discovery/ovhcloud/ovhcloud_test.go | 2 +- .../component}/discovery/process/args.go | 2 +- .../component}/discovery/process/container.go | 2 +- .../discovery/process/container_test.go | 0 .../component}/discovery/process/discover.go | 2 +- .../component}/discovery/process/join.go | 2 +- .../component}/discovery/process/join_test.go | 2 +- .../component}/discovery/process/process.go | 4 +- .../discovery/process/process_stub.go | 6 +- .../component}/discovery/puppetdb/puppetdb.go | 6 +- .../discovery/puppetdb/puppetdb_test.go | 0 .../component}/discovery/relabel/relabel.go | 6 +- .../discovery/relabel/relabel_test.go | 8 +- .../component}/discovery/scaleway/scaleway.go | 6 +- .../discovery/scaleway/scaleway_test.go | 0 .../discovery/serverset/serverset.go | 4 +- .../discovery/serverset/serverset_test.go | 0 .../component}/discovery/triton/triton.go | 6 +- .../discovery/triton/triton_test.go | 0 .../component}/discovery/uyuni/uyuni.go | 6 +- .../component}/discovery/uyuni/uyuni_test.go | 2 +- .../component}/faro/receiver/arguments.go | 4 +- .../component}/faro/receiver/exporters.go | 8 +- .../faro/receiver/exporters_test.go | 2 +- .../component}/faro/receiver/handler.go | 4 +- .../component}/faro/receiver/handler_test.go | 4 +- .../faro/receiver/internal/payload/payload.go | 0 .../receiver/internal/payload/payload_test.go | 0 .../faro/receiver/internal/payload/utils.go | 0 .../component}/faro/receiver/receiver.go | 4 +- .../component}/faro/receiver/receiver_test.go | 8 +- .../component}/faro/receiver/server.go | 2 +- .../component}/faro/receiver/sourcemaps.go | 6 +- .../faro/receiver/sourcemaps_test.go | 4 +- .../component}/faro/receiver/testdata/foo.js | 0 .../faro/receiver/testdata/foo.js.map | 0 .../faro/receiver/testdata/payload.json | 0 .../faro/receiver/testdata/payload_2.json | 0 .../component}/local/file/detector.go | 2 +- .../component}/local/file/file.go | 4 +- .../component}/local/file/file_test.go | 4 +- .../component}/local/file_match/file.go | 6 +- .../component}/local/file_match/file_test.go | 6 +- .../component}/local/file_match/watch.go | 4 +- .../component}/loki/echo/echo.go | 6 +- .../loki/process/metric/counters.go | 0 .../loki/process/metric/counters_test.go | 0 .../component}/loki/process/metric/gauges.go | 0 .../loki/process/metric/gauges_test.go | 0 .../loki/process/metric/histograms.go | 0 .../loki/process/metric/histograms_test.go | 0 .../loki/process/metric/metricvec.go | 0 .../component}/loki/process/process.go | 6 +- .../component}/loki/process/process_test.go | 14 +- .../loki/process/stages/decolorize.go | 0 .../loki/process/stages/decolorize_test.go | 0 .../component}/loki/process/stages/drop.go | 2 +- .../loki/process/stages/drop_test.go | 2 +- .../loki/process/stages/eventlogmessage.go | 2 +- .../process/stages/eventlogmessage_test.go | 0 .../loki/process/stages/extensions.go | 2 +- .../loki/process/stages/extensions_test.go | 0 .../component}/loki/process/stages/geoip.go | 2 +- .../loki/process/stages/geoip_test.go | 0 .../loki/process/stages/inspector.go | 0 .../component}/loki/process/stages/json.go | 2 +- .../loki/process/stages/json_test.go | 2 +- .../loki/process/stages/label_drop.go | 0 .../loki/process/stages/label_drop_test.go | 0 .../loki/process/stages/label_keep.go | 0 .../loki/process/stages/label_keep_test.go | 0 .../component}/loki/process/stages/labels.go | 2 +- .../loki/process/stages/labels_test.go | 0 .../component}/loki/process/stages/limit.go | 2 +- .../loki/process/stages/limit_test.go | 0 .../component}/loki/process/stages/logfmt.go | 2 +- .../loki/process/stages/logfmt_test.go | 2 +- .../component}/loki/process/stages/match.go | 0 .../loki/process/stages/match_test.go | 2 +- .../component}/loki/process/stages/metric.go | 4 +- .../loki/process/stages/metric_test.go | 2 +- .../loki/process/stages/multiline.go | 4 +- .../loki/process/stages/multiline_test.go | 4 +- .../component}/loki/process/stages/output.go | 2 +- .../loki/process/stages/output_test.go | 2 +- .../component}/loki/process/stages/pack.go | 2 +- .../loki/process/stages/pack_test.go | 4 +- .../loki/process/stages/pipeline.go | 2 +- .../loki/process/stages/pipeline_test.go | 6 +- .../component}/loki/process/stages/regex.go | 2 +- .../loki/process/stages/regex_test.go | 2 +- .../component}/loki/process/stages/replace.go | 2 +- .../loki/process/stages/replace_test.go | 2 +- .../loki/process/stages/sampling.go | 0 .../loki/process/stages/sampling_test.go | 0 .../component}/loki/process/stages/stage.go | 2 +- .../loki/process/stages/static_labels.go | 2 +- .../loki/process/stages/static_labels_test.go | 0 .../process/stages/structured_metadata.go | 0 .../stages/structured_metadata_test.go | 0 .../loki/process/stages/template.go | 2 +- .../loki/process/stages/template_test.go | 0 .../component}/loki/process/stages/tenant.go | 2 +- .../loki/process/stages/tenant_test.go | 0 .../stages/testdata/geoip_maxmind_asn.mmdb | Bin .../stages/testdata/geoip_maxmind_city.mmdb | Bin .../testdata/geoip_maxmind_country.mmdb | Bin .../process/stages/testdata/geoip_source.json | 0 .../loki/process/stages/timestamp.go | 2 +- .../loki/process/stages/timestamp_test.go | 2 +- .../component}/loki/process/stages/util.go | 0 .../loki/process/stages/util_test.go | 2 +- .../component}/loki/relabel/metrics.go | 0 .../component}/loki/relabel/relabel.go | 8 +- .../component}/loki/relabel/relabel_test.go | 14 +- .../component}/loki/rules/kubernetes/debug.go | 0 .../component}/loki/rules/kubernetes/diff.go | 0 .../loki/rules/kubernetes/diff_test.go | 0 .../loki/rules/kubernetes/events.go | 2 +- .../loki/rules/kubernetes/events_test.go | 2 +- .../loki/rules/kubernetes/health.go | 2 +- .../component}/loki/rules/kubernetes/rules.go | 6 +- .../loki/rules/kubernetes/rules_test.go | 0 .../component}/loki/rules/kubernetes/types.go | 2 +- .../component}/loki/source/api/api.go | 12 +- .../component}/loki/source/api/api_test.go | 14 +- .../api/internal/lokipush/push_api_server.go | 8 +- .../internal/lokipush/push_api_server_test.go | 10 +- .../loki/source/aws_firehose/component.go | 12 +- .../source/aws_firehose/component_test.go | 10 +- .../source/aws_firehose/internal/errors.go | 0 .../source/aws_firehose/internal/handler.go | 6 +- .../aws_firehose/internal/handler_test.go | 2 +- .../source/aws_firehose/internal/metrics.go | 0 .../source/aws_firehose/internal/model.go | 0 .../cw_logs_control_and_bad_records.json | 0 .../internal/testdata/cw_logs_mixed.json | 0 .../cw_logs_with_only_control_messages.json | 0 .../cw_logs_with_only_data_messages.json | 0 .../internal/testdata/direct_put.json | 0 .../direct_put_with_non_json_message.json | 0 .../azure_event_hubs/azure_event_hubs.go | 12 +- .../azure_event_hubs/azure_event_hubs_test.go | 0 .../internal/parser/parser.go | 2 +- .../internal/parser/parser_test.go | 0 .../custom_message_and_logic_app_logs.json | 0 .../parser/testdata/custom_payload_json.json | 0 ...ustom_payload_json_with_records_array.json | 0 ...stom_payload_json_with_records_string.json | 0 .../parser/testdata/custom_payload_text.txt | 0 .../testdata/function_app_logs_message.txt | 0 .../testdata/logic_app_logs_message.json | 0 .../testdata/message_with_invalid_time.json | 0 .../loki/source/cloudflare/cloudflare.go | 10 +- .../internal/cloudflaretarget/client.go | 0 .../internal/cloudflaretarget/fields.go | 0 .../internal/cloudflaretarget/fields_test.go | 0 .../internal/cloudflaretarget/metrics.go | 0 .../internal/cloudflaretarget/target.go | 6 +- .../internal/cloudflaretarget/target_test.go | 4 +- .../internal/cloudflaretarget/util_test.go | 0 .../component}/loki/source/docker/docker.go | 16 +- .../loki/source/docker/docker_test.go | 6 +- .../docker/internal/dockertarget/metrics.go | 0 .../docker/internal/dockertarget/target.go | 6 +- .../internal/dockertarget/target_test.go | 4 +- .../internal/dockertarget/testdata/flog.log | Bin .../testdata/flog_after_restart.log | Bin .../component}/loki/source/docker/runner.go | 10 +- .../loki/source/file/compression_format.go | 0 .../loki/source/file/decompresser.go | 6 +- .../loki/source/file/decompresser_test.go | 4 +- .../component}/loki/source/file/file.go | 10 +- .../component}/loki/source/file/file_test.go | 10 +- .../component}/loki/source/file/metrics.go | 0 .../component}/loki/source/file/reader.go | 0 .../component}/loki/source/file/tailer.go | 6 +- .../loki/source/file/tailer_test.go | 0 .../loki/source/file/testdata/long-access.gz | Bin .../source/file/testdata/long-access.tar.gz | Bin .../loki/source/file/testdata/onelinelog.log | 0 .../source/file/testdata/onelinelog.log.bz2 | Bin .../source/file/testdata/onelinelog.log.gz | Bin .../source/file/testdata/onelinelog.tar.gz | Bin .../source/file/testdata/short-access.log | 0 .../source/file/testdata/short-access.tar.gz | Bin .../component}/loki/source/gcplog/gcplog.go | 14 +- .../loki/source/gcplog/gcplog_test.go | 12 +- .../loki/source/gcplog/gcptypes/gcptypes.go | 2 +- .../gcplog/internal/gcplogtarget/formatter.go | 2 +- .../internal/gcplogtarget/formatter_test.go | 0 .../gcplog/internal/gcplogtarget/metrics.go | 0 .../internal/gcplogtarget/pull_target.go | 6 +- .../internal/gcplogtarget/pull_target_test.go | 4 +- .../internal/gcplogtarget/push_target.go | 8 +- .../internal/gcplogtarget/push_target_test.go | 8 +- .../internal/gcplogtarget/push_translation.go | 2 +- .../gcplogtarget/push_translation_test.go | 0 .../gcplog/internal/gcplogtarget/types.go | 0 .../component}/loki/source/gelf/gelf.go | 8 +- .../component}/loki/source/gelf/gelf_test.go | 6 +- .../source/gelf/internal/target/gelftarget.go | 4 +- .../source/gelf/internal/target/metrics.go | 0 .../component}/loki/source/heroku/heroku.go | 14 +- .../loki/source/heroku/heroku_test.go | 12 +- .../internal/herokutarget/herokutarget.go | 6 +- .../heroku/internal/herokutarget/metrics.go | 0 .../internal/herokutarget/target_test.go | 4 +- .../internal/kafkatarget/authentication.go | 0 .../source/internal/kafkatarget/config.go | 2 +- .../source/internal/kafkatarget/consumer.go | 2 +- .../internal/kafkatarget/consumer_test.go | 0 .../source/internal/kafkatarget/formatter.go | 0 .../internal/kafkatarget/kafkatarget.go | 4 +- .../internal/kafkatarget/kafkatarget_test.go | 2 +- .../internal/kafkatarget/oauth_provider.go | 0 .../source/internal/kafkatarget/parser.go | 2 +- .../internal/kafkatarget/target_syncer.go | 4 +- .../kafkatarget/target_syncer_test.go | 2 +- .../kafkatarget/testdata/example.com-key.pem | 0 .../kafkatarget/testdata/example.com.ca.pem | 0 .../kafkatarget/testdata/example.com.pem | 0 .../source/internal/kafkatarget/topics.go | 0 .../internal/kafkatarget/topics_test.go | 0 .../journal/internal/target/journaltarget.go | 6 +- .../internal/target/journaltarget_test.go | 4 +- .../source/journal/internal/target/metrics.go | 0 .../component}/loki/source/journal/journal.go | 10 +- .../loki/source/journal/journal_stub.go | 4 +- .../loki/source/journal/journal_test.go | 6 +- .../component}/loki/source/journal/types.go | 4 +- .../component}/loki/source/kafka/kafka.go | 12 +- .../loki/source/kafka/kafka_test.go | 0 .../loki/source/kubernetes/kubernetes.go | 16 +- .../loki/source/kubernetes/kubernetes_test.go | 0 .../kubernetes/kubetail/container_utils.go | 0 .../source/kubernetes/kubetail/kubetail.go | 8 +- .../source/kubernetes/kubetail/tail_utils.go | 0 .../kubernetes/kubetail/tail_utils_test.go | 0 .../loki/source/kubernetes/kubetail/tailer.go | 6 +- .../source/kubernetes/kubetail/tailer_test.go | 0 .../loki/source/kubernetes/kubetail/target.go | 0 .../kubernetes_events/event_controller.go | 8 +- .../kubernetes_events/kubernetes_events.go | 12 +- .../loki/source/podlogs/controller.go | 4 +- .../internal/apis/monitoring/v1alpha2/doc.go | 0 .../apis/monitoring/v1alpha2/group.go | 0 .../apis/monitoring/v1alpha2/types.go | 0 .../v1alpha2/zz_generated.deepcopy.go | 0 .../component}/loki/source/podlogs/podlogs.go | 18 +-- .../loki/source/podlogs/podlogs_test.go | 0 .../loki/source/podlogs/reconciler.go | 8 +- .../component}/loki/source/podlogs/relabel.go | 0 .../syslog/internal/syslogtarget/metrics.go | 0 .../internal/syslogtarget/syslogtarget.go | 4 +- .../syslogtarget/syslogtarget_test.go | 2 +- .../syslog/internal/syslogtarget/transport.go | 2 +- .../component}/loki/source/syslog/syslog.go | 10 +- .../loki/source/syslog/syslog_test.go | 8 +- .../component}/loki/source/syslog/types.go | 4 +- .../loki/source/windowsevent/arguments.go | 2 +- .../loki/source/windowsevent/bookmark.go | 0 .../source/windowsevent/component_stub.go | 4 +- .../source/windowsevent/component_test.go | 6 +- .../source/windowsevent/component_windows.go | 6 +- .../loki/source/windowsevent/format.go | 0 .../loki/source/windowsevent/target.go | 0 .../component}/loki/write/types.go | 6 +- .../component}/loki/write/write.go | 10 +- .../component}/loki/write/write_test.go | 12 +- .../component}/metadata/metadata.go | 12 +- .../component}/metadata/metadata_test.go | 0 .../mimir/rules/kubernetes/debug.go | 0 .../component}/mimir/rules/kubernetes/diff.go | 0 .../mimir/rules/kubernetes/diff_test.go | 0 .../mimir/rules/kubernetes/events.go | 2 +- .../mimir/rules/kubernetes/events_test.go | 2 +- .../mimir/rules/kubernetes/health.go | 2 +- .../mimir/rules/kubernetes/rules.go | 6 +- .../mimir/rules/kubernetes/rules_test.go | 0 .../mimir/rules/kubernetes/types.go | 2 +- .../component}/module/file/file.go | 6 +- .../component}/module/git/git.go | 6 +- .../component}/module/http/http.go | 6 +- .../component}/module/module.go | 4 +- .../component}/module/string/string.go | 4 +- .../component}/otelcol/auth/auth.go | 10 +- .../component}/otelcol/auth/auth_test.go | 10 +- .../component}/otelcol/auth/basic/basic.go | 4 +- .../otelcol/auth/basic/basic_test.go | 8 +- .../component}/otelcol/auth/bearer/bearer.go | 4 +- .../otelcol/auth/bearer/bearer_test.go | 8 +- .../otelcol/auth/headers/headers.go | 4 +- .../otelcol/auth/headers/headers_test.go | 8 +- .../component}/otelcol/auth/oauth2/oauth2.go | 6 +- .../otelcol/auth/oauth2/oauth2_test.go | 8 +- .../component}/otelcol/auth/sigv4/sigv4.go | 4 +- .../otelcol/auth/sigv4/sigv4_test.go | 8 +- .../component}/otelcol/config_attraction.go | 0 .../otelcol/config_attraction_test.go | 2 +- .../component}/otelcol/config_compression.go | 0 .../otelcol/config_debug_metrics.go | 0 .../component}/otelcol/config_filter.go | 0 .../component}/otelcol/config_filter_test.go | 2 +- .../component}/otelcol/config_grpc.go | 2 +- .../component}/otelcol/config_http.go | 2 +- .../component}/otelcol/config_k8s.go | 0 .../component}/otelcol/config_queue.go | 0 .../component}/otelcol/config_retry.go | 0 .../component}/otelcol/config_scrape.go | 0 .../component}/otelcol/config_timeout.go | 0 .../component}/otelcol/config_tls.go | 0 .../component}/otelcol/connector/connector.go | 16 +- .../otelcol/connector/host_info/config.go | 0 .../connector/host_info/config_test.go | 0 .../otelcol/connector/host_info/connector.go | 0 .../connector/host_info/connector_test.go | 0 .../otelcol/connector/host_info/factory.go | 0 .../connector/host_info/factory_test.go | 0 .../otelcol/connector/host_info/host_info.go | 6 +- .../connector/host_info/host_info_test.go | 0 .../connector/host_info/host_metrics.go | 0 .../connector/host_info/host_metrics_test.go | 0 .../connector/servicegraph/servicegraph.go | 6 +- .../servicegraph/servicegraph_test.go | 2 +- .../otelcol/connector/spanlogs/consumer.go | 0 .../otelcol/connector/spanlogs/spanlogs.go | 10 +- .../connector/spanlogs/spanlogs_test.go | 10 +- .../connector/spanmetrics/spanmetrics.go | 6 +- .../connector/spanmetrics/spanmetrics_test.go | 8 +- .../otelcol/connector/spanmetrics/types.go | 0 .../component}/otelcol/consumer.go | 0 .../component}/otelcol/exporter/exporter.go | 16 +- .../otelcol/exporter/exporter_test.go | 10 +- .../exporter/loadbalancing/loadbalancing.go | 8 +- .../loadbalancing/loadbalancing_test.go | 4 +- .../otelcol/exporter/logging/logging.go | 6 +- .../exporter/loki/internal/convert/convert.go | 4 +- .../loki/internal/convert/convert_test.go | 8 +- .../exporter/loki/internal/convert/metrics.go | 0 .../component}/otelcol/exporter/loki/loki.go | 10 +- .../component}/otelcol/exporter/otlp/otlp.go | 6 +- .../otelcol/exporter/otlp/otlp_test.go | 10 +- .../otelcol/exporter/otlphttp/otlphttp.go | 6 +- .../exporter/otlphttp/otlphttp_test.go | 10 +- .../prometheus/internal/convert/cache.go | 0 .../prometheus/internal/convert/convert.go | 2 +- .../internal/convert/convert_test.go | 6 +- .../prometheus/internal/convert/histograms.go | 0 .../otelcol/exporter/prometheus/prometheus.go | 12 +- .../exporter/prometheus/prometheus_test.go | 2 +- .../component}/otelcol/extension/extension.go | 10 +- .../otelcol/extension/extension_test.go | 10 +- .../internal/jaegerremotesampling/README.md | 0 .../internal/jaegerremotesampling/config.go | 0 .../jaegerremotesampling/config_test.go | 0 .../jaegerremotesampling/extension.go | 4 +- .../jaegerremotesampling/extension_test.go | 0 .../internal/jaegerremotesampling/factory.go | 0 .../jaegerremotesampling/factory_test.go | 0 .../jaegerremotesampling/internal/grpc.go | 0 .../internal/grpc_test.go | 0 .../jaegerremotesampling/internal/http.go | 0 .../internal/http_test.go | 0 .../internal/internal_test.go | 0 .../internal/remote_strategy_cache.go | 0 .../internal/remote_strategy_cache_test.go | 0 .../internal/remote_strategy_store.go | 0 .../jaegerremotesampling/testdata/config.yaml | 0 .../testdata/strategy.json | 0 .../internal/strategy_store/README.md | 0 .../internal/strategy_store/constants.go | 0 .../internal/strategy_store/strategy.go | 0 .../internal/strategy_store/strategy_store.go | 0 .../strategy_store/strategy_store_test.go | 0 .../jaeger_remote_sampling.go | 8 +- .../jaeger_remote_sampling_test.go | 8 +- .../otelcol/internal/fakeconsumer/fake.go | 2 +- .../otelcol/internal/fanoutconsumer/logs.go | 2 +- .../internal/fanoutconsumer/metrics.go | 2 +- .../otelcol/internal/fanoutconsumer/traces.go | 2 +- .../internal/lazycollector/lazycollector.go | 0 .../internal/lazyconsumer/lazyconsumer.go | 0 .../otelcol/internal/scheduler/host.go | 2 +- .../otelcol/internal/scheduler/scheduler.go | 4 +- .../internal/scheduler/scheduler_test.go | 6 +- .../otelcol/internal/views/views.go | 0 .../processor/attributes/attributes.go | 6 +- .../processor/attributes/attributes_test.go | 10 +- .../otelcol/processor/batch/batch.go | 6 +- .../otelcol/processor/batch/batch_test.go | 12 +- .../otelcol/processor/discovery/discovery.go | 14 +- .../processor/discovery/discovery_test.go | 10 +- .../otelcol/processor/filter/filter.go | 6 +- .../otelcol/processor/filter/filter_test.go | 2 +- .../otelcol/processor/filter/types.go | 0 .../processor/k8sattributes/k8sattributes.go | 6 +- .../k8sattributes/k8sattributes_test.go | 2 +- .../otelcol/processor/k8sattributes/types.go | 0 .../processor/memorylimiter/memorylimiter.go | 6 +- .../memorylimiter/memorylimiter_test.go | 12 +- .../probabilistic_sampler.go | 6 +- .../probabilistic_sampler_test.go | 8 +- .../component}/otelcol/processor/processor.go | 16 +- .../otelcol/processor/processor_test.go | 12 +- .../processortest/compare_signals.go | 0 .../processortest/compare_signals_test.go | 0 .../processor/processortest/processortest.go | 10 +- .../internal/aws/ec2/config.go | 2 +- .../internal/aws/ecs/config.go | 2 +- .../internal/aws/eks/config.go | 2 +- .../internal/aws/elasticbeanstalk/config.go | 2 +- .../internal/aws/lambda/config.go | 2 +- .../internal/azure/aks/config.go | 2 +- .../internal/azure/config.go | 2 +- .../internal/consul/config.go | 2 +- .../internal/docker/config.go | 2 +- .../resourcedetection/internal/gcp/config.go | 2 +- .../internal/heroku/config.go | 2 +- .../internal/k8snode/config.go | 4 +- .../internal/openshift/config.go | 4 +- .../resource_attribute_config.go | 0 .../internal/system/config.go | 2 +- .../resourcedetection/resourcedetection.go | 36 ++--- .../resourcedetection_test.go | 30 ++-- .../component}/otelcol/processor/span/span.go | 6 +- .../otelcol/processor/span/span_test.go | 8 +- .../processor/tail_sampling/tail_sampling.go | 6 +- .../tail_sampling/tail_sampling_test.go | 10 +- .../otelcol/processor/tail_sampling/types.go | 0 .../otelcol/processor/transform/transform.go | 6 +- .../processor/transform/transform_test.go | 2 +- .../otelcol/receiver/jaeger/jaeger.go | 6 +- .../otelcol/receiver/jaeger/jaeger_test.go | 8 +- .../otelcol/receiver/kafka/kafka.go | 6 +- .../otelcol/receiver/kafka/kafka_test.go | 4 +- .../component}/otelcol/receiver/loki/loki.go | 10 +- .../otelcol/receiver/loki/loki_test.go | 10 +- .../otelcol/receiver/opencensus/opencensus.go | 6 +- .../receiver/opencensus/opencensus_test.go | 8 +- .../component}/otelcol/receiver/otlp/otlp.go | 6 +- .../otelcol/receiver/otlp/otlp_test.go | 12 +- .../receiver/otlp/testdata/payload.json | 0 .../prometheus/internal/appendable.go | 0 .../receiver/prometheus/internal/doc.go | 0 .../receiver/prometheus/internal/logger.go | 0 .../prometheus/internal/logger_test.go | 0 .../receiver/prometheus/internal/metadata.go | 0 .../prometheus/internal/metricfamily.go | 0 .../prometheus/internal/metricfamily_test.go | 0 .../prometheus/internal/metrics_adjuster.go | 0 .../internal/metrics_adjuster_test.go | 0 .../prometheus/internal/metricsutil_test.go | 0 .../prometheus/internal/prom_to_otlp.go | 0 .../prometheus/internal/prom_to_otlp_test.go | 0 .../internal/staleness_end_to_end_test.go | 0 .../internal/starttimemetricadjuster.go | 0 .../internal/starttimemetricadjuster_test.go | 0 .../prometheus/internal/transaction.go | 0 .../prometheus/internal/transaction_test.go | 0 .../receiver/prometheus/internal/util.go | 0 .../receiver/prometheus/internal/util_test.go | 0 .../otelcol/receiver/prometheus/prometheus.go | 12 +- .../receiver/prometheus/prometheus_test.go | 12 +- .../component}/otelcol/receiver/receiver.go | 16 +- .../otelcol/receiver/receiver_test.go | 12 +- .../otelcol/receiver/vcenter/vcenter.go | 6 +- .../otelcol/receiver/vcenter/vcenter_test.go | 4 +- .../otelcol/receiver/zipkin/zipkin.go | 6 +- .../otelcol/receiver/zipkin/zipkin_test.go | 8 +- .../prometheus/exporter/apache/apache.go | 8 +- .../prometheus/exporter/azure/azure.go | 8 +- .../prometheus/exporter/blackbox/blackbox.go | 12 +- .../exporter/blackbox/blackbox_test.go | 4 +- .../prometheus/exporter/cadvisor/cadvisor.go | 8 +- .../exporter/cadvisor/cadvisor_test.go | 2 +- .../exporter/cloudwatch/cloudwatch.go | 8 +- .../prometheus/exporter/cloudwatch/config.go | 2 +- .../exporter/cloudwatch/config_test.go | 0 .../prometheus/exporter/consul/consul.go | 8 +- .../prometheus/exporter/dnsmasq/dnsmasq.go | 8 +- .../exporter/dnsmasq/dnsmasq_test.go | 2 +- .../exporter/elasticsearch/elasticsearch.go | 10 +- .../elasticsearch/elasticsearch_test.go | 4 +- .../prometheus/exporter/exporter.go | 10 +- .../component}/prometheus/exporter/gcp/gcp.go | 8 +- .../prometheus/exporter/gcp/gcp_test.go | 0 .../prometheus/exporter/github/github.go | 8 +- .../prometheus/exporter/github/github_test.go | 0 .../prometheus/exporter/kafka/kafka.go | 10 +- .../prometheus/exporter/kafka/kafka_test.go | 4 +- .../exporter/memcached/memcached.go | 10 +- .../exporter/memcached/memcached_test.go | 4 +- .../prometheus/exporter/mongodb/mongodb.go | 8 +- .../exporter/mongodb/mongodb_test.go | 2 +- .../prometheus/exporter/mssql/mssql.go | 10 +- .../prometheus/exporter/mssql/mssql_test.go | 2 +- .../prometheus/exporter/mysql/mysql.go | 8 +- .../prometheus/exporter/mysql/mysql_test.go | 2 +- .../prometheus/exporter/oracledb/oracledb.go | 8 +- .../exporter/oracledb/oracledb_test.go | 2 +- .../prometheus/exporter/postgres/postgres.go | 8 +- .../exporter/postgres/postgres_test.go | 2 +- .../prometheus/exporter/process/process.go | 8 +- .../exporter/process/process_test.go | 0 .../prometheus/exporter/redis/redis.go | 8 +- .../prometheus/exporter/redis/redis_test.go | 2 +- .../prometheus/exporter/self/self.go | 8 +- .../prometheus/exporter/snmp/snmp.go | 10 +- .../prometheus/exporter/snmp/snmp_test.go | 4 +- .../exporter/snowflake/snowflake.go | 8 +- .../exporter/snowflake/snowflake_test.go | 2 +- .../prometheus/exporter/squid/squid.go | 8 +- .../prometheus/exporter/squid/squid_test.go | 2 +- .../prometheus/exporter/statsd/config.go | 6 +- .../prometheus/exporter/statsd/statsd.go | 6 +- .../prometheus/exporter/statsd/statsd_test.go | 0 .../exporter/statsd/testdata/mapTest.yaml | 0 .../prometheus/exporter/unix/config.go | 6 +- .../prometheus/exporter/unix/unix.go | 6 +- .../prometheus/exporter/vsphere/vsphere.go | 8 +- .../exporter/vsphere/vsphere_test.go | 2 +- .../prometheus/exporter/windows/config.go | 2 +- .../windows/config_default_windows_test.go | 0 .../exporter/windows/config_windows.go | 2 +- .../prometheus/exporter/windows/windows.go | 6 +- .../exporter/windows/windows_test.go | 0 .../component}/prometheus/fanout.go | 2 +- .../component}/prometheus/fanout_test.go | 2 +- .../component}/prometheus/interceptor.go | 2 +- .../prometheus/operator/common/component.go | 10 +- .../prometheus/operator/common/crdmanager.go | 18 +-- .../operator/common/crdmanager_test.go | 8 +- .../prometheus/operator/common/interfaces.go | 0 .../operator/configgen/config_gen.go | 6 +- .../configgen/config_gen_podmonitor.go | 0 .../configgen/config_gen_podmonitor_test.go | 8 +- .../operator/configgen/config_gen_probe.go | 0 .../configgen/config_gen_probe_test.go | 6 +- .../configgen/config_gen_servicemonitor.go | 0 .../config_gen_servicemonitor_test.go | 6 +- .../operator/configgen/config_gen_test.go | 8 +- .../prometheus/operator/configgen/secrets.go | 0 .../operator/podmonitors/operator.go | 6 +- .../prometheus/operator/probes/probes.go | 6 +- .../servicemonitors/servicemonitors.go | 6 +- .../component}/prometheus/operator/types.go | 10 +- .../prometheus/operator/types_test.go | 0 .../prometheus/receive_http/receive_http.go | 12 +- .../receive_http/receive_http_test.go | 10 +- .../component}/prometheus/relabel/relabel.go | 8 +- .../prometheus/relabel/relabel_test.go | 12 +- .../component}/prometheus/remotewrite/cli.go | 2 +- .../prometheus/remotewrite/remote_write.go | 10 +- .../remotewrite/remote_write_test.go | 6 +- .../prometheus/remotewrite/types.go | 4 +- .../prometheus/remotewrite/types_test.go | 0 .../component}/prometheus/scrape/scrape.go | 16 +- .../prometheus/scrape/scrape_test.go | 12 +- .../component}/pyroscope/appender.go | 0 .../component}/pyroscope/appender_test.go | 0 .../component}/pyroscope/ebpf/args.go | 4 +- .../component}/pyroscope/ebpf/ebpf_linux.go | 6 +- .../pyroscope/ebpf/ebpf_linux_test.go | 6 +- .../pyroscope/ebpf/ebpf_placeholder.go | 4 +- .../component}/pyroscope/ebpf/metrics.go | 0 .../component}/pyroscope/java/args.go | 4 +- .../pyroscope/java/asprof/asprof.go | 0 .../java/asprof/asprof_linux_amd64.go | 0 .../java/asprof/asprof_linux_arm64.go | 0 .../pyroscope/java/asprof/asprof_test.go | 0 .../async-profiler-3.0-linux-arm64.tar.gz | Bin .../async-profiler-3.0-linux-x64.tar.gz | Bin .../pyroscope/java/asprof/extract.go | 0 .../component}/pyroscope/java/java.go | 8 +- .../component}/pyroscope/java/java_stub.go | 4 +- .../component}/pyroscope/java/loop.go | 8 +- .../component}/pyroscope/java/target.go | 2 +- .../pyroscope/scrape/delta_profiles.go | 4 +- .../pyroscope/scrape/delta_profiles_test.go | 2 +- .../scrape/internal/fastdelta/Makefile | 0 .../scrape/internal/fastdelta/delta_map.go | 2 +- .../pyroscope/scrape/internal/fastdelta/fd.go | 2 +- .../scrape/internal/fastdelta/fd_test.go | 0 .../scrape/internal/fastdelta/fuzz_test.go | 2 +- .../scrape/internal/fastdelta/hasher.go | 2 +- .../internal/fastdelta/location_index.go | 0 .../internal/fastdelta/location_index_test.go | 0 .../scrape/internal/fastdelta/set.go | 0 .../scrape/internal/fastdelta/string_table.go | 0 .../fastdelta/testdata/big-heap.pprof | Bin .../fastdelta/testdata/block.after.pprof | Bin .../fastdelta/testdata/block.before.pprof | Bin ...dba89dfc4669e45654f23e8446fd5292fa1bb62cf3 | 0 ...1f7597f91ae767be28cf9ebfaaa40e3d1454c12be3 | 0 ...409cba6bd17597ba4e67e73fcf7bdffa31438ac64f | 0 ...af7c0301e0be9045945811b270c33d4f0a2760eea2 | 0 ...9d49fb622c32f7f885b5a651355a7350b2fbd4bad8 | 0 ...107bfd2fb13eb81289831066a0b9f16190c2592c8a | 0 ...4a24dee416e17c1511472fb808f3f9b4d68a46e3e5 | 0 ...e89e9d85da6bd270176ce44ec809c52607cdc58680 | 0 .../fastdelta/testdata/heap.after.pprof | Bin .../fastdelta/testdata/heap.before.pprof | Bin .../internal/fastdelta/testdata/heap.pprof | Bin .../testdata/stress-failure.2.after.pprof | Bin .../testdata/stress-failure.2.before.pprof | Bin .../testdata/stress-failure.3.after.pprof | Bin .../testdata/stress-failure.3.before.pprof | Bin .../testdata/stress-failure.after.pprof | Bin .../testdata/stress-failure.before.pprof | Bin .../scrape/internal/pproflite/decoder.go | 0 .../scrape/internal/pproflite/encoder.go | 0 .../scrape/internal/pproflite/pproflite.go | 0 .../internal/pproflite/pproflite_test.go | 2 +- .../internal/pproflite/testdata/heap.pprof | Bin .../component}/pyroscope/scrape/manager.go | 4 +- .../pyroscope/scrape/manager_test.go | 4 +- .../component}/pyroscope/scrape/scrape.go | 14 +- .../pyroscope/scrape/scrape_loop.go | 4 +- .../pyroscope/scrape/scrape_loop_test.go | 6 +- .../pyroscope/scrape/scrape_test.go | 12 +- .../component}/pyroscope/scrape/target.go | 0 .../pyroscope/scrape/target_test.go | 0 .../component}/pyroscope/write/metrics.go | 0 .../component}/pyroscope/write/write.go | 8 +- .../component}/pyroscope/write/write_test.go | 6 +- {component => internal/component}/registry.go | 0 .../component}/registry_test.go | 0 .../component}/remote/http/http.go | 6 +- .../component}/remote/http/http_test.go | 8 +- .../remote/kubernetes/configmap/configmap.go | 4 +- .../remote/kubernetes/kubernetes.go | 4 +- .../remote/kubernetes/kubernetes_test.go | 0 .../remote/kubernetes/secret/secret.go | 4 +- .../component}/remote/s3/s3.go | 2 +- .../component}/remote/s3/s3_test.go | 2 +- .../component}/remote/s3/types.go | 0 .../component}/remote/s3/watcher.go | 0 .../component}/remote/vault/auth.go | 0 .../component}/remote/vault/client.go | 0 .../component}/remote/vault/metrics.go | 0 .../component}/remote/vault/refresher.go | 4 +- .../component}/remote/vault/ticker.go | 0 .../component}/remote/vault/vault.go | 4 +- .../component}/remote/vault/vault_test.go | 4 +- .../converter}/converter.go | 8 +- .../converter}/diag/diagnostic.go | 0 .../converter}/diag/diagnostics.go | 0 .../converter}/diag/report.go | 0 .../converter}/diag/severity.go | 0 .../internal/common/convert_appendable.go | 0 .../internal/common/convert_logs_receiver.go | 2 +- .../internal/common/convert_targets.go | 2 +- .../internal/common/convert_targets_test.go | 4 +- .../internal/common/custom_tokenizer.go | 0 .../internal/common/http_client_config.go | 4 +- .../converter}/internal/common/river_utils.go | 8 +- .../internal/common/river_utils_test.go | 2 +- .../converter}/internal/common/validate.go | 2 +- .../internal/common/validate_test.go | 4 +- .../internal/common/weaveworks_server.go | 4 +- .../internal/otelcolconvert/converter.go | 2 +- .../converter_batchprocessor.go | 8 +- .../converter_filterprocessor.go | 8 +- .../otelcolconvert/converter_helpers.go | 2 +- .../converter_jaegerreceiver.go | 8 +- .../converter_k8sattributesprocessor.go | 8 +- .../otelcolconvert/converter_kafkareceiver.go | 8 +- .../converter_loadbalancingexporter.go | 8 +- .../converter_memorylimiterprocessor.go | 8 +- .../converter_opencensusreceiver.go | 8 +- .../otelcolconvert/converter_otlpexporter.go | 8 +- .../converter_otlphttpexporter.go | 8 +- .../otelcolconvert/converter_otlpreceiver.go | 8 +- ...converter_probabilisticsamplerprocessor.go | 8 +- .../otelcolconvert/converter_spanprocessor.go | 8 +- .../converter_tailsamplingprocessor.go | 8 +- .../converter_zipkinreceiver.go | 8 +- .../internal/otelcolconvert/otelcolconvert.go | 4 +- .../otelcolconvert/otelcolconvert_test.go | 4 +- .../internal/otelcolconvert/pipeline_group.go | 0 .../otelcolconvert/testdata/batch.river | 0 .../otelcolconvert/testdata/batch.yaml | 0 .../otelcolconvert/testdata/filter.river | 0 .../otelcolconvert/testdata/filter.yaml | 0 .../otelcolconvert/testdata/jaeger.river | 0 .../otelcolconvert/testdata/jaeger.yaml | 0 .../testdata/k8sattributes.river | 0 .../testdata/k8sattributes.yaml | 0 .../otelcolconvert/testdata/kafka.river | 0 .../otelcolconvert/testdata/kafka.yaml | 0 .../testdata/loadbalancing.river | 0 .../testdata/loadbalancing.yaml | 0 .../testdata/memorylimiter.river | 0 .../testdata/memorylimiter.yaml | 0 .../otelcolconvert/testdata/opencensus.river | 0 .../otelcolconvert/testdata/opencensus.yaml | 0 .../otelcol_errors/corrupt_config.diags | 0 .../otelcol_errors/corrupt_config.yaml | 0 .../otelcol_errors/duplicate_receivers.diags | 0 .../otelcol_errors/duplicate_receivers.yaml | 0 .../otelcol_errors/invalid_config.diags | 0 .../otelcol_errors/invalid_config.yaml | 0 .../otelcolconvert/testdata/otlp.river | 0 .../otelcolconvert/testdata/otlp.yaml | 0 .../otelcolconvert/testdata/otlphttp.river | 0 .../otelcolconvert/testdata/otlphttp.yaml | 0 .../testdata/probabilistic_sampler.river | 0 .../testdata/probabilistic_sampler.yaml | 0 .../otelcolconvert/testdata/span.river | 0 .../otelcolconvert/testdata/span.yaml | 0 .../otelcolconvert/testdata/span_full.river | 0 .../otelcolconvert/testdata/span_full.yaml | 0 .../testdata/tail_sampling.river | 0 .../testdata/tail_sampling.yaml | 0 .../otelcolconvert/testdata/zipkin.river | 0 .../otelcolconvert/testdata/zipkin.yaml | 0 .../internal/otelcolconvert/utils.go | 0 .../build/prometheus_blocks.go | 2 +- .../prometheusconvert/component/azure.go | 10 +- .../prometheusconvert/component/consul.go | 10 +- .../component/digitalocean.go | 10 +- .../prometheusconvert/component/dns.go | 10 +- .../prometheusconvert/component/docker.go | 10 +- .../component/dockerswarm.go | 10 +- .../prometheusconvert/component/ec2.go | 10 +- .../prometheusconvert/component/file.go | 10 +- .../prometheusconvert/component/gce.go | 10 +- .../prometheusconvert/component/http.go | 12 +- .../prometheusconvert/component/ionos.go | 10 +- .../prometheusconvert/component/kubernetes.go | 12 +- .../prometheusconvert/component/kuma.go | 10 +- .../prometheusconvert/component/lightsail.go | 10 +- .../prometheusconvert/component/linode.go | 10 +- .../prometheusconvert/component/marathon.go | 10 +- .../prometheusconvert/component/nerve.go | 10 +- .../prometheusconvert/component/openstack.go | 10 +- .../prometheusconvert/component/ovhcloud.go | 10 +- .../prometheusconvert/component/relabel.go | 12 +- .../component/remote_write.go | 8 +- .../prometheusconvert/component/scaleway.go | 10 +- .../prometheusconvert/component/scrape.go | 12 +- .../prometheusconvert/component/serverset.go | 10 +- .../component/service_discovery.go | 8 +- .../prometheusconvert/component/triton.go | 10 +- .../prometheusconvert/prometheusconvert.go | 12 +- .../prometheusconvert_test.go | 13 ++ .../prometheusconvert/testdata/azure.river | 0 .../prometheusconvert/testdata/azure.yaml | 0 .../testdata/bad_config.diags | 0 .../testdata/bad_config.yaml | 0 .../testdata/broken_yaml.diags | 0 .../testdata/broken_yaml.yaml | 0 .../prometheusconvert/testdata/consul.river | 0 .../prometheusconvert/testdata/consul.yaml | 0 .../testdata/digitalocean.diags | 0 .../testdata/digitalocean.river | 0 .../testdata/digitalocean.yaml | 0 .../testdata/discovery.river | 0 .../prometheusconvert/testdata/discovery.yaml | 0 .../testdata/discovery_relabel.river | 0 .../testdata/discovery_relabel.yaml | 0 .../prometheusconvert/testdata/dns.river | 0 .../prometheusconvert/testdata/dns.yaml | 0 .../prometheusconvert/testdata/docker.river | 0 .../prometheusconvert/testdata/docker.yaml | 0 .../testdata/dockerswarm.river | 0 .../testdata/dockerswarm.yaml | 0 .../prometheusconvert/testdata/ec2.river | 0 .../prometheusconvert/testdata/ec2.yaml | 0 .../prometheusconvert/testdata/empty.river | 0 .../prometheusconvert/testdata/empty.yaml | 0 .../prometheusconvert/testdata/file.river | 0 .../prometheusconvert/testdata/file.yaml | 0 .../prometheusconvert/testdata/gce.river | 0 .../prometheusconvert/testdata/gce.yaml | 0 .../prometheusconvert/testdata/http.river | 0 .../prometheusconvert/testdata/http.yaml | 0 .../prometheusconvert/testdata/ionos.river | 0 .../prometheusconvert/testdata/ionos.yaml | 0 .../testdata/kubernetes.river | 0 .../testdata/kubernetes.yaml | 0 .../prometheusconvert/testdata/kuma.river | 0 .../prometheusconvert/testdata/kuma.yaml | 0 .../testdata/lightsail.river | 0 .../prometheusconvert/testdata/lightsail.yaml | 0 .../prometheusconvert/testdata/linode.river | 0 .../prometheusconvert/testdata/linode.yaml | 0 .../prometheusconvert/testdata/marathon.river | 0 .../prometheusconvert/testdata/marathon.yaml | 0 .../testdata/metric_relabel.river | 0 .../testdata/metric_relabel.yaml | 0 .../prometheusconvert/testdata/nerve.river | 0 .../prometheusconvert/testdata/nerve.yaml | 0 .../testdata/openstack.river | 0 .../prometheusconvert/testdata/openstack.yaml | 0 .../prometheusconvert/testdata/ovhcloud.river | 0 .../prometheusconvert/testdata/ovhcloud.yaml | 0 .../prometheusconvert/testdata/scaleway.river | 0 .../prometheusconvert/testdata/scaleway.yaml | 0 .../prometheusconvert/testdata/scrape.diags | 0 .../prometheusconvert/testdata/scrape.river | 0 .../prometheusconvert/testdata/scrape.yaml | 0 .../testdata/serverset.river | 0 .../prometheusconvert/testdata/serverset.yaml | 0 .../prometheusconvert/testdata/triton.river | 0 .../prometheusconvert/testdata/triton.yaml | 0 .../testdata/unsupported.diags | 0 .../testdata/unsupported.river | 0 .../testdata/unsupported.yaml | 0 .../internal/prometheusconvert/validate.go | 6 +- .../internal/build/azure_event_hub.go | 6 +- .../internal/build/cloudflare.go | 6 +- .../internal/build/consul_agent.go | 6 +- .../internal/build/docker_sd.go | 12 +- .../promtailconvert/internal/build/gcplog.go | 10 +- .../promtailconvert/internal/build/gelf.go | 6 +- .../internal/build/global_context.go | 2 +- .../internal/build/herokudrain.go | 6 +- .../promtailconvert/internal/build/journal.go | 8 +- .../promtailconvert/internal/build/kafka.go | 6 +- .../internal/build/loki_write.go | 8 +- .../internal/build/push_api.go | 8 +- .../internal/build/scrape_builder.go | 22 +-- .../internal/build/service_discovery.go | 10 +- .../promtailconvert/internal/build/stages.go | 6 +- .../promtailconvert/internal/build/syslog.go | 6 +- .../internal/build/windows_events.go | 6 +- .../promtailconvert/promtailconvert.go | 8 +- .../promtailconvert/promtailconvert_test.go | 13 ++ .../promtailconvert/testdata/azure.river | 0 .../promtailconvert/testdata/azure.yaml | 0 .../testdata/azure_event_hubs.river | 0 .../testdata/azure_event_hubs.yaml | 0 .../promtailconvert/testdata/bad_config.diags | 0 .../promtailconvert/testdata/bad_config.yaml | 0 .../testdata/cloudflare_relabel.river | 0 .../testdata/cloudflare_relabel.yaml | 0 .../promtailconvert/testdata/consul.river | 0 .../promtailconvert/testdata/consul.yaml | 0 .../testdata/consulagent.diags | 0 .../testdata/consulagent.river | 0 .../promtailconvert/testdata/consulagent.yaml | 0 .../testdata/digitalocean.river | 0 .../testdata/digitalocean.yaml | 0 .../promtailconvert/testdata/docker.river | 0 .../promtailconvert/testdata/docker.yaml | 0 .../testdata/docker_relabel.river | 0 .../testdata/docker_relabel.yaml | 0 .../testdata/dockerswarm.river | 0 .../promtailconvert/testdata/dockerswarm.yaml | 0 .../promtailconvert/testdata/ec2.river | 0 .../promtailconvert/testdata/ec2.yaml | 0 .../promtailconvert/testdata/file.river | 0 .../promtailconvert/testdata/file.yaml | 0 .../promtailconvert/testdata/gce.river | 0 .../promtailconvert/testdata/gce.yaml | 0 .../promtailconvert/testdata/gcplog.river | 0 .../promtailconvert/testdata/gcplog.yaml | 0 .../promtailconvert/testdata/gelf.river | 0 .../promtailconvert/testdata/gelf.yaml | 0 .../promtailconvert/testdata/heroku.river | 0 .../promtailconvert/testdata/heroku.yaml | 0 .../promtailconvert/testdata/journal.river | 0 .../promtailconvert/testdata/journal.yaml | 0 .../testdata/journal_relabel.river | 0 .../testdata/journal_relabel.yaml | 0 .../promtailconvert/testdata/kafka.river | 0 .../promtailconvert/testdata/kafka.yaml | 0 .../promtailconvert/testdata/kubernetes.river | 0 .../promtailconvert/testdata/kubernetes.yaml | 0 .../promtailconvert/testdata/loki_write.river | 0 .../promtailconvert/testdata/loki_write.yaml | 0 .../promtailconvert/testdata/marathon.river | 0 .../promtailconvert/testdata/marathon.yaml | 0 .../testdata/mixed_pipeline.river | 0 .../testdata/mixed_pipeline.yaml | 0 .../promtailconvert/testdata/nerve.river | 0 .../promtailconvert/testdata/nerve.yaml | 0 .../promtailconvert/testdata/openstack.river | 0 .../promtailconvert/testdata/openstack.yaml | 0 .../testdata/pipeline_stages_cri_empty.river | 0 .../testdata/pipeline_stages_cri_empty.yaml | 0 .../testdata/pipeline_stages_drop.diags | 0 .../testdata/pipeline_stages_drop.river | 0 .../testdata/pipeline_stages_drop.yaml | 0 .../pipeline_stages_match_nested.river | 0 .../pipeline_stages_match_nested.yaml | 0 .../testdata/pipeline_stages_part1.river | 0 .../testdata/pipeline_stages_part1.yaml | 0 .../testdata/pipeline_stages_part2.river | 0 .../testdata/pipeline_stages_part2.yaml | 0 .../pipeline_stages_structured_metadata.river | 0 .../pipeline_stages_structured_metadata.yaml | 0 .../promtailconvert/testdata/push_api.river | 0 .../promtailconvert/testdata/push_api.yaml | 0 .../testdata/push_api_unsupported.diags | 0 .../testdata/push_api_unsupported.yaml | 0 .../testdata/remote_write_basic_auth.river | 0 .../testdata/remote_write_basic_auth.yaml | 0 .../testdata/remote_write_basic_auth2.river | 0 .../testdata/remote_write_basic_auth2.yaml | 0 .../testdata/remote_write_bearer_file.river | 0 .../testdata/remote_write_bearer_file.yaml | 0 .../testdata/remote_write_bearer_token.river | 0 .../testdata/remote_write_bearer_token.yaml | 0 .../testdata/remote_write_oauth.river | 0 .../testdata/remote_write_oauth.yaml | 0 .../testdata/remote_write_oauth2.river | 0 .../testdata/remote_write_oauth2.yaml | 0 .../testdata/sd_pipeline_example.river | 0 .../testdata/sd_pipeline_example.yaml | 0 .../promtailconvert/testdata/serverset.river | 0 .../promtailconvert/testdata/serverset.yaml | 0 .../testdata/source_pipeline_example.river | 0 .../testdata/source_pipeline_example.yaml | 0 .../testdata/static_pipeline_example.river | 0 .../testdata/static_pipeline_example.yaml | 0 .../promtailconvert/testdata/syslog.river | 0 .../promtailconvert/testdata/syslog.yaml | 0 .../promtailconvert/testdata/triton.river | 0 .../promtailconvert/testdata/triton.yaml | 0 .../testdata/unsupported.diags | 0 .../promtailconvert/testdata/unsupported.yaml | 0 .../testdata/windowsevents.river | 0 .../testdata/windowsevents.yaml | 0 .../testdata/windowsevents_relabel.river | 0 .../testdata/windowsevents_relabel.yaml | 0 .../internal/promtailconvert/validate.go | 2 +- .../internal/build/apache_exporter.go | 8 +- .../internal/build/app_agent_receiver.go | 12 +- .../internal/build/azure_exporter.go | 6 +- .../internal/build/blackbox_exporter.go | 8 +- .../staticconvert/internal/build/builder.go | 86 +++++------ .../internal/build/cadvisor_exporter.go | 6 +- .../internal/build/cloudwatch_exporter.go | 6 +- .../internal/build/consul_exporter.go | 6 +- .../internal/build/dnsmasq_exporter.go | 6 +- .../internal/build/elasticsearch_exporter.go | 8 +- .../internal/build/eventhandler.go | 14 +- .../internal/build/gcp_exporter.go | 6 +- .../internal/build/github_exporter.go | 6 +- .../internal/build/global_context.go | 4 +- .../internal/build/kafka_exporter.go | 6 +- .../staticconvert/internal/build/logging.go | 6 +- .../internal/build/memcached_exporter.go | 8 +- .../internal/build/mongodb_exporter.go | 6 +- .../internal/build/mssql_exporter.go | 6 +- .../internal/build/mysqld_exporter.go | 6 +- .../internal/build/node_exporter.go | 6 +- .../internal/build/oracledb_exporter.go | 6 +- .../internal/build/postgres_exporter.go | 6 +- .../internal/build/process_exporter.go | 6 +- .../internal/build/redis_exporter.go | 6 +- .../internal/build/self_exporter.go | 8 +- .../staticconvert/internal/build/server.go | 6 +- .../internal/build/snmp_exporter.go | 10 +- .../internal/build/snowflake_exporter.go | 6 +- .../internal/build/squid_exporter.go | 6 +- .../internal/build/statsd_exporter.go | 8 +- .../internal/build/vmware_exporter.go | 6 +- .../internal/build/windows_exporter.go | 6 +- .../internal/staticconvert/staticconvert.go | 18 +-- .../staticconvert/staticconvert_test.go | 6 +- .../testdata-v2/integrations_v2.diags | 0 .../testdata-v2/integrations_v2.river | 0 .../testdata-v2/integrations_v2.yaml | 0 .../testdata-v2/missing_metrics_config.diags | 0 .../testdata-v2/missing_metrics_config.yaml | 0 .../testdata-v2/unsupported.diags | 0 .../testdata-v2/unsupported.river | 0 .../testdata-v2/unsupported.yaml | 0 .../testdata-v2_windows/integrations_v2.diags | 0 .../testdata-v2_windows/integrations_v2.river | 0 .../testdata-v2_windows/integrations_v2.yaml | 0 .../staticconvert/testdata/dup_labels.diags | 0 .../staticconvert/testdata/dup_labels.yaml | 0 .../staticconvert/testdata/example-cert.pem | 0 .../staticconvert/testdata/example-key.pem | 0 .../staticconvert/testdata/integrations.diags | 0 .../staticconvert/testdata/integrations.river | 0 .../staticconvert/testdata/integrations.yaml | 0 .../testdata/integrations_no_rw.diags | 0 .../testdata/integrations_no_rw.yaml | 0 .../testdata/prom_missing_name.diags | 0 .../testdata/prom_missing_name.yaml | 0 .../testdata/prom_remote_write.diags | 0 .../testdata/prom_remote_write.river | 0 .../testdata/prom_remote_write.yaml | 0 .../staticconvert/testdata/prom_scrape.diags | 0 .../staticconvert/testdata/prom_scrape.river | 0 .../staticconvert/testdata/prom_scrape.yaml | 0 .../testdata/promtail_prom.diags | 0 .../testdata/promtail_prom.river | 0 .../staticconvert/testdata/promtail_prom.yaml | 0 .../testdata/promtail_scrape.diags | 0 .../testdata/promtail_scrape.river | 0 .../testdata/promtail_scrape.yaml | 0 .../staticconvert/testdata/sanitize.diags | 0 .../staticconvert/testdata/sanitize.river | 0 .../staticconvert/testdata/sanitize.yaml | 0 .../staticconvert/testdata/unsupported.diags | 0 .../staticconvert/testdata/unsupported.river | 0 .../staticconvert/testdata/unsupported.yaml | 0 .../testdata_windows/integrations.diags | 0 .../testdata_windows/integrations.river | 0 .../testdata_windows/integrations.yaml | 0 .../internal/staticconvert/validate.go | 86 +++++------ .../internal/test_common/testing.go | 14 +- .../flow/componenttest/componenttest.go | 6 +- .../flow/componenttest/context.go | 0 .../flow/componenttest/testfailmodule.go | 4 +- {pkg => internal}/flow/declare_test.go | 8 +- {pkg => internal}/flow/flow.go | 12 +- {pkg => internal}/flow/flow_components.go | 6 +- {pkg => internal}/flow/flow_services.go | 8 +- {pkg => internal}/flow/flow_services_test.go | 12 +- {pkg => internal}/flow/flow_test.go | 10 +- {pkg => internal}/flow/flow_updates_test.go | 4 +- {pkg => internal}/flow/import_test.go | 10 +- .../flow/internal/controller/block_node.go | 2 +- .../internal/controller/component_node.go | 2 +- .../controller/component_node_manager.go | 0 .../controller/component_references.go | 2 +- .../internal/controller/component_registry.go | 2 +- .../controller/custom_component_registry.go | 0 .../flow/internal/controller/loader.go | 10 +- .../flow/internal/controller/loader_test.go | 10 +- .../flow/internal/controller/metrics.go | 0 .../flow/internal/controller/module.go | 2 +- .../controller/node_builtin_component.go | 8 +- .../controller/node_builtin_component_test.go | 0 .../flow/internal/controller/node_config.go | 2 +- .../controller/node_config_argument.go | 0 .../internal/controller/node_config_export.go | 0 .../internal/controller/node_config_import.go | 10 +- .../controller/node_config_logging.go | 2 +- .../controller/node_config_tracing.go | 2 +- .../controller/node_custom_component.go | 4 +- .../flow/internal/controller/node_declare.go | 0 .../flow/internal/controller/node_service.go | 4 +- .../flow/internal/controller/queue.go | 0 .../flow/internal/controller/queue_test.go | 0 .../flow/internal/controller/scheduler.go | 0 .../internal/controller/scheduler_test.go | 4 +- .../flow/internal/controller/service_map.go | 2 +- .../flow/internal/controller/value_cache.go | 2 +- .../internal/controller/value_cache_test.go | 0 {pkg => internal}/flow/internal/dag/dag.go | 0 {pkg => internal}/flow/internal/dag/ops.go | 0 .../flow/internal/dag/ops_test.go | 0 {pkg => internal}/flow/internal/dag/tarjan.go | 0 .../flow/internal/dag/tarjan_test.go | 0 {pkg => internal}/flow/internal/dag/walk.go | 0 .../flow/internal/importsource/import_file.go | 4 +- .../flow/internal/importsource/import_git.go | 4 +- .../flow/internal/importsource/import_http.go | 6 +- .../internal/importsource/import_source.go | 2 +- .../internal/importsource/import_string.go | 2 +- .../flow/internal/testcomponents/count.go | 4 +- .../flow/internal/testcomponents/doc.go | 0 .../internal/testcomponents/experimental.go | 2 +- .../flow/internal/testcomponents/fake.go | 2 +- .../internal/testcomponents/passthrough.go | 4 +- .../flow/internal/testcomponents/sumation.go | 4 +- .../flow/internal/testcomponents/tick.go | 4 +- .../flow/internal/testservices/doc.go | 0 .../flow/internal/testservices/fake.go | 2 +- .../flow/internal/worker/worker_pool.go | 0 .../flow/internal/worker/worker_pool_test.go | 0 {pkg => internal}/flow/logging/handler.go | 0 .../flow/logging/handler_test.go | 0 {pkg => internal}/flow/logging/level/level.go | 2 +- {pkg => internal}/flow/logging/logger.go | 2 +- {pkg => internal}/flow/logging/logger_test.go | 8 +- {pkg => internal}/flow/logging/options.go | 2 +- {pkg => internal}/flow/module.go | 12 +- {pkg => internal}/flow/module_eval_test.go | 20 +-- {pkg => internal}/flow/module_fail_test.go | 4 +- {pkg => internal}/flow/module_registry.go | 0 {pkg => internal}/flow/module_test.go | 10 +- {pkg => internal}/flow/source.go | 2 +- {pkg => internal}/flow/source_test.go | 2 +- .../import_error/import_error_1.txtar | 0 .../import_error/import_error_2.txtar | 0 .../import_error/import_error_3.txtar | 0 .../import_error/import_error_4.txtar | 0 .../testdata/import_file/import_file_1.txtar | 0 .../testdata/import_file/import_file_10.txtar | 0 .../testdata/import_file/import_file_11.txtar | 0 .../testdata/import_file/import_file_12.txtar | 0 .../testdata/import_file/import_file_13.txtar | 0 .../testdata/import_file/import_file_14.txtar | 0 .../testdata/import_file/import_file_15.txtar | 0 .../testdata/import_file/import_file_16.txtar | 0 .../testdata/import_file/import_file_2.txtar | 0 .../testdata/import_file/import_file_3.txtar | 0 .../testdata/import_file/import_file_4.txtar | 0 .../testdata/import_file/import_file_5.txtar | 0 .../testdata/import_file/import_file_6.txtar | 0 .../testdata/import_file/import_file_7.txtar | 0 .../testdata/import_file/import_file_8.txtar | 0 .../testdata/import_file/import_file_9.txtar | 0 .../testdata/import_git/import_git_1.txtar | 0 .../testdata/import_http/import_http_1.txtar | 0 .../import_string/import_string_1.txtar | 0 .../tracing/internal/jaegerremote/LICENSE | 0 .../tracing/internal/jaegerremote/README.md | 0 .../internal/jaegerremote/constants.go | 0 .../flow/tracing/internal/jaegerremote/doc.go | 0 .../tracing/internal/jaegerremote/sampler.go | 2 +- .../internal/jaegerremote/sampler_remote.go | 0 .../jaegerremote/sampler_remote_options.go | 0 .../internal/jaegerremote/utils/http_json.go | 0 .../jaegerremote/utils/rate_limiter.go | 0 .../flow/tracing/lazy_sampler.go | 0 .../flow/tracing/otelcol_client.go | 2 +- {pkg => internal}/flow/tracing/tracing.go | 6 +- {pkg => internal}/flow/tracing/wrap_tracer.go | 0 .../flowmode/cluster_builder.go | 4 +- .../flowmode/cluster_builder_test.go | 0 .../flowmode/cmd_convert.go | 4 +- .../flowmode/cmd_convert_test.go | 0 .../internal => internal}/flowmode/cmd_fmt.go | 0 .../internal => internal}/flowmode/cmd_run.go | 34 ++--- .../flowmode/cmd_tools.go | 2 +- .../flowmode/flowmode.go | 2 +- .../flowmode/resources_collector.go | 2 +- {pkg => internal}/loki/client/client.go | 2 +- {pkg => internal}/loki/client/client_test.go | 0 .../loki/client/internal/client.go | 0 .../loki/client/internal/client_test.go | 0 {pkg => internal}/loki/client/rules.go | 0 {pkg => internal}/loki/client/rules_test.go | 0 {pkg => internal}/mimir/client/client.go | 2 +- {pkg => internal}/mimir/client/client_test.go | 0 .../mimir/client/internal/client.go | 0 .../mimir/client/internal/client_test.go | 0 {pkg => internal}/mimir/client/rules.go | 0 {pkg => internal}/mimir/client/rules_test.go | 0 {pkg => internal}/runner/hash_map.go | 0 {pkg => internal}/runner/hash_map_test.go | 0 {pkg => internal}/runner/runner.go | 0 {pkg => internal}/runner/runner_test.go | 4 +- .../service}/cluster/cluster.go | 8 +- .../service}/cluster/cluster_test.go | 0 {service => internal/service}/cluster/mock.go | 0 {service => internal/service}/http/handler.go | 2 +- .../service}/http/handler_windows.go | 3 +- {service => internal/service}/http/http.go | 10 +- .../service}/http/http_test.go | 10 +- {service => internal/service}/http/routes.go | 0 .../service}/http/split_path.go | 4 +- .../service}/http/split_path_test.go | 4 +- .../service}/http/testdata/config.conf | 0 .../service}/http/testdata/test-cert.crt | 0 .../service}/http/testdata/test-key.key | 0 {service => internal/service}/http/tls.go | 0 .../service}/http/tls_test.go | 0 .../service}/labelstore/data.go | 0 .../service}/labelstore/service.go | 6 +- .../service}/labelstore/service_test.go | 0 {service => internal/service}/otel/otel.go | 4 +- .../service}/remotecfg/noop.go | 0 .../service}/remotecfg/remotecfg.go | 6 +- .../service}/remotecfg/remotecfg_test.go | 14 +- {service => internal/service}/service.go | 2 +- {service => internal/service}/ui/ui.go | 8 +- {pkg => internal/static}/agentctl/sync.go | 4 +- .../static}/agentctl/sync_test.go | 4 +- .../static}/agentctl/testdata/agent-1.yaml | 0 .../static}/agentctl/testdata/agent-2.yaml | 0 .../static}/agentctl/testdata/agent-3.yaml | 0 .../static}/agentctl/waltools/cardinality.go | 0 .../agentctl/waltools/cardinality_test.go | 0 .../static}/agentctl/waltools/samples.go | 0 .../static}/agentctl/waltools/wal_iterator.go | 0 .../static}/agentctl/waltools/walstats.go | 0 .../agentctl/waltools/walstats_test.go | 0 .../static}/agentproto/agent.pb.go | 0 .../static}/agentproto/agent.proto | 4 +- {pkg => internal/static}/agentproto/func.go | 0 {pkg => internal/static}/agentproto/gen.go | 0 {pkg => internal/static}/client/client.go | 4 +- .../agent_management_remote_config_test.go | 4 +- .../static}/config/agentmanagement.go | 4 +- .../config/agentmanagement_remote_config.go | 6 +- .../static}/config/agentmanagement_test.go | 6 +- {pkg => internal/static}/config/config.go | 18 +-- .../static}/config/config_test.go | 10 +- .../static}/config/encoder/encoder.go | 0 .../config/encoder/test_encoding_unknown.txt | 0 .../config/encoder/test_encoding_utf16be.txt | Bin .../config/encoder/test_encoding_utf16le.txt | Bin .../config/encoder/test_encoding_utf32be.txt | Bin .../config/encoder/test_encoding_utf32le.txt | Bin .../config/encoder/test_encoding_utf8.txt | 0 .../config/encoder/test_encoding_utf8bom.txt | 0 .../static}/config/features/features.go | 0 .../static}/config/features/features_test.go | 0 .../agent_management_metrics.go | 0 .../config/instrumentation/config_metrics.go | 0 .../instrumentation/remote_config_metrics.go | 0 .../static}/config/integrations.go | 10 +- .../static}/config/integrations_test.go | 4 +- .../static}/config/remote_config.go | 2 +- .../static}/config/remote_config_test.go | 0 .../static}/config/testdata/server_empty.yml | 0 .../static}/integrations/agent/agent.go | 4 +- .../integrations/apache_http/apache_http.go | 2 +- .../azure_exporter/azure_exporter.go | 2 +- .../integrations/azure_exporter/config.go | 8 +- .../azure_exporter/config_test.go | 2 +- .../blackbox_exporter/blackbox_exporter.go | 6 +- .../blackbox_exporter_test.go | 2 +- .../static}/integrations/cadvisor/cadvisor.go | 2 +- .../integrations/cadvisor/cadvisor_stub.go | 2 +- .../integrations/cadvisor/cadvisor_test.go | 2 +- .../static}/integrations/cadvisor/common.go | 6 +- .../cloudwatch_exporter.go | 2 +- .../cloudwatch_exporter_decoupled.go | 2 +- .../cloudwatch_exporter/config.go | 6 +- .../cloudwatch_exporter/config_test.go | 0 .../cloudwatch_exporter/docs/doc.go | 0 .../cloudwatch_exporter/docs/template.md | 0 .../integrations/collector_integration.go | 4 +- .../static}/integrations/config/config.go | 0 .../consul_exporter/consul_exporter.go | 6 +- .../dnsmasq_exporter/dnsmasq_exporter.go | 6 +- .../elasticsearch_exporter.go | 6 +- .../elasticsearch_exporter/tls.go | 0 .../integrations/gcp_exporter/gcp_exporter.go | 6 +- .../gcp_exporter/gcp_exporter_test.go | 2 +- .../github_exporter/github_exporter.go | 6 +- .../github_exporter/github_test.go | 2 +- .../integrations/handler_integration.go | 2 +- .../static/integrations/install/install.go | 48 ++++++ .../integrations/install/install_test.go | 4 +- .../static}/integrations/integration.go | 2 +- .../kafka_exporter/kafka_exporter.go | 6 +- .../integrations/kafka_exporter/kafka_test.go | 2 +- .../static}/integrations/logruskit.go | 0 .../static}/integrations/manager.go | 10 +- .../static}/integrations/manager_test.go | 6 +- .../memcached_exporter/memcached_exporter.go | 6 +- .../mongodb_exporter/mongodb_exporter.go | 6 +- .../mongodb_exporter/mongodb_test.go | 2 +- .../static}/integrations/mssql/collector.go | 0 .../integrations/mssql/collector_config.yaml | 0 .../integrations/mssql/collector_test.go | 0 .../integrations/mssql/sql_exporter.go | 8 +- .../integrations/mssql/sql_exporter_test.go | 0 .../mysqld_exporter/mysqld-exporter.go | 6 +- .../mysqld_exporter/mysqld_test.go | 2 +- .../integrations/node_exporter/collectors.go | 0 .../integrations/node_exporter/config.go | 6 +- .../integrations/node_exporter/config_test.go | 0 .../node_exporter/node_exporter.go | 4 +- .../node_exporter/node_exporter_linux.go | 0 .../node_exporter/node_exporter_test.go | 0 .../node_exporter/node_exporter_windows.go | 2 +- .../oracledb_exporter/oracledb_exporter.go | 6 +- .../oracledb_exporter_test.go | 0 .../postgres_exporter/postgres_exporter.go | 6 +- .../postgres_exporter_test.go | 0 .../postgres_exporter/postgres_test.go | 2 +- .../integrations/process_exporter/config.go | 6 +- .../process_exporter/process-exporter.go | 2 +- .../process-exporter_linux.go | 4 +- .../redis_exporter/redis_exporter.go | 6 +- .../redis_exporter/redis_exporter_test.go | 2 +- .../testdata/password_map_file.json | 0 .../static}/integrations/register.go | 4 +- .../static}/integrations/register_test.go | 0 .../snmp_exporter/common/common.go | 0 .../snmp_exporter/common/snmp.yml | 0 .../snmp_exporter/common/snmp.yml.gz | Bin .../integrations/snmp_exporter/snmp.go | 0 .../snmp_exporter/snmp_exporter.go | 6 +- .../snmp_exporter/snmp_exporter_test.go | 0 .../snowflake_exporter/snowflake_exporter.go | 6 +- .../snowflake_exporter_test.go | 0 .../squid_exporter/squid_exporter.go | 6 +- .../squid_exporter/squid_exporter_test.go | 0 .../integrations/statsd_exporter/metrics.go | 0 .../statsd_exporter/statsd_exporter.go | 10 +- .../static}/integrations/stub_integration.go | 2 +- .../static}/integrations/v2/agent/agent.go | 6 +- .../v2/apache_http/apache_http.go | 6 +- .../v2/apache_http/apache_http_test.go | 2 +- .../app_agent_receiver/app_agent_receiver.go | 6 +- .../app_agent_receiver_test.go | 10 +- .../v2/app_agent_receiver/config.go | 4 +- .../v2/app_agent_receiver/config_test.go | 0 .../v2/app_agent_receiver/handler.go | 0 .../v2/app_agent_receiver/handler_test.go | 0 .../v2/app_agent_receiver/logs_exporter.go | 2 +- .../app_agent_receiver/logs_exporter_test.go | 0 .../v2/app_agent_receiver/payload.go | 0 .../v2/app_agent_receiver/payload_test.go | 0 .../receiver_metrics_exporter.go | 0 .../receiver_metrics_test.go | 0 .../v2/app_agent_receiver/sourcemaps.go | 0 .../v2/app_agent_receiver/sourcemaps_test.go | 0 .../v2/app_agent_receiver/testdata/foo.js | 0 .../v2/app_agent_receiver/testdata/foo.js.map | 0 .../app_agent_receiver/testdata/payload.json | 0 .../testdata/payload_2.json | 0 .../v2/app_agent_receiver/traces_exporter.go | 0 .../v2/app_agent_receiver/traces_test.go | 0 .../v2/app_agent_receiver/utils.go | 2 +- .../v2/app_agent_receiver/utils_test.go | 0 .../integrations/v2/autoscrape/appender.go | 0 .../integrations/v2/autoscrape/autoscrape.go | 6 +- .../v2/autoscrape/autoscrape_test.go | 4 +- .../v2/blackbox_exporter/blackbox.go | 8 +- .../v2/blackbox_exporter/blackbox_exporter.go | 8 +- .../v2/blackbox_exporter/blackbox_test.go | 10 +- .../static}/integrations/v2/common/metrics.go | 2 +- .../static}/integrations/v2/controller.go | 2 +- .../v2/controller_httpintegration_test.go | 2 +- .../v2/controller_metricsintegration_test.go | 4 +- .../integrations/v2/controller_test.go | 2 +- .../v2/controller_updateintegration_test.go | 2 +- .../v2/eventhandler/eventhandler.go | 4 +- .../v2/eventhandler/eventhandler_test.go | 0 .../v2/eventhandler/integration.go | 2 +- .../eventhandler/testdata/eventhandler.cache | 0 .../static}/integrations/v2/integrations.go | 10 +- .../metricshandler_integration.go | 6 +- .../metricshandler_integration_test.go | 4 +- .../v2/metricsutils/versionshim.go | 8 +- .../static}/integrations/v2/register.go | 6 +- .../static}/integrations/v2/register_test.go | 4 +- .../integrations/v2/snmp_exporter/snmp.go | 8 +- .../v2/snmp_exporter/snmp_exporter.go | 6 +- .../v2/snmp_exporter/snmp_exporter_test.go | 0 .../static}/integrations/v2/subsystem.go | 4 +- .../static}/integrations/v2/subsystem_test.go | 4 +- .../static}/integrations/v2/targetgroup.go | 0 .../static}/integrations/v2/utils.go | 2 +- .../v2/vmware_exporter/vmware_exporter.go | 6 +- .../static}/integrations/v2/workers.go | 0 .../vmware_exporter/vmware_exporter.go | 2 +- .../integrations/windows_exporter/config.go | 6 +- .../windows_exporter/config_windows.go | 0 .../windows_exporter/windows_exporter.go | 2 +- .../windows_exporter_windows.go | 9 +- {pkg => internal/static}/logs/config.go | 0 {pkg => internal/static}/logs/config_test.go | 0 {pkg => internal/static}/logs/global.go | 0 {pkg => internal/static}/logs/http.go | 2 +- {pkg => internal/static}/logs/http_test.go | 2 +- {pkg => internal/static}/logs/logs.go | 2 +- {pkg => internal/static}/logs/logs_test.go | 2 +- {pkg => internal/static}/metrics/agent.go | 8 +- .../static}/metrics/agent_test.go | 4 +- {pkg => internal/static}/metrics/cleaner.go | 4 +- .../static}/metrics/cleaner_test.go | 2 +- .../static}/metrics/cluster/client/client.go | 4 +- .../static}/metrics/cluster/cluster.go | 8 +- .../static}/metrics/cluster/config.go | 6 +- .../static}/metrics/cluster/config_test.go | 0 .../static}/metrics/cluster/config_watcher.go | 6 +- .../metrics/cluster/config_watcher_test.go | 6 +- .../metrics/cluster/configapi/types.go | 0 .../static}/metrics/cluster/node.go | 6 +- .../static}/metrics/cluster/node_test.go | 4 +- .../static}/metrics/cluster/validation.go | 2 +- .../metrics/cluster/validation_test.go | 4 +- {pkg => internal/static}/metrics/http.go | 2 +- {pkg => internal/static}/metrics/http_test.go | 4 +- .../metrics/instance/configstore/api.go | 4 +- .../metrics/instance/configstore/api_test.go | 6 +- .../metrics/instance/configstore/codec.go | 0 .../instance/configstore/codec_test.go | 0 .../metrics/instance/configstore/errors.go | 0 .../metrics/instance/configstore/mock.go | 2 +- .../metrics/instance/configstore/remote.go | 4 +- .../instance/configstore/remote_test.go | 4 +- .../metrics/instance/configstore/store.go | 2 +- .../metrics/instance/configstore/unique.go | 2 +- .../static}/metrics/instance/errors.go | 0 .../static}/metrics/instance/global.go | 0 .../static}/metrics/instance/group_manager.go | 0 .../metrics/instance/group_manager_test.go | 0 .../static}/metrics/instance/host_filter.go | 0 .../metrics/instance/host_filter_test.go | 2 +- .../static}/metrics/instance/instance.go | 4 +- .../instance/instance_integration_test.go | 2 +- .../static}/metrics/instance/instance_test.go | 2 +- .../static}/metrics/instance/manager.go | 0 .../static}/metrics/instance/manager_test.go | 0 .../static}/metrics/instance/marshal.go | 0 .../static}/metrics/instance/marshal_test.go | 0 .../static}/metrics/instance/modal_manager.go | 0 .../static}/metrics/instance/noop.go | 0 .../static}/metrics/wal/series.go | 0 {pkg => internal/static}/metrics/wal/util.go | 0 {pkg => internal/static}/metrics/wal/wal.go | 0 .../static}/metrics/wal/wal_test.go | 2 +- .../static}/operator/apis/monitoring/doc.go | 0 .../apis/monitoring/v1alpha1/deployment.go | 2 +- .../operator/apis/monitoring/v1alpha1/doc.go | 0 .../apis/monitoring/v1alpha1/group.go | 0 .../apis/monitoring/v1alpha1/types.go | 0 .../monitoring/v1alpha1/types_integrations.go | 0 .../apis/monitoring/v1alpha1/types_logs.go | 0 .../apis/monitoring/v1alpha1/types_metrics.go | 0 .../v1alpha1/zz_generated.deepcopy.go | 2 +- .../static}/operator/assets/assets.go | 0 .../static}/operator/build_hierarchy.go | 8 +- .../static}/operator/build_hierarchy_test.go | 10 +- .../static}/operator/clientutil/clientutil.go | 0 .../static}/operator/clientutil/merge.go | 0 .../static}/operator/config/config.go | 4 +- .../operator/config/config_references.go | 2 +- .../operator/config/config_references_test.go | 2 +- .../static}/operator/config/config_test.go | 8 +- .../static}/operator/config/fs_importer.go | 0 .../config/integration_templates_test.go | 6 +- .../operator/config/logs_templates_test.go | 6 +- .../operator/config/metrics_templates_test.go | 6 +- .../templates/agent-integrations.libsonnet | 0 .../config/templates/agent-logs.libsonnet | 0 .../config/templates/agent-metrics.libsonnet | 0 .../templates/component/logs/client.libsonnet | 0 .../component/logs/external_labels.libsonnet | 0 .../component/logs/pod_logs.libsonnet | 0 .../component/logs/relabel_config.libsonnet | 0 .../templates/component/logs/stages.libsonnet | 0 .../metrics/external_labels.libsonnet | 0 .../metrics/kube_sd_config.libsonnet | 0 .../component/metrics/pod_monitor.libsonnet | 0 .../component/metrics/probe.libsonnet | 0 .../metrics/relabel_config.libsonnet | 0 .../component/metrics/remote_write.libsonnet | 0 .../metrics/safe_tls_config.libsonnet | 0 .../metrics/service_monitor.libsonnet | 0 .../component/metrics/tls_config.libsonnet | 0 .../config/templates/ext/marshal.libsonnet | 0 .../config/templates/ext/optionals.libsonnet | 0 .../config/templates/ext/secrets.libsonnet | 0 .../config/templates/integrations.libsonnet | 0 .../operator/config/templates/logs.libsonnet | 0 .../config/templates/metrics.libsonnet | 0 .../config/templates/utils/k8s.libsonnet | 0 .../static}/operator/config/utils.go | 2 +- .../static}/operator/config/utils_test.go | 0 {pkg => internal/static}/operator/defaults.go | 0 .../static}/operator/defaults.go.t | 0 .../static}/operator/hierarchy/hierarchy.go | 0 .../operator/hierarchy/hierarchy_test.go | 2 +- .../static}/operator/hierarchy/list.go | 0 .../static}/operator/hierarchy/selector.go | 0 {pkg => internal/static}/operator/kubelet.go | 4 +- .../static}/operator/kubelet_test.go | 6 +- .../static}/operator/logutil/log.go | 0 {pkg => internal/static}/operator/operator.go | 4 +- .../static}/operator/operator_test.go | 8 +- .../static}/operator/reconciler.go | 10 +- .../operator/reconciler_integrations.go | 6 +- .../operator/reconciler_integrations_test.go | 2 +- .../static}/operator/reconciler_logs.go | 6 +- .../static}/operator/reconciler_metrics.go | 6 +- .../operator/resources_integrations.go | 6 +- .../static}/operator/resources_logs.go | 2 +- .../static}/operator/resources_metrics.go | 2 +- .../operator/resources_metrics_test.go | 2 +- .../operator/resources_pod_template.go | 6 +- .../operator/resources_pod_template_test.go | 2 +- .../testdata/test-custom-mounts.in.yaml | 0 .../testdata/test-custom-mounts.out.yaml | 0 .../testdata/test-integrations.in.yaml | 0 .../testdata/test-integrations.out.yaml | 0 .../testdata/test-metrics-instance.in.yaml | 0 .../testdata/test-metrics-instance.out.yaml | 0 .../testdata/test-resource-hierarchy.yaml | 0 {pkg => internal/static}/server/config.go | 2 +- .../static}/server/config_test.go | 0 {pkg => internal/static}/server/flags.go | 0 {pkg => internal/static}/server/logger.go | 2 +- .../static}/server/logger_test.go | 0 .../static}/server/logger_windows.go | 0 {pkg => internal/static}/server/server.go | 0 .../static}/server/server_test.go | 0 .../static}/server/signal_context.go | 0 .../static}/server/testdata/example-cert.pem | 0 .../static}/server/testdata/example-key.pem | 0 .../testdata/windows/CLIENT_CA_CERT.cer | Bin .../static}/server/testdata/windows/README.md | 0 .../server/testdata/windows/agent-config.yml | 0 .../server/testdata/windows/client_cert.crt | 0 .../server/testdata/windows/client_cert.pfx | Bin .../server/testdata/windows/client_key.key | 0 .../windows/client_key_unencrypted.key | 0 .../server/testdata/windows/server_cert.crt | 0 {pkg => internal/static}/server/tls.go | 0 .../static}/server/tls_certstore_stub.go | 0 .../static}/server/tls_certstore_windows.go | 0 .../server/tls_certstore_windows_test.go | 0 {pkg => internal/static}/server/tls_test.go | 0 .../static}/supportbundle/supportbundle.go | 4 +- .../automaticloggingprocessor.go | 8 +- .../automaticloggingprocessor_test.go | 4 +- .../automaticloggingprocessor/factory.go | 2 +- {pkg => internal/static}/traces/config.go | 18 +-- .../static}/traces/config_test.go | 2 +- .../static}/traces/contextkeys/keys.go | 0 {pkg => internal/static}/traces/instance.go | 16 +- .../static}/traces/noopreceiver/factory.go | 0 .../static}/traces/noopreceiver/receiver.go | 0 .../promsdprocessor/consumer/consumer.go | 2 +- .../promsdprocessor/consumer/consumer_test.go | 4 +- .../static}/traces/promsdprocessor/factory.go | 0 .../promsdprocessor/prom_sd_processor.go | 6 +- .../promsdprocessor/prom_sd_processor_test.go | 2 +- .../static}/traces/pushreceiver/factory.go | 0 .../static}/traces/pushreceiver/receiver.go | 0 .../traces/remotewriteexporter/exporter.go | 6 +- .../remotewriteexporter/exporter_test.go | 4 +- .../traces/remotewriteexporter/factory.go | 0 .../traces/servicegraphprocessor/factory.go | 0 .../traces/servicegraphprocessor/processor.go | 2 +- .../servicegraphprocessor/processor_test.go | 2 +- .../traces/servicegraphprocessor/store.go | 0 .../servicegraphprocessor/store_test.go | 0 .../testdata/trace-sample.json | 0 .../testdata/unpaired-trace-sample.json | 0 {pkg => internal/static}/traces/traces.go | 6 +- .../static}/traces/traces_test.go | 6 +- .../traces/traceutils/otel_meter_settings.go | 0 .../static}/traces/traceutils/server.go | 2 +- .../compatible_components_page.go | 4 +- .../tools/docs_generator}/docs_generator.go | 6 +- .../docs_generator}/docs_updated_test.go | 15 +- .../tools/docs_generator}/links_to_types.go | 6 +- .../agent_linux_packages_test.go | 2 +- .../tools/packaging_test}/environment_test.go | 4 +- .../flow_linux_packages_test.go | 2 +- .../testdata/centos-systemd.Dockerfile | 0 .../testdata/debian-systemd.Dockerfile | 0 {pkg => internal}/usagestats/reporter.go | 0 {pkg => internal}/usagestats/reporter_test.go | 0 {pkg => internal}/usagestats/stats.go | 0 internal/useragent/useragent.go | 2 +- internal/useragent/useragent_test.go | 2 +- {pkg => internal}/util/compare_yaml.go | 0 {pkg => internal}/util/compare_yaml_test.go | 0 {pkg => internal}/util/defaults.go | 0 {pkg => internal}/util/eventually.go | 0 {pkg => internal}/util/eventually_test.go | 0 {pkg => internal}/util/k8s/k8s.go | 2 +- {pkg => internal}/util/k8s/k8s_test.go | 0 {pkg => internal}/util/k8s/objects.go | 0 {pkg => internal}/util/k8s/resources.go | 0 {pkg => internal}/util/log/log.go | 0 {pkg => internal}/util/metrics.go | 0 {pkg => internal}/util/otel_feature_gate.go | 0 .../util/otel_feature_gate_test.go | 0 {pkg => internal}/util/strings.go | 0 .../util/structwalk/structwalk.go | 0 .../util/structwalk/structwalk_test.go | 0 {pkg => internal}/util/subset/subset.go | 0 {pkg => internal}/util/subset/subset_test.go | 0 {pkg => internal}/util/test_logger.go | 2 +- .../util/testappender/compare.go | 0 .../internal/dtobuilder/dtobuilder.go | 0 .../testappender/internal/dtobuilder/sort.go | 0 .../util/testappender/testappender.go | 2 +- .../util/testappender/testappender_test.go | 2 +- {pkg => internal}/util/trigger.go | 0 {pkg => internal}/util/trigger_test.go | 0 {pkg => internal}/util/unchecked_collector.go | 0 {pkg => internal}/util/unregisterer.go | 0 {pkg => internal}/util/untab.go | 0 {pkg => internal}/util/wildcard/match.go | 0 {pkg => internal}/util/wildcard/match_test.go | 2 +- {pkg => internal}/util/yaml.go | 0 {pkg => internal}/util/yaml_test.go | 0 .../util/zapadapter/zapadapter.go | 0 .../util/zapadapter/zapadapter_test.go | 2 +- {web => internal/web}/api/api.go | 6 +- {web => internal/web}/ui/.env | 0 {web => internal/web}/ui/.env.production | 0 {web => internal/web}/ui/.eslintrc.json | 0 {web => internal/web}/ui/.gitignore | 0 {web => internal/web}/ui/README.md | 0 {web => internal/web}/ui/assets_builtin.go | 0 {web => internal/web}/ui/assets_nobuiltin.go | 2 +- {web => internal/web}/ui/package.json | 0 {web => internal/web}/ui/public/favicon.ico | Bin {web => internal/web}/ui/public/index.html | 0 {web => internal/web}/ui/public/manifest.json | 0 {web => internal/web}/ui/public/robots.txt | 0 {web => internal/web}/ui/src/App.module.css | 0 {web => internal/web}/ui/src/App.tsx | 0 {web => internal/web}/ui/src/Router.tsx | 0 .../ui/src/contexts/PathPrefixContext.tsx | 0 .../features/clustering/PeerList.module.css | 0 .../ui/src/features/clustering/PeerList.tsx | 0 .../src/features/clustering/Table.module.css | 0 .../web}/ui/src/features/clustering/Table.tsx | 0 .../web}/ui/src/features/clustering/types.ts | 0 .../src/features/component/ComponentBody.tsx | 0 .../component/ComponentList.module.css | 0 .../src/features/component/ComponentList.tsx | 0 .../component/ComponentView.module.css | 0 .../src/features/component/ComponentView.tsx | 0 .../features/component/HealthLabel.module.css | 0 .../ui/src/features/component/HealthLabel.tsx | 0 .../src/features/component/Table.module.css | 0 .../web}/ui/src/features/component/Table.tsx | 0 .../ui/src/features/component/TableHead.tsx | 0 .../web}/ui/src/features/component/style.ts | 0 .../web}/ui/src/features/component/types.ts | 0 .../ui/src/features/graph/ComponentGraph.tsx | 0 .../ui/src/features/layout/Navbar.module.css | 0 .../web}/ui/src/features/layout/Navbar.tsx | 0 .../ui/src/features/layout/Page.module.css | 0 .../web}/ui/src/features/layout/Page.tsx | 0 .../features/river-js/RiverValue.module.css | 0 .../ui/src/features/river-js/RiverValue.tsx | 0 .../ui/src/features/river-js/stringify.ts | 0 .../web}/ui/src/features/river-js/types.ts | 0 .../web}/ui/src/hooks/componentInfo.tsx | 0 .../web}/ui/src/hooks/peerInfo.tsx | 0 {web => internal/web}/ui/src/images/logo.svg | 0 {web => internal/web}/ui/src/index.css | 0 {web => internal/web}/ui/src/index.tsx | 0 .../web}/ui/src/pages/Clustering.tsx | 0 .../web}/ui/src/pages/ComponentDetailPage.tsx | 0 {web => internal/web}/ui/src/pages/Graph.tsx | 0 .../web}/ui/src/pages/PageComponentList.tsx | 0 .../web}/ui/src/react-app-env.d.ts | 0 {web => internal/web}/ui/src/static/fonts.css | 0 .../fonts/fira-code-v21-latin-500.woff2 | Bin .../fonts/fira-code-v21-latin-regular.woff2 | Bin .../static/fonts/roboto-v30-latin-100.woff2 | Bin .../fonts/roboto-v30-latin-100italic.woff2 | Bin .../static/fonts/roboto-v30-latin-300.woff2 | Bin .../fonts/roboto-v30-latin-300italic.woff2 | Bin .../static/fonts/roboto-v30-latin-500.woff2 | Bin .../fonts/roboto-v30-latin-500italic.woff2 | Bin .../static/fonts/roboto-v30-latin-700.woff2 | Bin .../fonts/roboto-v30-latin-700italic.woff2 | Bin .../static/fonts/roboto-v30-latin-900.woff2 | Bin .../fonts/roboto-v30-latin-900italic.woff2 | Bin .../fonts/roboto-v30-latin-italic.woff2 | Bin .../fonts/roboto-v30-latin-regular.woff2 | Bin {web => internal/web}/ui/src/utils/id.ts | 0 .../web}/ui/src/utils/partition.ts | 0 {web => internal/web}/ui/tsconfig.json | 0 {web => internal/web}/ui/ui.go | 6 +- {web => internal/web}/ui/yarn.lock | 0 pkg/integrations/install/install.go | 48 ------ tools/gen-crd-docs/config.json | 6 +- tools/generate-crds.bash | 2 +- 1816 files changed, 2731 insertions(+), 2726 deletions(-) delete mode 100644 component/all/all.go delete mode 100644 converter/internal/prometheusconvert/prometheusconvert_test.go delete mode 100644 converter/internal/promtailconvert/promtailconvert_test.go rename {pkg => internal}/boringcrypto/disabled.go (100%) rename {pkg => internal}/boringcrypto/enabled.go (100%) rename {pkg => internal}/build/build.go (100%) rename {tools => internal/cmd}/agentlint/go.mod (62%) rename {tools => internal/cmd}/agentlint/go.sum (100%) rename {tools => internal/cmd}/agentlint/internal/findcomponents/findcomponents.go (94%) rename {tools => internal/cmd}/agentlint/internal/rivertags/rivertags.go (100%) rename {tools => internal/cmd}/agentlint/main.go (63%) rename {integration-tests => internal/cmd/integration-tests}/README.md (100%) rename {integration-tests => internal/cmd/integration-tests}/common/common.go (100%) rename {integration-tests => internal/cmd/integration-tests}/common/log.go (100%) rename {integration-tests => internal/cmd/integration-tests}/common/metric.go (100%) rename {integration-tests => internal/cmd/integration-tests}/common/metrics_assert.go (100%) rename {integration-tests => internal/cmd/integration-tests}/configs/mimir/mimir.yaml (100%) rename {integration-tests/configs/prom-gen => internal/cmd/integration-tests/configs/otel-metrics-gen}/Dockerfile (74%) rename {integration-tests => internal/cmd/integration-tests}/configs/otel-metrics-gen/main.go (100%) rename {integration-tests/configs/otel-metrics-gen => internal/cmd/integration-tests/configs/prom-gen}/Dockerfile (77%) rename {integration-tests => internal/cmd/integration-tests}/configs/prom-gen/main.go (100%) rename {integration-tests => internal/cmd/integration-tests}/docker-compose.yaml (71%) rename {integration-tests => internal/cmd/integration-tests}/main.go (100%) rename {integration-tests => internal/cmd/integration-tests}/tests/otlp-metrics/config.river (100%) rename {integration-tests => internal/cmd/integration-tests}/tests/otlp-metrics/otlp_metrics_test.go (75%) rename {integration-tests => internal/cmd/integration-tests}/tests/otlp-metrics/otlp_to_prom_metrics_test.go (90%) rename {integration-tests => internal/cmd/integration-tests}/tests/read-log-file/config.river (100%) rename {integration-tests => internal/cmd/integration-tests}/tests/read-log-file/logs.txt (100%) rename {integration-tests => internal/cmd/integration-tests}/tests/read-log-file/read_log_file_test.go (93%) rename {integration-tests => internal/cmd/integration-tests}/tests/redis/config.river (100%) rename {integration-tests => internal/cmd/integration-tests}/tests/redis/redis_metrics_test.go (91%) rename {integration-tests => internal/cmd/integration-tests}/tests/scrape-prom-metrics/config.river (100%) rename {integration-tests => internal/cmd/integration-tests}/tests/scrape-prom-metrics/scrape_prom_metrics_test.go (76%) rename {integration-tests => internal/cmd/integration-tests}/tests/unix/config.river (100%) rename {integration-tests => internal/cmd/integration-tests}/tests/unix/unix_metrics_test.go (98%) rename {integration-tests => internal/cmd/integration-tests}/utils.go (95%) rename {tools => internal/cmd}/rivereval/example.river (100%) rename {tools => internal/cmd}/rivereval/main.go (100%) create mode 100644 internal/component/all/all.go rename {component => internal/component}/common/config/selectors.go (100%) rename {component => internal/component}/common/config/types.go (100%) rename {component => internal/component}/common/config/types_test.go (100%) rename {component => internal/component}/common/kubernetes/kubernetes.go (95%) rename {component => internal/component}/common/kubernetes/kubernetes_test.go (100%) rename {component => internal/component}/common/loki/client/batch.go (98%) rename {component => internal/component}/common/loki/client/batch_test.go (98%) rename {component => internal/component}/common/loki/client/client.go (99%) rename {component => internal/component}/common/loki/client/client_test.go (99%) rename {component => internal/component}/common/loki/client/config.go (100%) rename {component => internal/component}/common/loki/client/config_test.go (100%) rename {component => internal/component}/common/loki/client/fake/client.go (95%) rename {component => internal/component}/common/loki/client/internal/marker_encoding.go (100%) rename {component => internal/component}/common/loki/client/internal/marker_encoding_test.go (100%) rename {component => internal/component}/common/loki/client/internal/marker_file_handler.go (98%) rename {component => internal/component}/common/loki/client/internal/marker_file_handler_test.go (100%) rename {component => internal/component}/common/loki/client/internal/marker_handler.go (98%) rename {component => internal/component}/common/loki/client/internal/marker_handler_test.go (100%) rename {component => internal/component}/common/loki/client/internal/metrics.go (96%) rename {component => internal/component}/common/loki/client/logger.go (90%) rename {component => internal/component}/common/loki/client/logger_test.go (92%) rename {component => internal/component}/common/loki/client/manager.go (96%) rename {component => internal/component}/common/loki/client/manager_test.go (97%) rename {component => internal/component}/common/loki/client/metrics.go (95%) rename {component => internal/component}/common/loki/client/queue_client.go (99%) rename {component => internal/component}/common/loki/client/queue_client_test.go (98%) rename {component => internal/component}/common/loki/limit/config.go (100%) rename {component => internal/component}/common/loki/positions/positions.go (99%) rename {component => internal/component}/common/loki/positions/positions_test.go (100%) rename {component => internal/component}/common/loki/positions/write_positions_unix.go (100%) rename {component => internal/component}/common/loki/positions/write_positions_windows.go (100%) rename {component => internal/component}/common/loki/types.go (100%) rename {component => internal/component}/common/loki/utils/convert.go (100%) rename {component => internal/component}/common/loki/utils/remotewrite_server.go (100%) rename {component => internal/component}/common/loki/utils/sync.go (100%) rename {component => internal/component}/common/loki/wal/config.go (100%) rename {component => internal/component}/common/loki/wal/internal/watcher_state.go (97%) rename {component => internal/component}/common/loki/wal/reader.go (96%) rename {component => internal/component}/common/loki/wal/timer.go (100%) rename {component => internal/component}/common/loki/wal/timer_test.go (100%) rename {component => internal/component}/common/loki/wal/wal.go (98%) rename {component => internal/component}/common/loki/wal/watcher.go (99%) rename {component => internal/component}/common/loki/wal/watcher_metrics.go (98%) rename {component => internal/component}/common/loki/wal/watcher_test.go (99%) rename {component => internal/component}/common/loki/wal/writer.go (98%) rename {component => internal/component}/common/loki/wal/writer_test.go (98%) rename {component => internal/component}/common/net/config.go (100%) rename {component => internal/component}/common/net/config_test.go (100%) rename {component => internal/component}/common/net/server.go (98%) rename {component => internal/component}/common/net/server_test.go (97%) rename {component => internal/component}/common/relabel/relabel.go (100%) rename {component => internal/component}/common/relabel/relabel_test.go (100%) rename {component => internal/component}/component.go (100%) rename {component => internal/component}/component_health.go (100%) rename {component => internal/component}/component_health_test.go (97%) rename {component => internal/component}/component_provider.go (100%) rename {component => internal/component}/discovery/aws/ec2.go (95%) rename {component => internal/component}/discovery/aws/ec2_test.go (92%) rename {component => internal/component}/discovery/aws/lightsail.go (94%) rename {component => internal/component}/discovery/azure/azure.go (95%) rename {component => internal/component}/discovery/azure/azure_test.go (98%) rename {component => internal/component}/discovery/consul/consul.go (95%) rename {component => internal/component}/discovery/consul/consul_test.go (100%) rename {component => internal/component}/discovery/consulagent/consulagent.go (94%) rename {component => internal/component}/discovery/consulagent/consulagent_test.go (100%) rename {component => internal/component}/discovery/consulagent/promtail_consulagent.go (99%) rename {component => internal/component}/discovery/consulagent/promtail_consulagent_test.go (100%) rename {component => internal/component}/discovery/digitalocean/digitalocean.go (94%) rename {component => internal/component}/discovery/digitalocean/digitalocean_test.go (97%) rename {component => internal/component}/discovery/discovery.go (98%) rename {component => internal/component}/discovery/dns/dns.go (95%) rename {component => internal/component}/discovery/dns/dns_test.go (100%) rename {component => internal/component}/discovery/docker/docker.go (94%) rename {component => internal/component}/discovery/docker/docker_test.go (100%) rename {component => internal/component}/discovery/dockerswarm/dockerswarm.go (94%) rename {component => internal/component}/discovery/dockerswarm/dockerswarm_test.go (97%) rename {component => internal/component}/discovery/eureka/eureka.go (91%) rename {component => internal/component}/discovery/eureka/eureka_test.go (97%) rename {component => internal/component}/discovery/file/file.go (92%) rename {component => internal/component}/discovery/file/file_test.go (100%) rename {component => internal/component}/discovery/gce/gce.go (95%) rename {component => internal/component}/discovery/gce/gce_test.go (100%) rename {component => internal/component}/discovery/hetzner/hetzner.go (92%) rename {component => internal/component}/discovery/hetzner/hetzner_test.go (100%) rename {component => internal/component}/discovery/http/http.go (90%) rename {component => internal/component}/discovery/http/http_test.go (94%) rename {component => internal/component}/discovery/ionos/ionos.go (92%) rename {component => internal/component}/discovery/ionos/ionos_test.go (97%) rename {component => internal/component}/discovery/kubelet/kubelet.go (98%) rename {component => internal/component}/discovery/kubelet/kubelet_test.go (98%) rename {component => internal/component}/discovery/kubernetes/kubernetes.go (95%) rename {component => internal/component}/discovery/kubernetes/kubernetes_test.go (100%) rename {component => internal/component}/discovery/kuma/kuma.go (93%) rename {component => internal/component}/discovery/kuma/kuma_test.go (97%) rename {component => internal/component}/discovery/linode/linode.go (92%) rename {component => internal/component}/discovery/linode/linode_test.go (96%) rename {component => internal/component}/discovery/marathon/marathon.go (94%) rename {component => internal/component}/discovery/marathon/marathon_test.go (98%) rename {component => internal/component}/discovery/nerve/nerve.go (94%) rename {component => internal/component}/discovery/nerve/nerve_test.go (100%) rename {component => internal/component}/discovery/nomad/nomad.go (93%) rename {component => internal/component}/discovery/nomad/nomad_test.go (100%) rename {component => internal/component}/discovery/openstack/openstack.go (96%) rename {component => internal/component}/discovery/openstack/openstack_test.go (98%) rename {component => internal/component}/discovery/ovhcloud/ovhcloud.go (96%) rename {component => internal/component}/discovery/ovhcloud/ovhcloud_test.go (97%) rename {component => internal/component}/discovery/process/args.go (94%) rename {component => internal/component}/discovery/process/container.go (95%) rename {component => internal/component}/discovery/process/container_test.go (100%) rename {component => internal/component}/discovery/process/discover.go (98%) rename {component => internal/component}/discovery/process/join.go (93%) rename {component => internal/component}/discovery/process/join_test.go (98%) rename {component => internal/component}/discovery/process/process.go (94%) rename {component => internal/component}/discovery/process/process_stub.go (84%) rename {component => internal/component}/discovery/puppetdb/puppetdb.go (93%) rename {component => internal/component}/discovery/puppetdb/puppetdb_test.go (100%) rename {component => internal/component}/discovery/relabel/relabel.go (93%) rename {component => internal/component}/discovery/relabel/relabel_test.go (92%) rename {component => internal/component}/discovery/scaleway/scaleway.go (97%) rename {component => internal/component}/discovery/scaleway/scaleway_test.go (100%) rename {component => internal/component}/discovery/serverset/serverset.go (95%) rename {component => internal/component}/discovery/serverset/serverset_test.go (100%) rename {component => internal/component}/discovery/triton/triton.go (93%) rename {component => internal/component}/discovery/triton/triton_test.go (100%) rename {component => internal/component}/discovery/uyuni/uyuni.go (94%) rename {component => internal/component}/discovery/uyuni/uyuni_test.go (96%) rename {component => internal/component}/faro/receiver/arguments.go (96%) rename {component => internal/component}/faro/receiver/exporters.go (95%) rename {component => internal/component}/faro/receiver/exporters_test.go (94%) rename {component => internal/component}/faro/receiver/handler.go (96%) rename {component => internal/component}/faro/receiver/handler_test.go (98%) rename {component => internal/component}/faro/receiver/internal/payload/payload.go (100%) rename {component => internal/component}/faro/receiver/internal/payload/payload_test.go (100%) rename {component => internal/component}/faro/receiver/internal/payload/utils.go (100%) rename {component => internal/component}/faro/receiver/receiver.go (98%) rename {component => internal/component}/faro/receiver/receiver_test.go (93%) rename {component => internal/component}/faro/receiver/server.go (98%) rename {component => internal/component}/faro/receiver/sourcemaps.go (98%) rename {component => internal/component}/faro/receiver/sourcemaps_test.go (99%) rename {component => internal/component}/faro/receiver/testdata/foo.js (100%) rename {component => internal/component}/faro/receiver/testdata/foo.js.map (100%) rename {component => internal/component}/faro/receiver/testdata/payload.json (100%) rename {component => internal/component}/faro/receiver/testdata/payload_2.json (100%) rename {component => internal/component}/local/file/detector.go (98%) rename {component => internal/component}/local/file/file.go (98%) rename {component => internal/component}/local/file/file_test.go (97%) rename {component => internal/component}/local/file_match/file.go (94%) rename {component => internal/component}/local/file_match/file_test.go (98%) rename {component => internal/component}/local/file_match/watch.go (91%) rename {component => internal/component}/loki/echo/echo.go (92%) rename {component => internal/component}/loki/process/metric/counters.go (100%) rename {component => internal/component}/loki/process/metric/counters_test.go (100%) rename {component => internal/component}/loki/process/metric/gauges.go (100%) rename {component => internal/component}/loki/process/metric/gauges_test.go (100%) rename {component => internal/component}/loki/process/metric/histograms.go (100%) rename {component => internal/component}/loki/process/metric/histograms_test.go (100%) rename {component => internal/component}/loki/process/metric/metricvec.go (100%) rename {component => internal/component}/loki/process/process.go (96%) rename {component => internal/component}/loki/process/process_test.go (97%) rename {component => internal/component}/loki/process/stages/decolorize.go (100%) rename {component => internal/component}/loki/process/stages/decolorize_test.go (100%) rename {component => internal/component}/loki/process/stages/drop.go (99%) rename {component => internal/component}/loki/process/stages/drop_test.go (99%) rename {component => internal/component}/loki/process/stages/eventlogmessage.go (98%) rename {component => internal/component}/loki/process/stages/eventlogmessage_test.go (100%) rename {component => internal/component}/loki/process/stages/extensions.go (98%) rename {component => internal/component}/loki/process/stages/extensions_test.go (100%) rename {component => internal/component}/loki/process/stages/geoip.go (99%) rename {component => internal/component}/loki/process/stages/geoip_test.go (100%) rename {component => internal/component}/loki/process/stages/inspector.go (100%) rename {component => internal/component}/loki/process/stages/json.go (98%) rename {component => internal/component}/loki/process/stages/json_test.go (99%) rename {component => internal/component}/loki/process/stages/label_drop.go (100%) rename {component => internal/component}/loki/process/stages/label_drop_test.go (100%) rename {component => internal/component}/loki/process/stages/label_keep.go (100%) rename {component => internal/component}/loki/process/stages/label_keep_test.go (100%) rename {component => internal/component}/loki/process/stages/labels.go (97%) rename {component => internal/component}/loki/process/stages/labels_test.go (100%) rename {component => internal/component}/loki/process/stages/limit.go (98%) rename {component => internal/component}/loki/process/stages/limit_test.go (100%) rename {component => internal/component}/loki/process/stages/logfmt.go (98%) rename {component => internal/component}/loki/process/stages/logfmt_test.go (99%) rename {component => internal/component}/loki/process/stages/match.go (100%) rename {component => internal/component}/loki/process/stages/match_test.go (99%) rename {component => internal/component}/loki/process/stages/metric.go (98%) rename {component => internal/component}/loki/process/stages/metric_test.go (99%) rename {component => internal/component}/loki/process/stages/multiline.go (97%) rename {component => internal/component}/loki/process/stages/multiline_test.go (97%) rename {component => internal/component}/loki/process/stages/output.go (96%) rename {component => internal/component}/loki/process/stages/output_test.go (98%) rename {component => internal/component}/loki/process/stages/pack.go (98%) rename {component => internal/component}/loki/process/stages/pack_test.go (98%) rename {component => internal/component}/loki/process/stages/pipeline.go (99%) rename {component => internal/component}/loki/process/stages/pipeline_test.go (98%) rename {component => internal/component}/loki/process/stages/regex.go (98%) rename {component => internal/component}/loki/process/stages/regex_test.go (99%) rename {component => internal/component}/loki/process/stages/replace.go (99%) rename {component => internal/component}/loki/process/stages/replace_test.go (99%) rename {component => internal/component}/loki/process/stages/sampling.go (100%) rename {component => internal/component}/loki/process/stages/sampling_test.go (100%) rename {component => internal/component}/loki/process/stages/stage.go (99%) rename {component => internal/component}/loki/process/stages/static_labels.go (97%) rename {component => internal/component}/loki/process/stages/static_labels_test.go (100%) rename {component => internal/component}/loki/process/stages/structured_metadata.go (100%) rename {component => internal/component}/loki/process/stages/structured_metadata_test.go (100%) rename {component => internal/component}/loki/process/stages/template.go (98%) rename {component => internal/component}/loki/process/stages/template_test.go (100%) rename {component => internal/component}/loki/process/stages/tenant.go (98%) rename {component => internal/component}/loki/process/stages/tenant_test.go (100%) rename {component => internal/component}/loki/process/stages/testdata/geoip_maxmind_asn.mmdb (100%) rename {component => internal/component}/loki/process/stages/testdata/geoip_maxmind_city.mmdb (100%) rename {component => internal/component}/loki/process/stages/testdata/geoip_maxmind_country.mmdb (100%) rename {component => internal/component}/loki/process/stages/testdata/geoip_source.json (100%) rename {component => internal/component}/loki/process/stages/timestamp.go (99%) rename {component => internal/component}/loki/process/stages/timestamp_test.go (99%) rename {component => internal/component}/loki/process/stages/util.go (100%) rename {component => internal/component}/loki/process/stages/util_test.go (99%) rename {component => internal/component}/loki/relabel/metrics.go (100%) rename {component => internal/component}/loki/relabel/relabel.go (96%) rename {component => internal/component}/loki/relabel/relabel_test.go (96%) rename {component => internal/component}/loki/rules/kubernetes/debug.go (100%) rename {component => internal/component}/loki/rules/kubernetes/diff.go (100%) rename {component => internal/component}/loki/rules/kubernetes/diff_test.go (100%) rename {component => internal/component}/loki/rules/kubernetes/events.go (99%) rename {component => internal/component}/loki/rules/kubernetes/events_test.go (98%) rename {component => internal/component}/loki/rules/kubernetes/health.go (92%) rename {component => internal/component}/loki/rules/kubernetes/rules.go (98%) rename {component => internal/component}/loki/rules/kubernetes/rules_test.go (100%) rename {component => internal/component}/loki/rules/kubernetes/types.go (96%) rename {component => internal/component}/loki/source/api/api.go (92%) rename {component => internal/component}/loki/source/api/api_test.go (96%) rename {component => internal/component}/loki/source/api/internal/lokipush/push_api_server.go (96%) rename {component => internal/component}/loki/source/api/internal/lokipush/push_api_server_test.go (96%) rename {component => internal/component}/loki/source/aws_firehose/component.go (93%) rename {component => internal/component}/loki/source/aws_firehose/component_test.go (96%) rename {component => internal/component}/loki/source/aws_firehose/internal/errors.go (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/handler.go (97%) rename {component => internal/component}/loki/source/aws_firehose/internal/handler_test.go (99%) rename {component => internal/component}/loki/source/aws_firehose/internal/metrics.go (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/model.go (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/testdata/cw_logs_control_and_bad_records.json (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/testdata/cw_logs_mixed.json (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_control_messages.json (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_data_messages.json (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/testdata/direct_put.json (100%) rename {component => internal/component}/loki/source/aws_firehose/internal/testdata/direct_put_with_non_json_message.json (100%) rename {component => internal/component}/loki/source/azure_event_hubs/azure_event_hubs.go (94%) rename {component => internal/component}/loki/source/azure_event_hubs/azure_event_hubs_test.go (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/parser.go (99%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/parser_test.go (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/custom_message_and_logic_app_logs.json (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json.json (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_array.json (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_string.json (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_text.txt (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/function_app_logs_message.txt (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/logic_app_logs_message.json (100%) rename {component => internal/component}/loki/source/azure_event_hubs/internal/parser/testdata/message_with_invalid_time.json (100%) rename {component => internal/component}/loki/source/cloudflare/cloudflare.go (94%) rename {component => internal/component}/loki/source/cloudflare/internal/cloudflaretarget/client.go (100%) rename {component => internal/component}/loki/source/cloudflare/internal/cloudflaretarget/fields.go (100%) rename {component => internal/component}/loki/source/cloudflare/internal/cloudflaretarget/fields_test.go (100%) rename {component => internal/component}/loki/source/cloudflare/internal/cloudflaretarget/metrics.go (100%) rename {component => internal/component}/loki/source/cloudflare/internal/cloudflaretarget/target.go (97%) rename {component => internal/component}/loki/source/cloudflare/internal/cloudflaretarget/target_test.go (98%) rename {component => internal/component}/loki/source/cloudflare/internal/cloudflaretarget/util_test.go (100%) rename {component => internal/component}/loki/source/docker/docker.go (94%) rename {component => internal/component}/loki/source/docker/docker_test.go (92%) rename {component => internal/component}/loki/source/docker/internal/dockertarget/metrics.go (100%) rename {component => internal/component}/loki/source/docker/internal/dockertarget/target.go (97%) rename {component => internal/component}/loki/source/docker/internal/dockertarget/target_test.go (97%) rename {component => internal/component}/loki/source/docker/internal/dockertarget/testdata/flog.log (100%) rename {component => internal/component}/loki/source/docker/internal/dockertarget/testdata/flog_after_restart.log (100%) rename {component => internal/component}/loki/source/docker/runner.go (95%) rename {component => internal/component}/loki/source/file/compression_format.go (100%) rename {component => internal/component}/loki/source/file/decompresser.go (97%) rename {component => internal/component}/loki/source/file/decompresser_test.go (97%) rename {component => internal/component}/loki/source/file/file.go (97%) rename {component => internal/component}/loki/source/file/file_test.go (96%) rename {component => internal/component}/loki/source/file/metrics.go (100%) rename {component => internal/component}/loki/source/file/reader.go (100%) rename {component => internal/component}/loki/source/file/tailer.go (98%) rename {component => internal/component}/loki/source/file/tailer_test.go (100%) rename {component => internal/component}/loki/source/file/testdata/long-access.gz (100%) rename {component => internal/component}/loki/source/file/testdata/long-access.tar.gz (100%) rename {component => internal/component}/loki/source/file/testdata/onelinelog.log (100%) rename {component => internal/component}/loki/source/file/testdata/onelinelog.log.bz2 (100%) rename {component => internal/component}/loki/source/file/testdata/onelinelog.log.gz (100%) rename {component => internal/component}/loki/source/file/testdata/onelinelog.tar.gz (100%) rename {component => internal/component}/loki/source/file/testdata/short-access.log (100%) rename {component => internal/component}/loki/source/file/testdata/short-access.tar.gz (100%) rename {component => internal/component}/loki/source/gcplog/gcplog.go (91%) rename {component => internal/component}/loki/source/gcplog/gcplog_test.go (92%) rename {component => internal/component}/loki/source/gcplog/gcptypes/gcptypes.go (95%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/formatter.go (98%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/formatter_test.go (100%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/metrics.go (100%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/pull_target.go (95%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/pull_target_test.go (97%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/push_target.go (95%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/push_target_test.go (98%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/push_translation.go (98%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/push_translation_test.go (100%) rename {component => internal/component}/loki/source/gcplog/internal/gcplogtarget/types.go (100%) rename {component => internal/component}/loki/source/gelf/gelf.go (92%) rename {component => internal/component}/loki/source/gelf/gelf_test.go (90%) rename {component => internal/component}/loki/source/gelf/internal/target/gelftarget.go (97%) rename {component => internal/component}/loki/source/gelf/internal/target/metrics.go (100%) rename {component => internal/component}/loki/source/heroku/heroku.go (92%) rename {component => internal/component}/loki/source/heroku/heroku_test.go (95%) rename {component => internal/component}/loki/source/heroku/internal/herokutarget/herokutarget.go (96%) rename {component => internal/component}/loki/source/heroku/internal/herokutarget/metrics.go (100%) rename {component => internal/component}/loki/source/heroku/internal/herokutarget/target_test.go (99%) rename {component => internal/component}/loki/source/internal/kafkatarget/authentication.go (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/config.go (98%) rename {component => internal/component}/loki/source/internal/kafkatarget/consumer.go (98%) rename {component => internal/component}/loki/source/internal/kafkatarget/consumer_test.go (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/formatter.go (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/kafkatarget.go (97%) rename {component => internal/component}/loki/source/internal/kafkatarget/kafkatarget_test.go (99%) rename {component => internal/component}/loki/source/internal/kafkatarget/oauth_provider.go (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/parser.go (92%) rename {component => internal/component}/loki/source/internal/kafkatarget/target_syncer.go (98%) rename {component => internal/component}/loki/source/internal/kafkatarget/target_syncer_test.go (99%) rename {component => internal/component}/loki/source/internal/kafkatarget/testdata/example.com-key.pem (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/testdata/example.com.ca.pem (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/testdata/example.com.pem (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/topics.go (100%) rename {component => internal/component}/loki/source/internal/kafkatarget/topics_test.go (100%) rename {component => internal/component}/loki/source/journal/internal/target/journaltarget.go (98%) rename {component => internal/component}/loki/source/journal/internal/target/journaltarget_test.go (98%) rename {component => internal/component}/loki/source/journal/internal/target/metrics.go (100%) rename {component => internal/component}/loki/source/journal/journal.go (90%) rename {component => internal/component}/loki/source/journal/journal_stub.go (91%) rename {component => internal/component}/loki/source/journal/journal_test.go (88%) rename {component => internal/component}/loki/source/journal/types.go (85%) rename {component => internal/component}/loki/source/kafka/kafka.go (94%) rename {component => internal/component}/loki/source/kafka/kafka_test.go (100%) rename {component => internal/component}/loki/source/kubernetes/kubernetes.go (93%) rename {component => internal/component}/loki/source/kubernetes/kubernetes_test.go (100%) rename {component => internal/component}/loki/source/kubernetes/kubetail/container_utils.go (100%) rename {component => internal/component}/loki/source/kubernetes/kubetail/kubetail.go (95%) rename {component => internal/component}/loki/source/kubernetes/kubetail/tail_utils.go (100%) rename {component => internal/component}/loki/source/kubernetes/kubetail/tail_utils_test.go (100%) rename {component => internal/component}/loki/source/kubernetes/kubetail/tailer.go (98%) rename {component => internal/component}/loki/source/kubernetes/kubetail/tailer_test.go (100%) rename {component => internal/component}/loki/source/kubernetes/kubetail/target.go (100%) rename {component => internal/component}/loki/source/kubernetes_events/event_controller.go (97%) rename {component => internal/component}/loki/source/kubernetes_events/kubernetes_events.go (94%) rename {component => internal/component}/loki/source/podlogs/controller.go (96%) rename {component => internal/component}/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go (100%) rename {component => internal/component}/loki/source/podlogs/internal/apis/monitoring/v1alpha2/group.go (100%) rename {component => internal/component}/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go (100%) rename {component => internal/component}/loki/source/podlogs/internal/apis/monitoring/v1alpha2/zz_generated.deepcopy.go (100%) rename {component => internal/component}/loki/source/podlogs/podlogs.go (93%) rename {component => internal/component}/loki/source/podlogs/podlogs_test.go (100%) rename {component => internal/component}/loki/source/podlogs/reconciler.go (97%) rename {component => internal/component}/loki/source/podlogs/relabel.go (100%) rename {component => internal/component}/loki/source/syslog/internal/syslogtarget/metrics.go (100%) rename {component => internal/component}/loki/source/syslog/internal/syslogtarget/syslogtarget.go (98%) rename {component => internal/component}/loki/source/syslog/internal/syslogtarget/syslogtarget_test.go (99%) rename {component => internal/component}/loki/source/syslog/internal/syslogtarget/transport.go (99%) rename {component => internal/component}/loki/source/syslog/syslog.go (92%) rename {component => internal/component}/loki/source/syslog/syslog_test.go (96%) rename {component => internal/component}/loki/source/syslog/types.go (93%) rename {component => internal/component}/loki/source/windowsevent/arguments.go (96%) rename {component => internal/component}/loki/source/windowsevent/bookmark.go (100%) rename {component => internal/component}/loki/source/windowsevent/component_stub.go (89%) rename {component => internal/component}/loki/source/windowsevent/component_test.go (92%) rename {component => internal/component}/loki/source/windowsevent/component_windows.go (95%) rename {component => internal/component}/loki/source/windowsevent/format.go (100%) rename {component => internal/component}/loki/source/windowsevent/target.go (100%) rename {component => internal/component}/loki/write/types.go (95%) rename {component => internal/component}/loki/write/write.go (95%) rename {component => internal/component}/loki/write/write_test.go (97%) rename {component => internal/component}/metadata/metadata.go (93%) rename {component => internal/component}/metadata/metadata_test.go (100%) rename {component => internal/component}/mimir/rules/kubernetes/debug.go (100%) rename {component => internal/component}/mimir/rules/kubernetes/diff.go (100%) rename {component => internal/component}/mimir/rules/kubernetes/diff_test.go (100%) rename {component => internal/component}/mimir/rules/kubernetes/events.go (99%) rename {component => internal/component}/mimir/rules/kubernetes/events_test.go (98%) rename {component => internal/component}/mimir/rules/kubernetes/health.go (92%) rename {component => internal/component}/mimir/rules/kubernetes/rules.go (98%) rename {component => internal/component}/mimir/rules/kubernetes/rules_test.go (100%) rename {component => internal/component}/mimir/rules/kubernetes/types.go (96%) rename {component => internal/component}/module/file/file.go (96%) rename {component => internal/component}/module/git/git.go (97%) rename {component => internal/component}/module/http/http.go (96%) rename {component => internal/component}/module/module.go (96%) rename {component => internal/component}/module/string/string.go (94%) rename {component => internal/component}/otelcol/auth/auth.go (94%) rename {component => internal/component}/otelcol/auth/auth_test.go (89%) rename {component => internal/component}/otelcol/auth/basic/basic.go (94%) rename {component => internal/component}/otelcol/auth/basic/basic_test.go (91%) rename {component => internal/component}/otelcol/auth/bearer/bearer.go (94%) rename {component => internal/component}/otelcol/auth/bearer/bearer_test.go (93%) rename {component => internal/component}/otelcol/auth/headers/headers.go (97%) rename {component => internal/component}/otelcol/auth/headers/headers_test.go (95%) rename {component => internal/component}/otelcol/auth/oauth2/oauth2.go (93%) rename {component => internal/component}/otelcol/auth/oauth2/oauth2_test.go (95%) rename {component => internal/component}/otelcol/auth/sigv4/sigv4.go (95%) rename {component => internal/component}/otelcol/auth/sigv4/sigv4_test.go (96%) rename {component => internal/component}/otelcol/config_attraction.go (100%) rename {component => internal/component}/otelcol/config_attraction_test.go (95%) rename {component => internal/component}/otelcol/config_compression.go (100%) rename {component => internal/component}/otelcol/config_debug_metrics.go (100%) rename {component => internal/component}/otelcol/config_filter.go (100%) rename {component => internal/component}/otelcol/config_filter_test.go (99%) rename {component => internal/component}/otelcol/config_grpc.go (99%) rename {component => internal/component}/otelcol/config_http.go (98%) rename {component => internal/component}/otelcol/config_k8s.go (100%) rename {component => internal/component}/otelcol/config_queue.go (100%) rename {component => internal/component}/otelcol/config_retry.go (100%) rename {component => internal/component}/otelcol/config_scrape.go (100%) rename {component => internal/component}/otelcol/config_timeout.go (100%) rename {component => internal/component}/otelcol/config_tls.go (100%) rename {component => internal/component}/otelcol/connector/connector.go (91%) rename {component => internal/component}/otelcol/connector/host_info/config.go (100%) rename {component => internal/component}/otelcol/connector/host_info/config_test.go (100%) rename {component => internal/component}/otelcol/connector/host_info/connector.go (100%) rename {component => internal/component}/otelcol/connector/host_info/connector_test.go (100%) rename {component => internal/component}/otelcol/connector/host_info/factory.go (100%) rename {component => internal/component}/otelcol/connector/host_info/factory_test.go (100%) rename {component => internal/component}/otelcol/connector/host_info/host_info.go (94%) rename {component => internal/component}/otelcol/connector/host_info/host_info_test.go (100%) rename {component => internal/component}/otelcol/connector/host_info/host_metrics.go (100%) rename {component => internal/component}/otelcol/connector/host_info/host_metrics_test.go (100%) rename {component => internal/component}/otelcol/connector/servicegraph/servicegraph.go (97%) rename {component => internal/component}/otelcol/connector/servicegraph/servicegraph_test.go (97%) rename {component => internal/component}/otelcol/connector/spanlogs/consumer.go (100%) rename {component => internal/component}/otelcol/connector/spanlogs/spanlogs.go (91%) rename {component => internal/component}/otelcol/connector/spanlogs/spanlogs_test.go (98%) rename {component => internal/component}/otelcol/connector/spanmetrics/spanmetrics.go (97%) rename {component => internal/component}/otelcol/connector/spanmetrics/spanmetrics_test.go (98%) rename {component => internal/component}/otelcol/connector/spanmetrics/types.go (100%) rename {component => internal/component}/otelcol/consumer.go (100%) rename {component => internal/component}/otelcol/exporter/exporter.go (93%) rename {component => internal/component}/otelcol/exporter/exporter_test.go (95%) rename {component => internal/component}/otelcol/exporter/loadbalancing/loadbalancing.go (97%) rename {component => internal/component}/otelcol/exporter/loadbalancing/loadbalancing_test.go (98%) rename {component => internal/component}/otelcol/exporter/logging/logging.go (93%) rename {component => internal/component}/otelcol/exporter/loki/internal/convert/convert.go (96%) rename {component => internal/component}/otelcol/exporter/loki/internal/convert/convert_test.go (97%) rename {component => internal/component}/otelcol/exporter/loki/internal/convert/metrics.go (100%) rename {component => internal/component}/otelcol/exporter/loki/loki.go (84%) rename {component => internal/component}/otelcol/exporter/otlp/otlp.go (95%) rename {component => internal/component}/otelcol/exporter/otlp/otlp_test.go (94%) rename {component => internal/component}/otelcol/exporter/otlphttp/otlphttp.go (96%) rename {component => internal/component}/otelcol/exporter/otlphttp/otlphttp_test.go (93%) rename {component => internal/component}/otelcol/exporter/prometheus/internal/convert/cache.go (100%) rename {component => internal/component}/otelcol/exporter/prometheus/internal/convert/convert.go (99%) rename {component => internal/component}/otelcol/exporter/prometheus/internal/convert/convert_test.go (99%) rename {component => internal/component}/otelcol/exporter/prometheus/internal/convert/histograms.go (100%) rename {component => internal/component}/otelcol/exporter/prometheus/prometheus.go (92%) rename {component => internal/component}/otelcol/exporter/prometheus/prometheus_test.go (96%) rename {component => internal/component}/otelcol/extension/extension.go (93%) rename {component => internal/component}/otelcol/extension/extension_test.go (89%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/README.md (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension.go (95%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/internal_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_store.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/config.yaml (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/strategy.json (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/README.md (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/constants.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store_test.go (100%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go (93%) rename {component => internal/component}/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go (96%) rename {component => internal/component}/otelcol/internal/fakeconsumer/fake.go (97%) rename {component => internal/component}/otelcol/internal/fanoutconsumer/logs.go (97%) rename {component => internal/component}/otelcol/internal/fanoutconsumer/metrics.go (97%) rename {component => internal/component}/otelcol/internal/fanoutconsumer/traces.go (97%) rename {component => internal/component}/otelcol/internal/lazycollector/lazycollector.go (100%) rename {component => internal/component}/otelcol/internal/lazyconsumer/lazyconsumer.go (100%) rename {component => internal/component}/otelcol/internal/scheduler/host.go (97%) rename {component => internal/component}/otelcol/internal/scheduler/scheduler.go (97%) rename {component => internal/component}/otelcol/internal/scheduler/scheduler_test.go (95%) rename {component => internal/component}/otelcol/internal/views/views.go (100%) rename {component => internal/component}/otelcol/processor/attributes/attributes.go (94%) rename {component => internal/component}/otelcol/processor/attributes/attributes_test.go (99%) rename {component => internal/component}/otelcol/processor/batch/batch.go (94%) rename {component => internal/component}/otelcol/processor/batch/batch_test.go (93%) rename {component => internal/component}/otelcol/processor/discovery/discovery.go (90%) rename {component => internal/component}/otelcol/processor/discovery/discovery_test.go (96%) rename {component => internal/component}/otelcol/processor/filter/filter.go (94%) rename {component => internal/component}/otelcol/processor/filter/filter_test.go (98%) rename {component => internal/component}/otelcol/processor/filter/types.go (100%) rename {component => internal/component}/otelcol/processor/k8sattributes/k8sattributes.go (94%) rename {component => internal/component}/otelcol/processor/k8sattributes/k8sattributes_test.go (99%) rename {component => internal/component}/otelcol/processor/k8sattributes/types.go (100%) rename {component => internal/component}/otelcol/processor/memorylimiter/memorylimiter.go (95%) rename {component => internal/component}/otelcol/processor/memorylimiter/memorylimiter_test.go (88%) rename {component => internal/component}/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go (94%) rename {component => internal/component}/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go (93%) rename {component => internal/component}/otelcol/processor/processor.go (92%) rename {component => internal/component}/otelcol/processor/processor_test.go (94%) rename {component => internal/component}/otelcol/processor/processortest/compare_signals.go (100%) rename {component => internal/component}/otelcol/processor/processortest/compare_signals_test.go (100%) rename {component => internal/component}/otelcol/processor/processortest/processortest.go (96%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/aws/ec2/config.go (96%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/aws/ecs/config.go (97%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/aws/eks/config.go (90%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go (94%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/aws/lambda/config.go (95%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/azure/aks/config.go (90%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/azure/config.go (96%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/consul/config.go (96%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/docker/config.go (90%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/gcp/config.go (97%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/heroku/config.go (95%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/k8snode/config.go (93%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/openshift/config.go (92%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go (100%) rename {component => internal/component}/otelcol/processor/resourcedetection/internal/system/config.go (96%) rename {component => internal/component}/otelcol/processor/resourcedetection/resourcedetection.go (82%) rename {component => internal/component}/otelcol/processor/resourcedetection/resourcedetection_test.go (97%) rename {component => internal/component}/otelcol/processor/span/span.go (97%) rename {component => internal/component}/otelcol/processor/span/span_test.go (98%) rename {component => internal/component}/otelcol/processor/tail_sampling/tail_sampling.go (94%) rename {component => internal/component}/otelcol/processor/tail_sampling/tail_sampling_test.go (97%) rename {component => internal/component}/otelcol/processor/tail_sampling/types.go (100%) rename {component => internal/component}/otelcol/processor/transform/transform.go (96%) rename {component => internal/component}/otelcol/processor/transform/transform_test.go (99%) rename {component => internal/component}/otelcol/receiver/jaeger/jaeger.go (97%) rename {component => internal/component}/otelcol/receiver/jaeger/jaeger_test.go (94%) rename {component => internal/component}/otelcol/receiver/kafka/kafka.go (98%) rename {component => internal/component}/otelcol/receiver/kafka/kafka_test.go (98%) rename {component => internal/component}/otelcol/receiver/loki/loki.go (93%) rename {component => internal/component}/otelcol/receiver/loki/loki_test.go (91%) rename {component => internal/component}/otelcol/receiver/opencensus/opencensus.go (93%) rename {component => internal/component}/otelcol/receiver/opencensus/opencensus_test.go (93%) rename {component => internal/component}/otelcol/receiver/otlp/otlp.go (96%) rename {component => internal/component}/otelcol/receiver/otlp/otlp_test.go (93%) rename {component => internal/component}/otelcol/receiver/otlp/testdata/payload.json (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/appendable.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/doc.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/logger.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/logger_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/metadata.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/metricfamily.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/metricfamily_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/metrics_adjuster.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/metrics_adjuster_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/metricsutil_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/prom_to_otlp.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/prom_to_otlp_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/staleness_end_to_end_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/starttimemetricadjuster.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/starttimemetricadjuster_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/transaction.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/transaction_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/util.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/internal/util_test.go (100%) rename {component => internal/component}/otelcol/receiver/prometheus/prometheus.go (92%) rename {component => internal/component}/otelcol/receiver/prometheus/prometheus_test.go (92%) rename {component => internal/component}/otelcol/receiver/receiver.go (91%) rename {component => internal/component}/otelcol/receiver/receiver_test.go (91%) rename {component => internal/component}/otelcol/receiver/vcenter/vcenter.go (99%) rename {component => internal/component}/otelcol/receiver/vcenter/vcenter_test.go (98%) rename {component => internal/component}/otelcol/receiver/zipkin/zipkin.go (93%) rename {component => internal/component}/otelcol/receiver/zipkin/zipkin_test.go (93%) rename {component => internal/component}/prometheus/exporter/apache/apache.go (85%) rename {component => internal/component}/prometheus/exporter/azure/azure.go (93%) rename {component => internal/component}/prometheus/exporter/blackbox/blackbox.go (91%) rename {component => internal/component}/prometheus/exporter/blackbox/blackbox_test.go (98%) rename {component => internal/component}/prometheus/exporter/cadvisor/cadvisor.go (95%) rename {component => internal/component}/prometheus/exporter/cadvisor/cadvisor_test.go (98%) rename {component => internal/component}/prometheus/exporter/cloudwatch/cloudwatch.go (81%) rename {component => internal/component}/prometheus/exporter/cloudwatch/config.go (99%) rename {component => internal/component}/prometheus/exporter/cloudwatch/config_test.go (100%) rename {component => internal/component}/prometheus/exporter/consul/consul.go (91%) rename {component => internal/component}/prometheus/exporter/dnsmasq/dnsmasq.go (86%) rename {component => internal/component}/prometheus/exporter/dnsmasq/dnsmasq_test.go (93%) rename {component => internal/component}/prometheus/exporter/elasticsearch/elasticsearch.go (91%) rename {component => internal/component}/prometheus/exporter/elasticsearch/elasticsearch_test.go (95%) rename {component => internal/component}/prometheus/exporter/exporter.go (95%) rename {component => internal/component}/prometheus/exporter/gcp/gcp.go (89%) rename {component => internal/component}/prometheus/exporter/gcp/gcp_test.go (100%) rename {component => internal/component}/prometheus/exporter/github/github.go (87%) rename {component => internal/component}/prometheus/exporter/github/github_test.go (100%) rename {component => internal/component}/prometheus/exporter/kafka/kafka.go (93%) rename {component => internal/component}/prometheus/exporter/kafka/kafka_test.go (96%) rename {component => internal/component}/prometheus/exporter/memcached/memcached.go (85%) rename {component => internal/component}/prometheus/exporter/memcached/memcached_test.go (93%) rename {component => internal/component}/prometheus/exporter/mongodb/mongodb.go (84%) rename {component => internal/component}/prometheus/exporter/mongodb/mongodb_test.go (94%) rename {component => internal/component}/prometheus/exporter/mssql/mssql.go (89%) rename {component => internal/component}/prometheus/exporter/mssql/mssql_test.go (99%) rename {component => internal/component}/prometheus/exporter/mysql/mysql.go (96%) rename {component => internal/component}/prometheus/exporter/mysql/mysql_test.go (98%) rename {component => internal/component}/prometheus/exporter/oracledb/oracledb.go (90%) rename {component => internal/component}/prometheus/exporter/oracledb/oracledb_test.go (97%) rename {component => internal/component}/prometheus/exporter/postgres/postgres.go (93%) rename {component => internal/component}/prometheus/exporter/postgres/postgres_test.go (97%) rename {component => internal/component}/prometheus/exporter/process/process.go (90%) rename {component => internal/component}/prometheus/exporter/process/process_test.go (100%) rename {component => internal/component}/prometheus/exporter/redis/redis.go (96%) rename {component => internal/component}/prometheus/exporter/redis/redis_test.go (98%) rename {component => internal/component}/prometheus/exporter/self/self.go (82%) rename {component => internal/component}/prometheus/exporter/snmp/snmp.go (93%) rename {component => internal/component}/prometheus/exporter/snmp/snmp_test.go (98%) rename {component => internal/component}/prometheus/exporter/snowflake/snowflake.go (86%) rename {component => internal/component}/prometheus/exporter/snowflake/snowflake_test.go (94%) rename {component => internal/component}/prometheus/exporter/squid/squid.go (86%) rename {component => internal/component}/prometheus/exporter/squid/squid_test.go (97%) rename {component => internal/component}/prometheus/exporter/statsd/config.go (95%) rename {component => internal/component}/prometheus/exporter/statsd/statsd.go (79%) rename {component => internal/component}/prometheus/exporter/statsd/statsd_test.go (100%) rename {component => internal/component}/prometheus/exporter/statsd/testdata/mapTest.yaml (100%) rename {component => internal/component}/prometheus/exporter/unix/config.go (98%) rename {component => internal/component}/prometheus/exporter/unix/unix.go (77%) rename {component => internal/component}/prometheus/exporter/vsphere/vsphere.go (89%) rename {component => internal/component}/prometheus/exporter/vsphere/vsphere_test.go (95%) rename {component => internal/component}/prometheus/exporter/windows/config.go (98%) rename {component => internal/component}/prometheus/exporter/windows/config_default_windows_test.go (100%) rename {component => internal/component}/prometheus/exporter/windows/config_windows.go (96%) rename {component => internal/component}/prometheus/exporter/windows/windows.go (77%) rename {component => internal/component}/prometheus/exporter/windows/windows_test.go (100%) rename {component => internal/component}/prometheus/fanout.go (99%) rename {component => internal/component}/prometheus/fanout_test.go (93%) rename {component => internal/component}/prometheus/interceptor.go (99%) rename {component => internal/component}/prometheus/operator/common/component.go (93%) rename {component => internal/component}/prometheus/operator/common/crdmanager.go (97%) rename {component => internal/component}/prometheus/operator/common/crdmanager_test.go (95%) rename {component => internal/component}/prometheus/operator/common/interfaces.go (100%) rename {component => internal/component}/prometheus/operator/configgen/config_gen.go (97%) rename {component => internal/component}/prometheus/operator/configgen/config_gen_podmonitor.go (100%) rename {component => internal/component}/prometheus/operator/configgen/config_gen_podmonitor_test.go (98%) rename {component => internal/component}/prometheus/operator/configgen/config_gen_probe.go (100%) rename {component => internal/component}/prometheus/operator/configgen/config_gen_probe_test.go (97%) rename {component => internal/component}/prometheus/operator/configgen/config_gen_servicemonitor.go (100%) rename {component => internal/component}/prometheus/operator/configgen/config_gen_servicemonitor_test.go (98%) rename {component => internal/component}/prometheus/operator/configgen/config_gen_test.go (97%) rename {component => internal/component}/prometheus/operator/configgen/secrets.go (100%) rename {component => internal/component}/prometheus/operator/podmonitors/operator.go (69%) rename {component => internal/component}/prometheus/operator/probes/probes.go (68%) rename {component => internal/component}/prometheus/operator/servicemonitors/servicemonitors.go (69%) rename {component => internal/component}/prometheus/operator/types.go (88%) rename {component => internal/component}/prometheus/operator/types_test.go (100%) rename {component => internal/component}/prometheus/receive_http/receive_http.go (91%) rename {component => internal/component}/prometheus/receive_http/receive_http_test.go (97%) rename {component => internal/component}/prometheus/relabel/relabel.go (97%) rename {component => internal/component}/prometheus/relabel/relabel_test.go (95%) rename {component => internal/component}/prometheus/remotewrite/cli.go (99%) rename {component => internal/component}/prometheus/remotewrite/remote_write.go (96%) rename {component => internal/component}/prometheus/remotewrite/remote_write_test.go (97%) rename {component => internal/component}/prometheus/remotewrite/types.go (98%) rename {component => internal/component}/prometheus/remotewrite/types_test.go (100%) rename {component => internal/component}/prometheus/scrape/scrape.go (96%) rename {component => internal/component}/prometheus/scrape/scrape_test.go (95%) rename {component => internal/component}/pyroscope/appender.go (100%) rename {component => internal/component}/pyroscope/appender_test.go (100%) rename {component => internal/component}/pyroscope/ebpf/args.go (91%) rename {component => internal/component}/pyroscope/ebpf/ebpf_linux.go (97%) rename {component => internal/component}/pyroscope/ebpf/ebpf_linux_test.go (97%) rename {component => internal/component}/pyroscope/ebpf/ebpf_placeholder.go (90%) rename {component => internal/component}/pyroscope/ebpf/metrics.go (100%) rename {component => internal/component}/pyroscope/java/args.go (90%) rename {component => internal/component}/pyroscope/java/asprof/asprof.go (100%) rename {component => internal/component}/pyroscope/java/asprof/asprof_linux_amd64.go (100%) rename {component => internal/component}/pyroscope/java/asprof/asprof_linux_arm64.go (100%) rename {component => internal/component}/pyroscope/java/asprof/asprof_test.go (100%) rename {component => internal/component}/pyroscope/java/asprof/async-profiler-3.0-linux-arm64.tar.gz (100%) rename {component => internal/component}/pyroscope/java/asprof/async-profiler-3.0-linux-x64.tar.gz (100%) rename {component => internal/component}/pyroscope/java/asprof/extract.go (100%) rename {component => internal/component}/pyroscope/java/java.go (92%) rename {component => internal/component}/pyroscope/java/java_stub.go (88%) rename {component => internal/component}/pyroscope/java/loop.go (96%) rename {component => internal/component}/pyroscope/java/target.go (94%) rename {component => internal/component}/pyroscope/scrape/delta_profiles.go (96%) rename {component => internal/component}/pyroscope/scrape/delta_profiles_test.go (98%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/Makefile (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/delta_map.go (98%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/fd.go (99%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/fd_test.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/fuzz_test.go (88%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/hasher.go (96%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/location_index.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/location_index_test.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/set.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/string_table.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/big-heap.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/block.after.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/block.before.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/0f7209b356e13da8388f52dba89dfc4669e45654f23e8446fd5292fa1bb62cf3 (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/6281ce98ad6bb944a23bb21f7597f91ae767be28cf9ebfaaa40e3d1454c12be3 (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/74a0704b407ac210d9de0d409cba6bd17597ba4e67e73fcf7bdffa31438ac64f (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/76b05762f4f652d9c3b8aeaf7c0301e0be9045945811b270c33d4f0a2760eea2 (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/aafd8cbacf61de60d2748f9d49fb622c32f7f885b5a651355a7350b2fbd4bad8 (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/d4fd55d49c674b8963a355107bfd2fb13eb81289831066a0b9f16190c2592c8a (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/eec2ef2090730346d172334a24dee416e17c1511472fb808f3f9b4d68a46e3e5 (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/f06e6fad1d62671c4b62ece89e9d85da6bd270176ce44ec809c52607cdc58680 (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/heap.after.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/heap.before.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/heap.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.after.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.before.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.after.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.before.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.after.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.before.pprof (100%) rename {component => internal/component}/pyroscope/scrape/internal/pproflite/decoder.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/pproflite/encoder.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/pproflite/pproflite.go (100%) rename {component => internal/component}/pyroscope/scrape/internal/pproflite/pproflite_test.go (96%) rename {component => internal/component}/pyroscope/scrape/internal/pproflite/testdata/heap.pprof (100%) rename {component => internal/component}/pyroscope/scrape/manager.go (97%) rename {component => internal/component}/pyroscope/scrape/manager_test.go (95%) rename {component => internal/component}/pyroscope/scrape/scrape.go (96%) rename {component => internal/component}/pyroscope/scrape/scrape_loop.go (98%) rename {component => internal/component}/pyroscope/scrape/scrape_loop_test.go (98%) rename {component => internal/component}/pyroscope/scrape/scrape_test.go (95%) rename {component => internal/component}/pyroscope/scrape/target.go (100%) rename {component => internal/component}/pyroscope/scrape/target_test.go (100%) rename {component => internal/component}/pyroscope/write/metrics.go (100%) rename {component => internal/component}/pyroscope/write/write.go (97%) rename {component => internal/component}/pyroscope/write/write_test.go (98%) rename {component => internal/component}/registry.go (100%) rename {component => internal/component}/registry_test.go (100%) rename {component => internal/component}/remote/http/http.go (97%) rename {component => internal/component}/remote/http/http_test.go (94%) rename {component => internal/component}/remote/kubernetes/configmap/configmap.go (81%) rename {component => internal/component}/remote/kubernetes/kubernetes.go (98%) rename {component => internal/component}/remote/kubernetes/kubernetes_test.go (100%) rename {component => internal/component}/remote/kubernetes/secret/secret.go (81%) rename {component => internal/component}/remote/s3/s3.go (99%) rename {component => internal/component}/remote/s3/s3_test.go (95%) rename {component => internal/component}/remote/s3/types.go (100%) rename {component => internal/component}/remote/s3/watcher.go (100%) rename {component => internal/component}/remote/vault/auth.go (100%) rename {component => internal/component}/remote/vault/client.go (100%) rename {component => internal/component}/remote/vault/metrics.go (100%) rename {component => internal/component}/remote/vault/refresher.go (98%) rename {component => internal/component}/remote/vault/ticker.go (100%) rename {component => internal/component}/remote/vault/vault.go (98%) rename {component => internal/component}/remote/vault/vault_test.go (97%) rename {converter => internal/converter}/converter.go (88%) rename {converter => internal/converter}/diag/diagnostic.go (100%) rename {converter => internal/converter}/diag/diagnostics.go (100%) rename {converter => internal/converter}/diag/report.go (100%) rename {converter => internal/converter}/diag/severity.go (100%) rename {converter => internal/converter}/internal/common/convert_appendable.go (100%) rename {converter => internal/converter}/internal/common/convert_logs_receiver.go (92%) rename {converter => internal/converter}/internal/common/convert_targets.go (98%) rename {converter => internal/converter}/internal/common/convert_targets_test.go (94%) rename {converter => internal/converter}/internal/common/custom_tokenizer.go (100%) rename {converter => internal/converter}/internal/common/http_client_config.go (97%) rename {converter => internal/converter}/internal/common/river_utils.go (94%) rename {converter => internal/converter}/internal/common/river_utils_test.go (87%) rename {converter => internal/converter}/internal/common/validate.go (97%) rename {converter => internal/converter}/internal/common/validate_test.go (96%) rename {converter => internal/converter}/internal/common/weaveworks_server.go (97%) rename {converter => internal/converter}/internal/otelcolconvert/converter.go (99%) rename {converter => internal/converter}/internal/otelcolconvert/converter_batchprocessor.go (87%) rename {converter => internal/converter}/internal/otelcolconvert/converter_filterprocessor.go (88%) rename {converter => internal/converter}/internal/otelcolconvert/converter_helpers.go (97%) rename {converter => internal/converter}/internal/otelcolconvert/converter_jaegerreceiver.go (92%) rename {converter => internal/converter}/internal/otelcolconvert/converter_k8sattributesprocessor.go (93%) rename {converter => internal/converter}/internal/otelcolconvert/converter_kafkareceiver.go (95%) rename {converter => internal/converter}/internal/otelcolconvert/converter_loadbalancingexporter.go (93%) rename {converter => internal/converter}/internal/otelcolconvert/converter_memorylimiterprocessor.go (88%) rename {converter => internal/converter}/internal/otelcolconvert/converter_opencensusreceiver.go (87%) rename {converter => internal/converter}/internal/otelcolconvert/converter_otlpexporter.go (93%) rename {converter => internal/converter}/internal/otelcolconvert/converter_otlphttpexporter.go (91%) rename {converter => internal/converter}/internal/otelcolconvert/converter_otlpreceiver.go (95%) rename {converter => internal/converter}/internal/otelcolconvert/converter_probabilisticsamplerprocessor.go (87%) rename {converter => internal/converter}/internal/otelcolconvert/converter_spanprocessor.go (94%) rename {converter => internal/converter}/internal/otelcolconvert/converter_tailsamplingprocessor.go (97%) rename {converter => internal/converter}/internal/otelcolconvert/converter_zipkinreceiver.go (85%) rename {converter => internal/converter}/internal/otelcolconvert/otelcolconvert.go (98%) rename {converter => internal/converter}/internal/otelcolconvert/otelcolconvert_test.go (77%) rename {converter => internal/converter}/internal/otelcolconvert/pipeline_group.go (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/batch.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/batch.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/filter.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/filter.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/jaeger.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/jaeger.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/k8sattributes.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/k8sattributes.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/kafka.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/kafka.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/loadbalancing.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/loadbalancing.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/memorylimiter.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/memorylimiter.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/opencensus.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/opencensus.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.diags (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.diags (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.diags (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otlp.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otlp.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otlphttp.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/otlphttp.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/probabilistic_sampler.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/probabilistic_sampler.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/span.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/span.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/span_full.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/span_full.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/tail_sampling.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/tail_sampling.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/zipkin.river (100%) rename {converter => internal/converter}/internal/otelcolconvert/testdata/zipkin.yaml (100%) rename {converter => internal/converter}/internal/otelcolconvert/utils.go (100%) rename {converter => internal/converter}/internal/prometheusconvert/build/prometheus_blocks.go (98%) rename {converter => internal/converter}/internal/prometheusconvert/component/azure.go (86%) rename {converter => internal/converter}/internal/prometheusconvert/component/consul.go (83%) rename {converter => internal/converter}/internal/prometheusconvert/component/digitalocean.go (87%) rename {converter => internal/converter}/internal/prometheusconvert/component/dns.go (75%) rename {converter => internal/converter}/internal/prometheusconvert/component/docker.go (82%) rename {converter => internal/converter}/internal/prometheusconvert/component/dockerswarm.go (84%) rename {converter => internal/converter}/internal/prometheusconvert/component/ec2.go (83%) rename {converter => internal/converter}/internal/prometheusconvert/component/file.go (74%) rename {converter => internal/converter}/internal/prometheusconvert/component/gce.go (76%) rename {converter => internal/converter}/internal/prometheusconvert/component/http.go (75%) rename {converter => internal/converter}/internal/prometheusconvert/component/ionos.go (77%) rename {converter => internal/converter}/internal/prometheusconvert/component/kubernetes.go (84%) rename {converter => internal/converter}/internal/prometheusconvert/component/kuma.go (77%) rename {converter => internal/converter}/internal/prometheusconvert/component/lightsail.go (81%) rename {converter => internal/converter}/internal/prometheusconvert/component/linode.go (77%) rename {converter => internal/converter}/internal/prometheusconvert/component/marathon.go (79%) rename {converter => internal/converter}/internal/prometheusconvert/component/nerve.go (74%) rename {converter => internal/converter}/internal/prometheusconvert/component/openstack.go (85%) rename {converter => internal/converter}/internal/prometheusconvert/component/ovhcloud.go (79%) rename {converter => internal/converter}/internal/prometheusconvert/component/relabel.go (87%) rename {converter => internal/converter}/internal/prometheusconvert/component/remote_write.go (94%) rename {converter => internal/converter}/internal/prometheusconvert/component/scaleway.go (83%) rename {converter => internal/converter}/internal/prometheusconvert/component/scrape.go (91%) rename {converter => internal/converter}/internal/prometheusconvert/component/serverset.go (74%) rename {converter => internal/converter}/internal/prometheusconvert/component/service_discovery.go (96%) rename {converter => internal/converter}/internal/prometheusconvert/component/triton.go (79%) rename {converter => internal/converter}/internal/prometheusconvert/prometheusconvert.go (92%) create mode 100644 internal/converter/internal/prometheusconvert/prometheusconvert_test.go rename {converter => internal/converter}/internal/prometheusconvert/testdata/azure.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/azure.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/bad_config.diags (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/bad_config.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/broken_yaml.diags (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/broken_yaml.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/consul.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/consul.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/digitalocean.diags (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/digitalocean.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/digitalocean.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/discovery.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/discovery.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/discovery_relabel.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/discovery_relabel.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/dns.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/dns.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/docker.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/docker.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/dockerswarm.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/dockerswarm.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/ec2.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/ec2.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/empty.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/empty.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/file.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/file.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/gce.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/gce.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/http.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/http.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/ionos.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/ionos.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/kubernetes.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/kubernetes.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/kuma.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/kuma.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/lightsail.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/lightsail.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/linode.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/linode.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/marathon.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/marathon.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/metric_relabel.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/metric_relabel.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/nerve.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/nerve.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/openstack.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/openstack.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/ovhcloud.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/ovhcloud.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/scaleway.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/scaleway.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/scrape.diags (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/scrape.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/scrape.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/serverset.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/serverset.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/triton.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/triton.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/unsupported.diags (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/unsupported.river (100%) rename {converter => internal/converter}/internal/prometheusconvert/testdata/unsupported.yaml (100%) rename {converter => internal/converter}/internal/prometheusconvert/validate.go (94%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/azure_event_hub.go (85%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/cloudflare.go (84%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/consul_agent.go (89%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/docker_sd.go (86%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/gcplog.go (84%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/gelf.go (80%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/global_context.go (73%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/herokudrain.go (82%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/journal.go (83%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/kafka.go (90%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/loki_write.go (89%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/push_api.go (82%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/scrape_builder.go (91%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/service_discovery.go (91%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/stages.go (99%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/syslog.go (87%) rename {converter => internal/converter}/internal/promtailconvert/internal/build/windows_events.go (85%) rename {converter => internal/converter}/internal/promtailconvert/promtailconvert.go (95%) create mode 100644 internal/converter/internal/promtailconvert/promtailconvert_test.go rename {converter => internal/converter}/internal/promtailconvert/testdata/azure.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/azure.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/azure_event_hubs.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/azure_event_hubs.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/bad_config.diags (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/bad_config.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/cloudflare_relabel.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/cloudflare_relabel.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/consul.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/consul.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/consulagent.diags (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/consulagent.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/consulagent.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/digitalocean.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/digitalocean.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/docker.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/docker.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/docker_relabel.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/docker_relabel.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/dockerswarm.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/dockerswarm.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/ec2.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/ec2.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/file.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/file.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/gce.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/gce.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/gcplog.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/gcplog.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/gelf.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/gelf.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/heroku.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/heroku.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/journal.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/journal.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/journal_relabel.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/journal_relabel.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/kafka.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/kafka.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/kubernetes.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/kubernetes.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/loki_write.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/loki_write.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/marathon.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/marathon.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/mixed_pipeline.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/mixed_pipeline.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/nerve.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/nerve.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/openstack.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/openstack.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_cri_empty.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_cri_empty.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_drop.diags (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_drop.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_drop.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_match_nested.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_match_nested.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_part1.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_part1.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_part2.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_part2.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/push_api.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/push_api.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/push_api_unsupported.diags (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/push_api_unsupported.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_basic_auth.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_basic_auth.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_basic_auth2.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_basic_auth2.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_bearer_file.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_bearer_file.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_bearer_token.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_bearer_token.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_oauth.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_oauth.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_oauth2.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/remote_write_oauth2.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/sd_pipeline_example.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/sd_pipeline_example.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/serverset.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/serverset.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/source_pipeline_example.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/source_pipeline_example.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/static_pipeline_example.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/static_pipeline_example.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/syslog.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/syslog.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/triton.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/triton.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/unsupported.diags (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/unsupported.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/windowsevents.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/windowsevents.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/windowsevents_relabel.river (100%) rename {converter => internal/converter}/internal/promtailconvert/testdata/windowsevents_relabel.yaml (100%) rename {converter => internal/converter}/internal/promtailconvert/validate.go (98%) rename {converter => internal/converter}/internal/staticconvert/internal/build/apache_exporter.go (76%) rename {converter => internal/converter}/internal/staticconvert/internal/build/app_agent_receiver.go (86%) rename {converter => internal/converter}/internal/staticconvert/internal/build/azure_exporter.go (84%) rename {converter => internal/converter}/internal/staticconvert/internal/build/blackbox_exporter.go (85%) rename {converter => internal/converter}/internal/staticconvert/internal/build/builder.go (81%) rename {converter => internal/converter}/internal/staticconvert/internal/build/cadvisor_exporter.go (86%) rename {converter => internal/converter}/internal/staticconvert/internal/build/cloudwatch_exporter.go (93%) rename {converter => internal/converter}/internal/staticconvert/internal/build/consul_exporter.go (81%) rename {converter => internal/converter}/internal/staticconvert/internal/build/dnsmasq_exporter.go (70%) rename {converter => internal/converter}/internal/staticconvert/internal/build/elasticsearch_exporter.go (84%) rename {converter => internal/converter}/internal/staticconvert/internal/build/eventhandler.go (88%) rename {converter => internal/converter}/internal/staticconvert/internal/build/gcp_exporter.go (78%) rename {converter => internal/converter}/internal/staticconvert/internal/build/github_exporter.go (75%) rename {converter => internal/converter}/internal/staticconvert/internal/build/global_context.go (73%) rename {converter => internal/converter}/internal/staticconvert/internal/build/kafka_exporter.go (87%) rename {converter => internal/converter}/internal/staticconvert/internal/build/logging.go (74%) rename {converter => internal/converter}/internal/staticconvert/internal/build/memcached_exporter.go (65%) rename {converter => internal/converter}/internal/staticconvert/internal/build/mongodb_exporter.go (75%) rename {converter => internal/converter}/internal/staticconvert/internal/build/mssql_exporter.go (74%) rename {converter => internal/converter}/internal/staticconvert/internal/build/mysqld_exporter.go (89%) rename {converter => internal/converter}/internal/staticconvert/internal/build/node_exporter.go (94%) rename {converter => internal/converter}/internal/staticconvert/internal/build/oracledb_exporter.go (74%) rename {converter => internal/converter}/internal/staticconvert/internal/build/postgres_exporter.go (82%) rename {converter => internal/converter}/internal/staticconvert/internal/build/process_exporter.go (81%) rename {converter => internal/converter}/internal/staticconvert/internal/build/redis_exporter.go (91%) rename {converter => internal/converter}/internal/staticconvert/internal/build/self_exporter.go (69%) rename {converter => internal/converter}/internal/staticconvert/internal/build/server.go (94%) rename {converter => internal/converter}/internal/staticconvert/internal/build/snmp_exporter.go (89%) rename {converter => internal/converter}/internal/staticconvert/internal/build/snowflake_exporter.go (74%) rename {converter => internal/converter}/internal/staticconvert/internal/build/squid_exporter.go (72%) rename {converter => internal/converter}/internal/staticconvert/internal/build/statsd_exporter.go (83%) rename {converter => internal/converter}/internal/staticconvert/internal/build/vmware_exporter.go (77%) rename {converter => internal/converter}/internal/staticconvert/internal/build/windows_exporter.go (92%) rename {converter => internal/converter}/internal/staticconvert/staticconvert.go (90%) rename {converter => internal/converter}/internal/staticconvert/staticconvert_test.go (71%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/integrations_v2.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/integrations_v2.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/integrations_v2.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/missing_metrics_config.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/missing_metrics_config.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/unsupported.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/unsupported.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2/unsupported.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2_windows/integrations_v2.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2_windows/integrations_v2.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata-v2_windows/integrations_v2.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/dup_labels.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/dup_labels.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/example-cert.pem (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/example-key.pem (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/integrations.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/integrations.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/integrations.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/integrations_no_rw.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/integrations_no_rw.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_missing_name.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_missing_name.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_remote_write.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_remote_write.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_remote_write.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_scrape.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_scrape.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/prom_scrape.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/promtail_prom.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/promtail_prom.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/promtail_prom.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/promtail_scrape.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/promtail_scrape.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/promtail_scrape.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/sanitize.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/sanitize.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/sanitize.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/unsupported.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/unsupported.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata/unsupported.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/testdata_windows/integrations.diags (100%) rename {converter => internal/converter}/internal/staticconvert/testdata_windows/integrations.river (100%) rename {converter => internal/converter}/internal/staticconvert/testdata_windows/integrations.yaml (100%) rename {converter => internal/converter}/internal/staticconvert/validate.go (70%) rename {converter => internal/converter}/internal/test_common/testing.go (94%) rename {pkg => internal}/flow/componenttest/componenttest.go (96%) rename {pkg => internal}/flow/componenttest/context.go (100%) rename {pkg => internal}/flow/componenttest/testfailmodule.go (93%) rename {pkg => internal}/flow/declare_test.go (98%) rename {pkg => internal}/flow/flow.go (97%) rename {pkg => internal}/flow/flow_components.go (94%) rename {pkg => internal}/flow/flow_services.go (93%) rename {pkg => internal}/flow/flow_services_test.go (96%) rename {pkg => internal}/flow/flow_test.go (89%) rename {pkg => internal}/flow/flow_updates_test.go (98%) rename {pkg => internal}/flow/import_test.go (96%) rename {pkg => internal}/flow/internal/controller/block_node.go (92%) rename {pkg => internal}/flow/internal/controller/component_node.go (95%) rename {pkg => internal}/flow/internal/controller/component_node_manager.go (100%) rename {pkg => internal}/flow/internal/controller/component_references.go (98%) rename {pkg => internal}/flow/internal/controller/component_registry.go (98%) rename {pkg => internal}/flow/internal/controller/custom_component_registry.go (100%) rename {pkg => internal}/flow/internal/controller/loader.go (99%) rename {pkg => internal}/flow/internal/controller/loader_test.go (97%) rename {pkg => internal}/flow/internal/controller/metrics.go (100%) rename {pkg => internal}/flow/internal/controller/module.go (96%) rename {pkg => internal}/flow/internal/controller/node_builtin_component.go (98%) rename {pkg => internal}/flow/internal/controller/node_builtin_component_test.go (100%) rename {pkg => internal}/flow/internal/controller/node_config.go (98%) rename {pkg => internal}/flow/internal/controller/node_config_argument.go (100%) rename {pkg => internal}/flow/internal/controller/node_config_export.go (100%) rename {pkg => internal}/flow/internal/controller/node_config_import.go (98%) rename {pkg => internal}/flow/internal/controller/node_config_logging.go (97%) rename {pkg => internal}/flow/internal/controller/node_config_tracing.go (98%) rename {pkg => internal}/flow/internal/controller/node_custom_component.go (99%) rename {pkg => internal}/flow/internal/controller/node_declare.go (100%) rename {pkg => internal}/flow/internal/controller/node_service.go (97%) rename {pkg => internal}/flow/internal/controller/queue.go (100%) rename {pkg => internal}/flow/internal/controller/queue_test.go (100%) rename {pkg => internal}/flow/internal/controller/scheduler.go (100%) rename {pkg => internal}/flow/internal/controller/scheduler_test.go (96%) rename {pkg => internal}/flow/internal/controller/service_map.go (95%) rename {pkg => internal}/flow/internal/controller/value_cache.go (99%) rename {pkg => internal}/flow/internal/controller/value_cache_test.go (100%) rename {pkg => internal}/flow/internal/dag/dag.go (100%) rename {pkg => internal}/flow/internal/dag/ops.go (100%) rename {pkg => internal}/flow/internal/dag/ops_test.go (100%) rename {pkg => internal}/flow/internal/dag/tarjan.go (100%) rename {pkg => internal}/flow/internal/dag/tarjan_test.go (100%) rename {pkg => internal}/flow/internal/dag/walk.go (100%) rename {pkg => internal}/flow/internal/importsource/import_file.go (96%) rename {pkg => internal}/flow/internal/importsource/import_git.go (98%) rename {pkg => internal}/flow/internal/importsource/import_http.go (93%) rename {pkg => internal}/flow/internal/importsource/import_source.go (97%) rename {pkg => internal}/flow/internal/importsource/import_string.go (96%) rename {pkg => internal}/flow/internal/testcomponents/count.go (95%) rename {pkg => internal}/flow/internal/testcomponents/doc.go (100%) rename {pkg => internal}/flow/internal/testcomponents/experimental.go (94%) rename {pkg => internal}/flow/internal/testcomponents/fake.go (95%) rename {pkg => internal}/flow/internal/testcomponents/passthrough.go (95%) rename {pkg => internal}/flow/internal/testcomponents/sumation.go (93%) rename {pkg => internal}/flow/internal/testcomponents/tick.go (95%) rename {pkg => internal}/flow/internal/testservices/doc.go (100%) rename {pkg => internal}/flow/internal/testservices/fake.go (96%) rename {pkg => internal}/flow/internal/worker/worker_pool.go (100%) rename {pkg => internal}/flow/internal/worker/worker_pool_test.go (100%) rename {pkg => internal}/flow/logging/handler.go (100%) rename {pkg => internal}/flow/logging/handler_test.go (100%) rename {pkg => internal}/flow/logging/level/level.go (96%) rename {pkg => internal}/flow/logging/logger.go (98%) rename {pkg => internal}/flow/logging/logger_test.go (97%) rename {pkg => internal}/flow/logging/options.go (97%) rename {pkg => internal}/flow/module.go (94%) rename {pkg => internal}/flow/module_eval_test.go (91%) rename {pkg => internal}/flow/module_fail_test.go (94%) rename {pkg => internal}/flow/module_registry.go (100%) rename {pkg => internal}/flow/module_test.go (97%) rename {pkg => internal}/flow/source.go (98%) rename {pkg => internal}/flow/source_test.go (96%) rename {pkg => internal}/flow/testdata/import_error/import_error_1.txtar (100%) rename {pkg => internal}/flow/testdata/import_error/import_error_2.txtar (100%) rename {pkg => internal}/flow/testdata/import_error/import_error_3.txtar (100%) rename {pkg => internal}/flow/testdata/import_error/import_error_4.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_1.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_10.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_11.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_12.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_13.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_14.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_15.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_16.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_2.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_3.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_4.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_5.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_6.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_7.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_8.txtar (100%) rename {pkg => internal}/flow/testdata/import_file/import_file_9.txtar (100%) rename {pkg => internal}/flow/testdata/import_git/import_git_1.txtar (100%) rename {pkg => internal}/flow/testdata/import_http/import_http_1.txtar (100%) rename {pkg => internal}/flow/testdata/import_string/import_string_1.txtar (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/LICENSE (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/README.md (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/constants.go (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/doc.go (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/sampler.go (99%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/sampler_remote.go (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/sampler_remote_options.go (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/utils/http_json.go (100%) rename {pkg => internal}/flow/tracing/internal/jaegerremote/utils/rate_limiter.go (100%) rename {pkg => internal}/flow/tracing/lazy_sampler.go (100%) rename {pkg => internal}/flow/tracing/otelcol_client.go (99%) rename {pkg => internal}/flow/tracing/tracing.go (97%) rename {pkg => internal}/flow/tracing/wrap_tracer.go (100%) rename {cmd/internal => internal}/flowmode/cluster_builder.go (98%) rename {cmd/internal => internal}/flowmode/cluster_builder_test.go (100%) rename {cmd/internal => internal}/flowmode/cmd_convert.go (98%) rename {cmd/internal => internal}/flowmode/cmd_convert_test.go (100%) rename {cmd/internal => internal}/flowmode/cmd_fmt.go (100%) rename {cmd/internal => internal}/flowmode/cmd_run.go (94%) rename {cmd/internal => internal}/flowmode/cmd_tools.go (90%) rename {cmd/internal => internal}/flowmode/flowmode.go (94%) rename {cmd/internal => internal}/flowmode/resources_collector.go (98%) rename {pkg => internal}/loki/client/client.go (98%) rename {pkg => internal}/loki/client/client_test.go (100%) rename {pkg => internal}/loki/client/internal/client.go (100%) rename {pkg => internal}/loki/client/internal/client_test.go (100%) rename {pkg => internal}/loki/client/rules.go (100%) rename {pkg => internal}/loki/client/rules_test.go (100%) rename {pkg => internal}/mimir/client/client.go (98%) rename {pkg => internal}/mimir/client/client_test.go (100%) rename {pkg => internal}/mimir/client/internal/client.go (100%) rename {pkg => internal}/mimir/client/internal/client_test.go (100%) rename {pkg => internal}/mimir/client/rules.go (100%) rename {pkg => internal}/mimir/client/rules_test.go (100%) rename {pkg => internal}/runner/hash_map.go (100%) rename {pkg => internal}/runner/hash_map_test.go (100%) rename {pkg => internal}/runner/runner.go (100%) rename {pkg => internal}/runner/runner_test.go (96%) rename {service => internal/service}/cluster/cluster.go (98%) rename {service => internal/service}/cluster/cluster_test.go (100%) rename {service => internal/service}/cluster/mock.go (100%) rename {service => internal/service}/http/handler.go (90%) rename {service => internal/service}/http/handler_windows.go (97%) rename {service => internal/service}/http/http.go (98%) rename {service => internal/service}/http/http_test.go (95%) rename {service => internal/service}/http/routes.go (100%) rename {service => internal/service}/http/split_path.go (97%) rename {service => internal/service}/http/split_path_test.go (97%) rename {service => internal/service}/http/testdata/config.conf (100%) rename {service => internal/service}/http/testdata/test-cert.crt (100%) rename {service => internal/service}/http/testdata/test-key.key (100%) rename {service => internal/service}/http/tls.go (100%) rename {service => internal/service}/http/tls_test.go (100%) rename {service => internal/service}/labelstore/data.go (100%) rename {service => internal/service}/labelstore/service.go (97%) rename {service => internal/service}/labelstore/service_test.go (100%) rename {service => internal/service}/otel/otel.go (95%) rename {service => internal/service}/remotecfg/noop.go (100%) rename {service => internal/service}/remotecfg/remotecfg.go (98%) rename {service => internal/service}/remotecfg/remotecfg_test.go (94%) rename {service => internal/service}/service.go (98%) rename {service => internal/service}/ui/ui.go (90%) rename {pkg => internal/static}/agentctl/sync.go (96%) rename {pkg => internal/static}/agentctl/sync_test.go (96%) rename {pkg => internal/static}/agentctl/testdata/agent-1.yaml (100%) rename {pkg => internal/static}/agentctl/testdata/agent-2.yaml (100%) rename {pkg => internal/static}/agentctl/testdata/agent-3.yaml (100%) rename {pkg => internal/static}/agentctl/waltools/cardinality.go (100%) rename {pkg => internal/static}/agentctl/waltools/cardinality_test.go (100%) rename {pkg => internal/static}/agentctl/waltools/samples.go (100%) rename {pkg => internal/static}/agentctl/waltools/wal_iterator.go (100%) rename {pkg => internal/static}/agentctl/waltools/walstats.go (100%) rename {pkg => internal/static}/agentctl/waltools/walstats_test.go (100%) rename {pkg => internal/static}/agentproto/agent.pb.go (100%) rename {pkg => internal/static}/agentproto/agent.proto (85%) rename {pkg => internal/static}/agentproto/func.go (100%) rename {pkg => internal/static}/agentproto/gen.go (100%) rename {pkg => internal/static}/client/client.go (97%) rename {pkg => internal/static}/config/agent_management_remote_config_test.go (98%) rename {pkg => internal/static}/config/agentmanagement.go (99%) rename {pkg => internal/static}/config/agentmanagement_remote_config.go (97%) rename {pkg => internal/static}/config/agentmanagement_test.go (99%) rename {pkg => internal/static}/config/config.go (97%) rename {pkg => internal/static}/config/config_test.go (98%) rename {pkg => internal/static}/config/encoder/encoder.go (100%) rename {pkg => internal/static}/config/encoder/test_encoding_unknown.txt (100%) rename {pkg => internal/static}/config/encoder/test_encoding_utf16be.txt (100%) rename {pkg => internal/static}/config/encoder/test_encoding_utf16le.txt (100%) rename {pkg => internal/static}/config/encoder/test_encoding_utf32be.txt (100%) rename {pkg => internal/static}/config/encoder/test_encoding_utf32le.txt (100%) rename {pkg => internal/static}/config/encoder/test_encoding_utf8.txt (100%) rename {pkg => internal/static}/config/encoder/test_encoding_utf8bom.txt (100%) rename {pkg => internal/static}/config/features/features.go (100%) rename {pkg => internal/static}/config/features/features_test.go (100%) rename {pkg => internal/static}/config/instrumentation/agent_management_metrics.go (100%) rename {pkg => internal/static}/config/instrumentation/config_metrics.go (100%) rename {pkg => internal/static}/config/instrumentation/remote_config_metrics.go (100%) rename {pkg => internal/static}/config/integrations.go (95%) rename {pkg => internal/static}/config/integrations_test.go (95%) rename {pkg => internal/static}/config/remote_config.go (98%) rename {pkg => internal/static}/config/remote_config_test.go (100%) rename {pkg => internal/static}/config/testdata/server_empty.yml (100%) rename {pkg => internal/static}/integrations/agent/agent.go (93%) rename {pkg => internal/static}/integrations/apache_http/apache_http.go (97%) rename {pkg => internal/static}/integrations/azure_exporter/azure_exporter.go (98%) rename {pkg => internal/static}/integrations/azure_exporter/config.go (97%) rename {pkg => internal/static}/integrations/azure_exporter/config_test.go (99%) rename {pkg => internal/static}/integrations/blackbox_exporter/blackbox_exporter.go (96%) rename {pkg => internal/static}/integrations/blackbox_exporter/blackbox_exporter_test.go (94%) rename {pkg => internal/static}/integrations/cadvisor/cadvisor.go (99%) rename {pkg => internal/static}/integrations/cadvisor/cadvisor_stub.go (88%) rename {pkg => internal/static}/integrations/cadvisor/cadvisor_test.go (94%) rename {pkg => internal/static}/integrations/cadvisor/common.go (96%) rename {pkg => internal/static}/integrations/cloudwatch_exporter/cloudwatch_exporter.go (98%) rename {pkg => internal/static}/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go (98%) rename {pkg => internal/static}/integrations/cloudwatch_exporter/config.go (98%) rename {pkg => internal/static}/integrations/cloudwatch_exporter/config_test.go (100%) rename {pkg => internal/static}/integrations/cloudwatch_exporter/docs/doc.go (100%) rename {pkg => internal/static}/integrations/cloudwatch_exporter/docs/template.md (100%) rename {pkg => internal/static}/integrations/collector_integration.go (96%) rename {pkg => internal/static}/integrations/config/config.go (100%) rename {pkg => internal/static}/integrations/consul_exporter/consul_exporter.go (93%) rename {pkg => internal/static}/integrations/dnsmasq_exporter/dnsmasq_exporter.go (91%) rename {pkg => internal/static}/integrations/elasticsearch_exporter/elasticsearch_exporter.go (97%) rename {pkg => internal/static}/integrations/elasticsearch_exporter/tls.go (100%) rename {pkg => internal/static}/integrations/gcp_exporter/gcp_exporter.go (96%) rename {pkg => internal/static}/integrations/gcp_exporter/gcp_exporter_test.go (98%) rename {pkg => internal/static}/integrations/github_exporter/github_exporter.go (93%) rename {pkg => internal/static}/integrations/github_exporter/github_test.go (86%) rename {pkg => internal/static}/integrations/handler_integration.go (91%) create mode 100644 internal/static/integrations/install/install.go rename {pkg => internal/static}/integrations/install/install_test.go (94%) rename {pkg => internal/static}/integrations/integration.go (97%) rename {pkg => internal/static}/integrations/kafka_exporter/kafka_exporter.go (96%) rename {pkg => internal/static}/integrations/kafka_exporter/kafka_test.go (86%) rename {pkg => internal/static}/integrations/logruskit.go (100%) rename {pkg => internal/static}/integrations/manager.go (98%) rename {pkg => internal/static}/integrations/manager_test.go (98%) rename {pkg => internal/static}/integrations/memcached_exporter/memcached_exporter.go (92%) rename {pkg => internal/static}/integrations/mongodb_exporter/mongodb_exporter.go (93%) rename {pkg => internal/static}/integrations/mongodb_exporter/mongodb_test.go (86%) rename {pkg => internal/static}/integrations/mssql/collector.go (100%) rename {pkg => internal/static}/integrations/mssql/collector_config.yaml (100%) rename {pkg => internal/static}/integrations/mssql/collector_test.go (100%) rename {pkg => internal/static}/integrations/mssql/sql_exporter.go (94%) rename {pkg => internal/static}/integrations/mssql/sql_exporter_test.go (100%) rename {pkg => internal/static}/integrations/mysqld_exporter/mysqld-exporter.go (97%) rename {pkg => internal/static}/integrations/mysqld_exporter/mysqld_test.go (86%) rename {pkg => internal/static}/integrations/node_exporter/collectors.go (100%) rename {pkg => internal/static}/integrations/node_exporter/config.go (98%) rename {pkg => internal/static}/integrations/node_exporter/config_test.go (100%) rename {pkg => internal/static}/integrations/node_exporter/node_exporter.go (96%) rename {pkg => internal/static}/integrations/node_exporter/node_exporter_linux.go (100%) rename {pkg => internal/static}/integrations/node_exporter/node_exporter_test.go (100%) rename {pkg => internal/static}/integrations/node_exporter/node_exporter_windows.go (94%) rename {pkg => internal/static}/integrations/oracledb_exporter/oracledb_exporter.go (94%) rename {pkg => internal/static}/integrations/oracledb_exporter/oracledb_exporter_test.go (100%) rename {pkg => internal/static}/integrations/postgres_exporter/postgres_exporter.go (95%) rename {pkg => internal/static}/integrations/postgres_exporter/postgres_exporter_test.go (100%) rename {pkg => internal/static}/integrations/postgres_exporter/postgres_test.go (89%) rename {pkg => internal/static}/integrations/process_exporter/config.go (89%) rename {pkg => internal/static}/integrations/process_exporter/process-exporter.go (95%) rename {pkg => internal/static}/integrations/process_exporter/process-exporter_linux.go (95%) rename {pkg => internal/static}/integrations/redis_exporter/redis_exporter.go (97%) rename {pkg => internal/static}/integrations/redis_exporter/redis_exporter_test.go (99%) rename {pkg => internal/static}/integrations/redis_exporter/testdata/password_map_file.json (100%) rename {pkg => internal/static}/integrations/register.go (98%) rename {pkg => internal/static}/integrations/register_test.go (100%) rename {pkg => internal/static}/integrations/snmp_exporter/common/common.go (100%) rename {pkg => internal/static}/integrations/snmp_exporter/common/snmp.yml (100%) rename {pkg => internal/static}/integrations/snmp_exporter/common/snmp.yml.gz (100%) rename {pkg => internal/static}/integrations/snmp_exporter/snmp.go (100%) rename {pkg => internal/static}/integrations/snmp_exporter/snmp_exporter.go (96%) rename {pkg => internal/static}/integrations/snmp_exporter/snmp_exporter_test.go (100%) rename {pkg => internal/static}/integrations/snowflake_exporter/snowflake_exporter.go (90%) rename {pkg => internal/static}/integrations/snowflake_exporter/snowflake_exporter_test.go (100%) rename {pkg => internal/static}/integrations/squid_exporter/squid_exporter.go (92%) rename {pkg => internal/static}/integrations/squid_exporter/squid_exporter_test.go (100%) rename {pkg => internal/static}/integrations/statsd_exporter/metrics.go (100%) rename {pkg => internal/static}/integrations/statsd_exporter/statsd_exporter.go (97%) rename {pkg => internal/static}/integrations/stub_integration.go (91%) rename {pkg => internal/static}/integrations/v2/agent/agent.go (88%) rename {pkg => internal/static}/integrations/v2/apache_http/apache_http.go (93%) rename {pkg => internal/static}/integrations/v2/apache_http/apache_http_test.go (86%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/app_agent_receiver.go (96%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/app_agent_receiver_test.go (92%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/config.go (96%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/config_test.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/handler.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/handler_test.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/logs_exporter.go (98%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/logs_exporter_test.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/payload.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/payload_test.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/receiver_metrics_test.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/sourcemaps.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/sourcemaps_test.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/testdata/foo.js (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/testdata/foo.js.map (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/testdata/payload.json (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/testdata/payload_2.json (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/traces_exporter.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/traces_test.go (100%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/utils.go (97%) rename {pkg => internal/static}/integrations/v2/app_agent_receiver/utils_test.go (100%) rename {pkg => internal/static}/integrations/v2/autoscrape/appender.go (100%) rename {pkg => internal/static}/integrations/v2/autoscrape/autoscrape.go (98%) rename {pkg => internal/static}/integrations/v2/autoscrape/autoscrape_test.go (97%) rename {pkg => internal/static}/integrations/v2/blackbox_exporter/blackbox.go (93%) rename {pkg => internal/static}/integrations/v2/blackbox_exporter/blackbox_exporter.go (90%) rename {pkg => internal/static}/integrations/v2/blackbox_exporter/blackbox_test.go (80%) rename {pkg => internal/static}/integrations/v2/common/metrics.go (93%) rename {pkg => internal/static}/integrations/v2/controller.go (99%) rename {pkg => internal/static}/integrations/v2/controller_httpintegration_test.go (99%) rename {pkg => internal/static}/integrations/v2/controller_metricsintegration_test.go (97%) rename {pkg => internal/static}/integrations/v2/controller_test.go (99%) rename {pkg => internal/static}/integrations/v2/controller_updateintegration_test.go (97%) rename {pkg => internal/static}/integrations/v2/eventhandler/eventhandler.go (99%) rename {pkg => internal/static}/integrations/v2/eventhandler/eventhandler_test.go (100%) rename {pkg => internal/static}/integrations/v2/eventhandler/integration.go (98%) rename {pkg => internal/static}/integrations/v2/eventhandler/testdata/eventhandler.cache (100%) rename {pkg => internal/static}/integrations/v2/integrations.go (96%) rename {pkg => internal/static}/integrations/v2/metricsutils/metricshandler_integration.go (95%) rename {pkg => internal/static}/integrations/v2/metricsutils/metricshandler_integration_test.go (95%) rename {pkg => internal/static}/integrations/v2/metricsutils/versionshim.go (94%) rename {pkg => internal/static}/integrations/v2/register.go (98%) rename {pkg => internal/static}/integrations/v2/register_test.go (98%) rename {pkg => internal/static}/integrations/v2/snmp_exporter/snmp.go (92%) rename {pkg => internal/static}/integrations/v2/snmp_exporter/snmp_exporter.go (91%) rename {pkg => internal/static}/integrations/v2/snmp_exporter/snmp_exporter_test.go (100%) rename {pkg => internal/static}/integrations/v2/subsystem.go (98%) rename {pkg => internal/static}/integrations/v2/subsystem_test.go (91%) rename {pkg => internal/static}/integrations/v2/targetgroup.go (100%) rename {pkg => internal/static}/integrations/v2/utils.go (95%) rename {pkg => internal/static}/integrations/v2/vmware_exporter/vmware_exporter.go (93%) rename {pkg => internal/static}/integrations/v2/workers.go (100%) rename {pkg => internal/static}/integrations/vmware_exporter/vmware_exporter.go (97%) rename {pkg => internal/static}/integrations/windows_exporter/config.go (95%) rename {pkg => internal/static}/integrations/windows_exporter/config_windows.go (100%) rename {pkg => internal/static}/integrations/windows_exporter/windows_exporter.go (94%) rename {pkg => internal/static}/integrations/windows_exporter/windows_exporter_windows.go (96%) rename {pkg => internal/static}/logs/config.go (100%) rename {pkg => internal/static}/logs/config_test.go (100%) rename {pkg => internal/static}/logs/global.go (100%) rename {pkg => internal/static}/logs/http.go (97%) rename {pkg => internal/static}/logs/http_test.go (99%) rename {pkg => internal/static}/logs/logs.go (99%) rename {pkg => internal/static}/logs/logs_test.go (99%) rename {pkg => internal/static}/metrics/agent.go (97%) rename {pkg => internal/static}/metrics/agent_test.go (98%) rename {pkg => internal/static}/metrics/cleaner.go (98%) rename {pkg => internal/static}/metrics/cleaner_test.go (98%) rename {pkg => internal/static}/metrics/cluster/client/client.go (96%) rename {pkg => internal/static}/metrics/cluster/cluster.go (95%) rename {pkg => internal/static}/metrics/cluster/config.go (95%) rename {pkg => internal/static}/metrics/cluster/config_test.go (100%) rename {pkg => internal/static}/metrics/cluster/config_watcher.go (98%) rename {pkg => internal/static}/metrics/cluster/config_watcher_test.go (97%) rename {pkg => internal/static}/metrics/cluster/configapi/types.go (100%) rename {pkg => internal/static}/metrics/cluster/node.go (98%) rename {pkg => internal/static}/metrics/cluster/node_test.go (98%) rename {pkg => internal/static}/metrics/cluster/validation.go (98%) rename {pkg => internal/static}/metrics/cluster/validation_test.go (96%) rename {pkg => internal/static}/metrics/http.go (98%) rename {pkg => internal/static}/metrics/http_test.go (97%) rename {pkg => internal/static}/metrics/instance/configstore/api.go (98%) rename {pkg => internal/static}/metrics/instance/configstore/api_test.go (98%) rename {pkg => internal/static}/metrics/instance/configstore/codec.go (100%) rename {pkg => internal/static}/metrics/instance/configstore/codec_test.go (100%) rename {pkg => internal/static}/metrics/instance/configstore/errors.go (100%) rename {pkg => internal/static}/metrics/instance/configstore/mock.go (96%) rename {pkg => internal/static}/metrics/instance/configstore/remote.go (99%) rename {pkg => internal/static}/metrics/instance/configstore/remote_test.go (98%) rename {pkg => internal/static}/metrics/instance/configstore/store.go (96%) rename {pkg => internal/static}/metrics/instance/configstore/unique.go (93%) rename {pkg => internal/static}/metrics/instance/errors.go (100%) rename {pkg => internal/static}/metrics/instance/global.go (100%) rename {pkg => internal/static}/metrics/instance/group_manager.go (100%) rename {pkg => internal/static}/metrics/instance/group_manager_test.go (100%) rename {pkg => internal/static}/metrics/instance/host_filter.go (100%) rename {pkg => internal/static}/metrics/instance/host_filter_test.go (99%) rename {pkg => internal/static}/metrics/instance/instance.go (99%) rename {pkg => internal/static}/metrics/instance/instance_integration_test.go (99%) rename {pkg => internal/static}/metrics/instance/instance_test.go (99%) rename {pkg => internal/static}/metrics/instance/manager.go (100%) rename {pkg => internal/static}/metrics/instance/manager_test.go (100%) rename {pkg => internal/static}/metrics/instance/marshal.go (100%) rename {pkg => internal/static}/metrics/instance/marshal_test.go (100%) rename {pkg => internal/static}/metrics/instance/modal_manager.go (100%) rename {pkg => internal/static}/metrics/instance/noop.go (100%) rename {pkg => internal/static}/metrics/wal/series.go (100%) rename {pkg => internal/static}/metrics/wal/util.go (100%) rename {pkg => internal/static}/metrics/wal/wal.go (100%) rename {pkg => internal/static}/metrics/wal/wal_test.go (99%) rename {pkg => internal/static}/operator/apis/monitoring/doc.go (100%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/deployment.go (96%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/doc.go (100%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/group.go (100%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/types.go (100%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/types_integrations.go (100%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/types_logs.go (100%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/types_metrics.go (100%) rename {pkg => internal/static}/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go (99%) rename {pkg => internal/static}/operator/assets/assets.go (100%) rename {pkg => internal/static}/operator/build_hierarchy.go (96%) rename {pkg => internal/static}/operator/build_hierarchy_test.go (95%) rename {pkg => internal/static}/operator/clientutil/clientutil.go (100%) rename {pkg => internal/static}/operator/clientutil/merge.go (100%) rename {pkg => internal/static}/operator/config/config.go (96%) rename {pkg => internal/static}/operator/config/config_references.go (97%) rename {pkg => internal/static}/operator/config/config_references_test.go (96%) rename {pkg => internal/static}/operator/config/config_test.go (98%) rename {pkg => internal/static}/operator/config/fs_importer.go (100%) rename {pkg => internal/static}/operator/config/integration_templates_test.go (88%) rename {pkg => internal/static}/operator/config/logs_templates_test.go (98%) rename {pkg => internal/static}/operator/config/metrics_templates_test.go (99%) rename {pkg => internal/static}/operator/config/templates/agent-integrations.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/agent-logs.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/agent-metrics.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/logs/client.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/logs/external_labels.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/logs/pod_logs.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/logs/relabel_config.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/logs/stages.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/external_labels.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/kube_sd_config.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/pod_monitor.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/probe.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/relabel_config.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/remote_write.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/safe_tls_config.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/service_monitor.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/component/metrics/tls_config.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/ext/marshal.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/ext/optionals.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/ext/secrets.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/integrations.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/logs.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/metrics.libsonnet (100%) rename {pkg => internal/static}/operator/config/templates/utils/k8s.libsonnet (100%) rename {pkg => internal/static}/operator/config/utils.go (97%) rename {pkg => internal/static}/operator/config/utils_test.go (100%) rename {pkg => internal/static}/operator/defaults.go (100%) rename {pkg => internal/static}/operator/defaults.go.t (100%) rename {pkg => internal/static}/operator/hierarchy/hierarchy.go (100%) rename {pkg => internal/static}/operator/hierarchy/hierarchy_test.go (98%) rename {pkg => internal/static}/operator/hierarchy/list.go (100%) rename {pkg => internal/static}/operator/hierarchy/selector.go (100%) rename {pkg => internal/static}/operator/kubelet.go (97%) rename {pkg => internal/static}/operator/kubelet_test.go (94%) rename {pkg => internal/static}/operator/logutil/log.go (100%) rename {pkg => internal/static}/operator/operator.go (98%) rename {pkg => internal/static}/operator/operator_test.go (96%) rename {pkg => internal/static}/operator/reconciler.go (92%) rename {pkg => internal/static}/operator/reconciler_integrations.go (94%) rename {pkg => internal/static}/operator/reconciler_integrations_test.go (95%) rename {pkg => internal/static}/operator/reconciler_logs.go (87%) rename {pkg => internal/static}/operator/reconciler_metrics.go (96%) rename {pkg => internal/static}/operator/resources_integrations.go (97%) rename {pkg => internal/static}/operator/resources_logs.go (96%) rename {pkg => internal/static}/operator/resources_metrics.go (98%) rename {pkg => internal/static}/operator/resources_metrics_test.go (87%) rename {pkg => internal/static}/operator/resources_pod_template.go (98%) rename {pkg => internal/static}/operator/resources_pod_template_test.go (98%) rename {pkg => internal/static}/operator/testdata/test-custom-mounts.in.yaml (100%) rename {pkg => internal/static}/operator/testdata/test-custom-mounts.out.yaml (100%) rename {pkg => internal/static}/operator/testdata/test-integrations.in.yaml (100%) rename {pkg => internal/static}/operator/testdata/test-integrations.out.yaml (100%) rename {pkg => internal/static}/operator/testdata/test-metrics-instance.in.yaml (100%) rename {pkg => internal/static}/operator/testdata/test-metrics-instance.out.yaml (100%) rename {pkg => internal/static}/operator/testdata/test-resource-hierarchy.yaml (100%) rename {pkg => internal/static}/server/config.go (97%) rename {pkg => internal/static}/server/config_test.go (100%) rename {pkg => internal/static}/server/flags.go (100%) rename {pkg => internal/static}/server/logger.go (97%) rename {pkg => internal/static}/server/logger_test.go (100%) rename {pkg => internal/static}/server/logger_windows.go (100%) rename {pkg => internal/static}/server/server.go (100%) rename {pkg => internal/static}/server/server_test.go (100%) rename {pkg => internal/static}/server/signal_context.go (100%) rename {pkg => internal/static}/server/testdata/example-cert.pem (100%) rename {pkg => internal/static}/server/testdata/example-key.pem (100%) rename {pkg => internal/static}/server/testdata/windows/CLIENT_CA_CERT.cer (100%) rename {pkg => internal/static}/server/testdata/windows/README.md (100%) rename {pkg => internal/static}/server/testdata/windows/agent-config.yml (100%) rename {pkg => internal/static}/server/testdata/windows/client_cert.crt (100%) rename {pkg => internal/static}/server/testdata/windows/client_cert.pfx (100%) rename {pkg => internal/static}/server/testdata/windows/client_key.key (100%) rename {pkg => internal/static}/server/testdata/windows/client_key_unencrypted.key (100%) rename {pkg => internal/static}/server/testdata/windows/server_cert.crt (100%) rename {pkg => internal/static}/server/tls.go (100%) rename {pkg => internal/static}/server/tls_certstore_stub.go (100%) rename {pkg => internal/static}/server/tls_certstore_windows.go (100%) rename {pkg => internal/static}/server/tls_certstore_windows_test.go (100%) rename {pkg => internal/static}/server/tls_test.go (100%) rename {pkg => internal/static}/supportbundle/supportbundle.go (98%) rename {pkg => internal/static}/traces/automaticloggingprocessor/automaticloggingprocessor.go (97%) rename {pkg => internal/static}/traces/automaticloggingprocessor/automaticloggingprocessor_test.go (98%) rename {pkg => internal/static}/traces/automaticloggingprocessor/factory.go (98%) rename {pkg => internal/static}/traces/config.go (98%) rename {pkg => internal/static}/traces/config_test.go (99%) rename {pkg => internal/static}/traces/contextkeys/keys.go (100%) rename {pkg => internal/static}/traces/instance.go (92%) rename {pkg => internal/static}/traces/noopreceiver/factory.go (100%) rename {pkg => internal/static}/traces/noopreceiver/receiver.go (100%) rename {pkg => internal/static}/traces/promsdprocessor/consumer/consumer.go (99%) rename {pkg => internal/static}/traces/promsdprocessor/consumer/consumer_test.go (98%) rename {pkg => internal/static}/traces/promsdprocessor/factory.go (100%) rename {pkg => internal/static}/traces/promsdprocessor/prom_sd_processor.go (96%) rename {pkg => internal/static}/traces/promsdprocessor/prom_sd_processor_test.go (97%) rename {pkg => internal/static}/traces/pushreceiver/factory.go (100%) rename {pkg => internal/static}/traces/pushreceiver/receiver.go (100%) rename {pkg => internal/static}/traces/remotewriteexporter/exporter.go (98%) rename {pkg => internal/static}/traces/remotewriteexporter/exporter_test.go (97%) rename {pkg => internal/static}/traces/remotewriteexporter/factory.go (100%) rename {pkg => internal/static}/traces/servicegraphprocessor/factory.go (100%) rename {pkg => internal/static}/traces/servicegraphprocessor/processor.go (99%) rename {pkg => internal/static}/traces/servicegraphprocessor/processor_test.go (99%) rename {pkg => internal/static}/traces/servicegraphprocessor/store.go (100%) rename {pkg => internal/static}/traces/servicegraphprocessor/store_test.go (100%) rename {pkg => internal/static}/traces/servicegraphprocessor/testdata/trace-sample.json (100%) rename {pkg => internal/static}/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json (100%) rename {pkg => internal/static}/traces/traces.go (94%) rename {pkg => internal/static}/traces/traces_test.go (96%) rename {pkg => internal/static}/traces/traceutils/otel_meter_settings.go (100%) rename {pkg => internal/static}/traces/traceutils/server.go (99%) rename {docs/generator => internal/tools/docs_generator}/compatible_components_page.go (97%) rename {docs/generator => internal/tools/docs_generator}/docs_generator.go (94%) rename {docs => internal/tools/docs_generator}/docs_updated_test.go (83%) rename {docs/generator => internal/tools/docs_generator}/links_to_types.go (95%) rename {packaging => internal/tools/packaging_test}/agent_linux_packages_test.go (98%) rename {packaging => internal/tools/packaging_test}/environment_test.go (96%) rename {packaging => internal/tools/packaging_test}/flow_linux_packages_test.go (98%) rename {packaging => internal/tools/packaging_test}/testdata/centos-systemd.Dockerfile (100%) rename {packaging => internal/tools/packaging_test}/testdata/debian-systemd.Dockerfile (100%) rename {pkg => internal}/usagestats/reporter.go (100%) rename {pkg => internal}/usagestats/reporter_test.go (100%) rename {pkg => internal}/usagestats/stats.go (100%) rename {pkg => internal}/util/compare_yaml.go (100%) rename {pkg => internal}/util/compare_yaml_test.go (100%) rename {pkg => internal}/util/defaults.go (100%) rename {pkg => internal}/util/eventually.go (100%) rename {pkg => internal}/util/eventually_test.go (100%) rename {pkg => internal}/util/k8s/k8s.go (97%) rename {pkg => internal}/util/k8s/k8s_test.go (100%) rename {pkg => internal}/util/k8s/objects.go (100%) rename {pkg => internal}/util/k8s/resources.go (100%) rename {pkg => internal}/util/log/log.go (100%) rename {pkg => internal}/util/metrics.go (100%) rename {pkg => internal}/util/otel_feature_gate.go (100%) rename {pkg => internal}/util/otel_feature_gate_test.go (100%) rename {pkg => internal}/util/strings.go (100%) rename {pkg => internal}/util/structwalk/structwalk.go (100%) rename {pkg => internal}/util/structwalk/structwalk_test.go (100%) rename {pkg => internal}/util/subset/subset.go (100%) rename {pkg => internal}/util/subset/subset_test.go (100%) rename {pkg => internal}/util/test_logger.go (94%) rename {pkg => internal}/util/testappender/compare.go (100%) rename {pkg => internal}/util/testappender/internal/dtobuilder/dtobuilder.go (100%) rename {pkg => internal}/util/testappender/internal/dtobuilder/sort.go (100%) rename {pkg => internal}/util/testappender/testappender.go (98%) rename {pkg => internal}/util/testappender/testappender_test.go (99%) rename {pkg => internal}/util/trigger.go (100%) rename {pkg => internal}/util/trigger_test.go (100%) rename {pkg => internal}/util/unchecked_collector.go (100%) rename {pkg => internal}/util/unregisterer.go (100%) rename {pkg => internal}/util/untab.go (100%) rename {pkg => internal}/util/wildcard/match.go (100%) rename {pkg => internal}/util/wildcard/match_test.go (99%) rename {pkg => internal}/util/yaml.go (100%) rename {pkg => internal}/util/yaml_test.go (100%) rename {pkg => internal}/util/zapadapter/zapadapter.go (100%) rename {pkg => internal}/util/zapadapter/zapadapter_test.go (98%) rename {web => internal/web}/api/api.go (95%) rename {web => internal/web}/ui/.env (100%) rename {web => internal/web}/ui/.env.production (100%) rename {web => internal/web}/ui/.eslintrc.json (100%) rename {web => internal/web}/ui/.gitignore (100%) rename {web => internal/web}/ui/README.md (100%) rename {web => internal/web}/ui/assets_builtin.go (100%) rename {web => internal/web}/ui/assets_nobuiltin.go (72%) rename {web => internal/web}/ui/package.json (100%) rename {web => internal/web}/ui/public/favicon.ico (100%) rename {web => internal/web}/ui/public/index.html (100%) rename {web => internal/web}/ui/public/manifest.json (100%) rename {web => internal/web}/ui/public/robots.txt (100%) rename {web => internal/web}/ui/src/App.module.css (100%) rename {web => internal/web}/ui/src/App.tsx (100%) rename {web => internal/web}/ui/src/Router.tsx (100%) rename {web => internal/web}/ui/src/contexts/PathPrefixContext.tsx (100%) rename {web => internal/web}/ui/src/features/clustering/PeerList.module.css (100%) rename {web => internal/web}/ui/src/features/clustering/PeerList.tsx (100%) rename {web => internal/web}/ui/src/features/clustering/Table.module.css (100%) rename {web => internal/web}/ui/src/features/clustering/Table.tsx (100%) rename {web => internal/web}/ui/src/features/clustering/types.ts (100%) rename {web => internal/web}/ui/src/features/component/ComponentBody.tsx (100%) rename {web => internal/web}/ui/src/features/component/ComponentList.module.css (100%) rename {web => internal/web}/ui/src/features/component/ComponentList.tsx (100%) rename {web => internal/web}/ui/src/features/component/ComponentView.module.css (100%) rename {web => internal/web}/ui/src/features/component/ComponentView.tsx (100%) rename {web => internal/web}/ui/src/features/component/HealthLabel.module.css (100%) rename {web => internal/web}/ui/src/features/component/HealthLabel.tsx (100%) rename {web => internal/web}/ui/src/features/component/Table.module.css (100%) rename {web => internal/web}/ui/src/features/component/Table.tsx (100%) rename {web => internal/web}/ui/src/features/component/TableHead.tsx (100%) rename {web => internal/web}/ui/src/features/component/style.ts (100%) rename {web => internal/web}/ui/src/features/component/types.ts (100%) rename {web => internal/web}/ui/src/features/graph/ComponentGraph.tsx (100%) rename {web => internal/web}/ui/src/features/layout/Navbar.module.css (100%) rename {web => internal/web}/ui/src/features/layout/Navbar.tsx (100%) rename {web => internal/web}/ui/src/features/layout/Page.module.css (100%) rename {web => internal/web}/ui/src/features/layout/Page.tsx (100%) rename {web => internal/web}/ui/src/features/river-js/RiverValue.module.css (100%) rename {web => internal/web}/ui/src/features/river-js/RiverValue.tsx (100%) rename {web => internal/web}/ui/src/features/river-js/stringify.ts (100%) rename {web => internal/web}/ui/src/features/river-js/types.ts (100%) rename {web => internal/web}/ui/src/hooks/componentInfo.tsx (100%) rename {web => internal/web}/ui/src/hooks/peerInfo.tsx (100%) rename {web => internal/web}/ui/src/images/logo.svg (100%) rename {web => internal/web}/ui/src/index.css (100%) rename {web => internal/web}/ui/src/index.tsx (100%) rename {web => internal/web}/ui/src/pages/Clustering.tsx (100%) rename {web => internal/web}/ui/src/pages/ComponentDetailPage.tsx (100%) rename {web => internal/web}/ui/src/pages/Graph.tsx (100%) rename {web => internal/web}/ui/src/pages/PageComponentList.tsx (100%) rename {web => internal/web}/ui/src/react-app-env.d.ts (100%) rename {web => internal/web}/ui/src/static/fonts.css (100%) rename {web => internal/web}/ui/src/static/fonts/fira-code-v21-latin-500.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/fira-code-v21-latin-regular.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-100.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-100italic.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-300.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-300italic.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-500.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-500italic.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-700.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-700italic.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-900.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-900italic.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-italic.woff2 (100%) rename {web => internal/web}/ui/src/static/fonts/roboto-v30-latin-regular.woff2 (100%) rename {web => internal/web}/ui/src/utils/id.ts (100%) rename {web => internal/web}/ui/src/utils/partition.ts (100%) rename {web => internal/web}/ui/tsconfig.json (100%) rename {web => internal/web}/ui/ui.go (96%) rename {web => internal/web}/ui/yarn.lock (100%) delete mode 100644 pkg/integrations/install/install.go diff --git a/Makefile b/Makefile index 4281a954d6..a606df2d20 100644 --- a/Makefile +++ b/Makefile @@ -129,7 +129,7 @@ GO_ENV := GOOS=$(GOOS) GOARCH=$(GOARCH) GOARM=$(GOARM) CGO_ENABLED=$(CGO_ENABLED VERSION ?= $(shell bash ./tools/image-tag) GIT_REVISION := $(shell git rev-parse --short HEAD) GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD) -VPREFIX := github.com/grafana/agent/pkg/build +VPREFIX := github.com/grafana/agent/internal/build GO_LDFLAGS := -X $(VPREFIX).Branch=$(GIT_BRANCH) \ -X $(VPREFIX).Version=$(VERSION) \ -X $(VPREFIX).Revision=$(GIT_REVISION) \ @@ -150,7 +150,7 @@ endif # Targets for running tests # # These targets currently don't support proxying to a build container due to -# difficulties with testing ./pkg/util/k8s and testing packages. +# difficulties with testing ./internal/util/k8s and testing packages. # .PHONY: lint @@ -163,15 +163,15 @@ lint: agentlint # more without -race for packages that have known race detection issues. test: $(GO_ENV) go test $(GO_FLAGS) -race $(shell go list ./... | grep -v /integration-tests/) - $(GO_ENV) go test $(GO_FLAGS) ./pkg/integrations/node_exporter ./pkg/logs ./pkg/operator ./pkg/util/k8s ./component/otelcol/processor/tail_sampling ./component/loki/source/file ./component/loki/source/docker + $(GO_ENV) go test $(GO_FLAGS) ./internal/static/integrations/node_exporter ./internal/static/logs ./internal/static/operator ./internal/util/k8s ./internal/component/otelcol/processor/tail_sampling ./internal/component/loki/source/file ./internal/component/loki/source/docker test-packages: docker pull $(BUILD_IMAGE) - go test -tags=packaging ./packaging + go test -tags=packaging ./internal/tools/packaging_test .PHONY: integration-test integration-test: - cd integration-tests && $(GO_ENV) go run . + cd internal/cmd/integration-tests && $(GO_ENV) go run . # # Targets for building binaries @@ -235,7 +235,7 @@ agentlint: ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else - cd ./tools/agentlint && $(GO_ENV) go build $(GO_FLAGS) -o ../../$(AGENTLINT_BINARY) . + cd ./internal/cmd/agentlint && $(GO_ENV) go build $(GO_FLAGS) -o ../../../$(AGENTLINT_BINARY) . endif # @@ -272,7 +272,7 @@ ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else bash ./tools/generate-crds.bash - gen-crd-api-reference-docs -config tools/gen-crd-docs/config.json -api-dir "github.com/grafana/agent/pkg/operator/apis/monitoring/" -out-file docs/sources/operator/api.md -template-dir tools/gen-crd-docs/template + gen-crd-api-reference-docs -config tools/gen-crd-docs/config.json -api-dir "github.com/grafana/agent/internal/static/operator/apis/monitoring/" -out-file docs/sources/operator/api.md -template-dir tools/gen-crd-docs/template endif generate-drone: @@ -304,14 +304,14 @@ generate-protos: ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else - go generate ./pkg/agentproto/ + go generate ./internal/static/agentproto/ endif generate-ui: ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else - cd ./web/ui && yarn --network-timeout=1200000 && yarn run build + cd ./internal/web/ui && yarn --network-timeout=1200000 && yarn run build endif generate-versioned-files: diff --git a/cmd/grafana-agent-flow/main.go b/cmd/grafana-agent-flow/main.go index 60ad1707f0..6ba087e38f 100644 --- a/cmd/grafana-agent-flow/main.go +++ b/cmd/grafana-agent-flow/main.go @@ -7,8 +7,8 @@ package main import ( - "github.com/grafana/agent/cmd/internal/flowmode" - "github.com/grafana/agent/pkg/build" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/flowmode" "github.com/prometheus/client_golang/prometheus" // Register Prometheus SD components @@ -16,7 +16,7 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Register integrations - _ "github.com/grafana/agent/pkg/integrations/install" + _ "github.com/grafana/agent/internal/static/integrations/install" // Embed a set of fallback X.509 trusted roots // Allows the app to work correctly even when the OS does not provide a verifier or systems roots pool diff --git a/cmd/grafana-agent-operator/main.go b/cmd/grafana-agent-operator/main.go index a2a7df33b8..c857af1f61 100644 --- a/cmd/grafana-agent-operator/main.go +++ b/cmd/grafana-agent-operator/main.go @@ -7,10 +7,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/operator" - "github.com/grafana/agent/pkg/operator/logutil" - util_log "github.com/grafana/agent/pkg/util/log" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/operator" + "github.com/grafana/agent/internal/static/operator/logutil" + util_log "github.com/grafana/agent/internal/util/log" controller "sigs.k8s.io/controller-runtime" // Needed for clients. diff --git a/cmd/grafana-agent-service/service_test.go b/cmd/grafana-agent-service/service_test.go index a1d3124b03..145879a243 100644 --- a/cmd/grafana-agent-service/service_test.go +++ b/cmd/grafana-agent-service/service_test.go @@ -13,8 +13,8 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/phayes/freeport" "github.com/stretchr/testify/require" ) diff --git a/cmd/grafana-agent/entrypoint.go b/cmd/grafana-agent/entrypoint.go index 172bbf8c58..ea7b9a0eb3 100644 --- a/cmd/grafana-agent/entrypoint.go +++ b/cmd/grafana-agent/entrypoint.go @@ -18,14 +18,14 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" "github.com/grafana/agent/internal/agentseed" - "github.com/grafana/agent/pkg/config" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/supportbundle" - "github.com/grafana/agent/pkg/traces" - "github.com/grafana/agent/pkg/usagestats" + "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/static/supportbundle" + "github.com/grafana/agent/internal/static/traces" + "github.com/grafana/agent/internal/usagestats" "github.com/grafana/dskit/signals" "github.com/oklog/run" "github.com/prometheus/client_golang/prometheus" diff --git a/cmd/grafana-agent/main.go b/cmd/grafana-agent/main.go index 976d565481..750cecead2 100644 --- a/cmd/grafana-agent/main.go +++ b/cmd/grafana-agent/main.go @@ -6,12 +6,12 @@ import ( "os" "github.com/go-kit/log/level" - "github.com/grafana/agent/cmd/internal/flowmode" - "github.com/grafana/agent/pkg/boringcrypto" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/config" - "github.com/grafana/agent/pkg/server" - util_log "github.com/grafana/agent/pkg/util/log" + "github.com/grafana/agent/internal/boringcrypto" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/flowmode" + "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/internal/static/server" + util_log "github.com/grafana/agent/internal/util/log" "github.com/prometheus/client_golang/prometheus" @@ -20,7 +20,7 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Register integrations - _ "github.com/grafana/agent/pkg/integrations/install" + _ "github.com/grafana/agent/internal/static/integrations/install" // Embed a set of fallback X.509 trusted roots // Allows the app to work correctly even when the OS does not provide a verifier or systems roots pool diff --git a/cmd/grafana-agent/service_windows.go b/cmd/grafana-agent/service_windows.go index 707a84043d..1c94c71272 100644 --- a/cmd/grafana-agent/service_windows.go +++ b/cmd/grafana-agent/service_windows.go @@ -8,9 +8,9 @@ import ( "os" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/config" - "github.com/grafana/agent/pkg/server" - util_log "github.com/grafana/agent/pkg/util/log" + "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/internal/static/server" + util_log "github.com/grafana/agent/internal/util/log" "golang.org/x/sys/windows/svc" ) diff --git a/cmd/grafana-agentctl/main.go b/cmd/grafana-agentctl/main.go index 5219f85a0f..5022e50770 100644 --- a/cmd/grafana-agentctl/main.go +++ b/cmd/grafana-agentctl/main.go @@ -12,24 +12,24 @@ import ( "strings" "syscall" - "github.com/grafana/agent/pkg/agentctl/waltools" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/config" - "github.com/grafana/agent/pkg/logs" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/agentctl/waltools" + "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/internal/static/logs" "github.com/olekukonko/tablewriter" "github.com/prometheus/client_golang/prometheus" "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/agentctl" - "github.com/grafana/agent/pkg/client" + "github.com/grafana/agent/internal/static/agentctl" + "github.com/grafana/agent/internal/static/client" "github.com/spf13/cobra" // Register Prometheus SD components _ "github.com/prometheus/prometheus/discovery/install" // Register integrations - _ "github.com/grafana/agent/pkg/integrations/install" + _ "github.com/grafana/agent/internal/static/integrations/install" // Needed for operator-detach "k8s.io/apimachinery/pkg/fields" diff --git a/component/all/all.go b/component/all/all.go deleted file mode 100644 index 81e71a0e15..0000000000 --- a/component/all/all.go +++ /dev/null @@ -1,142 +0,0 @@ -// Package all imports all known component packages. -package all - -import ( - _ "github.com/grafana/agent/component/discovery/aws" // Import discovery.aws.ec2 and discovery.aws.lightsail - _ "github.com/grafana/agent/component/discovery/azure" // Import discovery.azure - _ "github.com/grafana/agent/component/discovery/consul" // Import discovery.consul - _ "github.com/grafana/agent/component/discovery/consulagent" // Import discovery.consulagent - _ "github.com/grafana/agent/component/discovery/digitalocean" // Import discovery.digitalocean - _ "github.com/grafana/agent/component/discovery/dns" // Import discovery.dns - _ "github.com/grafana/agent/component/discovery/docker" // Import discovery.docker - _ "github.com/grafana/agent/component/discovery/dockerswarm" // Import discovery.dockerswarm - _ "github.com/grafana/agent/component/discovery/eureka" // Import discovery.eureka - _ "github.com/grafana/agent/component/discovery/file" // Import discovery.file - _ "github.com/grafana/agent/component/discovery/gce" // Import discovery.gce - _ "github.com/grafana/agent/component/discovery/hetzner" // Import discovery.hetzner - _ "github.com/grafana/agent/component/discovery/http" // Import discovery.http - _ "github.com/grafana/agent/component/discovery/ionos" // Import discovery.ionos - _ "github.com/grafana/agent/component/discovery/kubelet" // Import discovery.kubelet - _ "github.com/grafana/agent/component/discovery/kubernetes" // Import discovery.kubernetes - _ "github.com/grafana/agent/component/discovery/kuma" // Import discovery.kuma - _ "github.com/grafana/agent/component/discovery/linode" // Import discovery.linode - _ "github.com/grafana/agent/component/discovery/marathon" // Import discovery.marathon - _ "github.com/grafana/agent/component/discovery/nerve" // Import discovery.nerve - _ "github.com/grafana/agent/component/discovery/nomad" // Import discovery.nomad - _ "github.com/grafana/agent/component/discovery/openstack" // Import discovery.openstack - _ "github.com/grafana/agent/component/discovery/ovhcloud" // Import discovery.ovhcloud - _ "github.com/grafana/agent/component/discovery/process" // Import discovery.process - _ "github.com/grafana/agent/component/discovery/puppetdb" // Import discovery.puppetdb - _ "github.com/grafana/agent/component/discovery/relabel" // Import discovery.relabel - _ "github.com/grafana/agent/component/discovery/scaleway" // Import discovery.scaleway - _ "github.com/grafana/agent/component/discovery/serverset" // Import discovery.serverset - _ "github.com/grafana/agent/component/discovery/triton" // Import discovery.triton - _ "github.com/grafana/agent/component/discovery/uyuni" // Import discovery.uyuni - _ "github.com/grafana/agent/component/faro/receiver" // Import faro.receiver - _ "github.com/grafana/agent/component/local/file" // Import local.file - _ "github.com/grafana/agent/component/local/file_match" // Import local.file_match - _ "github.com/grafana/agent/component/loki/echo" // Import loki.echo - _ "github.com/grafana/agent/component/loki/process" // Import loki.process - _ "github.com/grafana/agent/component/loki/relabel" // Import loki.relabel - _ "github.com/grafana/agent/component/loki/rules/kubernetes" // Import loki.rules.kubernetes - _ "github.com/grafana/agent/component/loki/source/api" // Import loki.source.api - _ "github.com/grafana/agent/component/loki/source/aws_firehose" // Import loki.source.awsfirehose - _ "github.com/grafana/agent/component/loki/source/azure_event_hubs" // Import loki.source.azure_event_hubs - _ "github.com/grafana/agent/component/loki/source/cloudflare" // Import loki.source.cloudflare - _ "github.com/grafana/agent/component/loki/source/docker" // Import loki.source.docker - _ "github.com/grafana/agent/component/loki/source/file" // Import loki.source.file - _ "github.com/grafana/agent/component/loki/source/gcplog" // Import loki.source.gcplog - _ "github.com/grafana/agent/component/loki/source/gelf" // Import loki.source.gelf - _ "github.com/grafana/agent/component/loki/source/heroku" // Import loki.source.heroku - _ "github.com/grafana/agent/component/loki/source/journal" // Import loki.source.journal - _ "github.com/grafana/agent/component/loki/source/kafka" // Import loki.source.kafka - _ "github.com/grafana/agent/component/loki/source/kubernetes" // Import loki.source.kubernetes - _ "github.com/grafana/agent/component/loki/source/kubernetes_events" // Import loki.source.kubernetes_events - _ "github.com/grafana/agent/component/loki/source/podlogs" // Import loki.source.podlogs - _ "github.com/grafana/agent/component/loki/source/syslog" // Import loki.source.syslog - _ "github.com/grafana/agent/component/loki/source/windowsevent" // Import loki.source.windowsevent - _ "github.com/grafana/agent/component/loki/write" // Import loki.write - _ "github.com/grafana/agent/component/mimir/rules/kubernetes" // Import mimir.rules.kubernetes - _ "github.com/grafana/agent/component/module/file" // Import module.file - _ "github.com/grafana/agent/component/module/git" // Import module.git - _ "github.com/grafana/agent/component/module/http" // Import module.http - _ "github.com/grafana/agent/component/module/string" // Import module.string - _ "github.com/grafana/agent/component/otelcol/auth/basic" // Import otelcol.auth.basic - _ "github.com/grafana/agent/component/otelcol/auth/bearer" // Import otelcol.auth.bearer - _ "github.com/grafana/agent/component/otelcol/auth/headers" // Import otelcol.auth.headers - _ "github.com/grafana/agent/component/otelcol/auth/oauth2" // Import otelcol.auth.oauth2 - _ "github.com/grafana/agent/component/otelcol/auth/sigv4" // Import otelcol.auth.sigv4 - _ "github.com/grafana/agent/component/otelcol/connector/host_info" // Import otelcol.connector.host_info - _ "github.com/grafana/agent/component/otelcol/connector/servicegraph" // Import otelcol.connector.servicegraph - _ "github.com/grafana/agent/component/otelcol/connector/spanlogs" // Import otelcol.connector.spanlogs - _ "github.com/grafana/agent/component/otelcol/connector/spanmetrics" // Import otelcol.connector.spanmetrics - _ "github.com/grafana/agent/component/otelcol/exporter/loadbalancing" // Import otelcol.exporter.loadbalancing - _ "github.com/grafana/agent/component/otelcol/exporter/logging" // Import otelcol.exporter.logging - _ "github.com/grafana/agent/component/otelcol/exporter/loki" // Import otelcol.exporter.loki - _ "github.com/grafana/agent/component/otelcol/exporter/otlp" // Import otelcol.exporter.otlp - _ "github.com/grafana/agent/component/otelcol/exporter/otlphttp" // Import otelcol.exporter.otlphttp - _ "github.com/grafana/agent/component/otelcol/exporter/prometheus" // Import otelcol.exporter.prometheus - _ "github.com/grafana/agent/component/otelcol/extension/jaeger_remote_sampling" // Import otelcol.extension.jaeger_remote_sampling - _ "github.com/grafana/agent/component/otelcol/processor/attributes" // Import otelcol.processor.attributes - _ "github.com/grafana/agent/component/otelcol/processor/batch" // Import otelcol.processor.batch - _ "github.com/grafana/agent/component/otelcol/processor/discovery" // Import otelcol.processor.discovery - _ "github.com/grafana/agent/component/otelcol/processor/filter" // Import otelcol.processor.filter - _ "github.com/grafana/agent/component/otelcol/processor/k8sattributes" // Import otelcol.processor.k8sattributes - _ "github.com/grafana/agent/component/otelcol/processor/memorylimiter" // Import otelcol.processor.memory_limiter - _ "github.com/grafana/agent/component/otelcol/processor/probabilistic_sampler" // Import otelcol.processor.probabilistic_sampler - _ "github.com/grafana/agent/component/otelcol/processor/resourcedetection" // Import otelcol.processor.resourcedetection - _ "github.com/grafana/agent/component/otelcol/processor/span" // Import otelcol.processor.span - _ "github.com/grafana/agent/component/otelcol/processor/tail_sampling" // Import otelcol.processor.tail_sampling - _ "github.com/grafana/agent/component/otelcol/processor/transform" // Import otelcol.processor.transform - _ "github.com/grafana/agent/component/otelcol/receiver/jaeger" // Import otelcol.receiver.jaeger - _ "github.com/grafana/agent/component/otelcol/receiver/kafka" // Import otelcol.receiver.kafka - _ "github.com/grafana/agent/component/otelcol/receiver/loki" // Import otelcol.receiver.loki - _ "github.com/grafana/agent/component/otelcol/receiver/opencensus" // Import otelcol.receiver.opencensus - _ "github.com/grafana/agent/component/otelcol/receiver/otlp" // Import otelcol.receiver.otlp - _ "github.com/grafana/agent/component/otelcol/receiver/prometheus" // Import otelcol.receiver.prometheus - _ "github.com/grafana/agent/component/otelcol/receiver/vcenter" // Import otelcol.receiver.vcenter - _ "github.com/grafana/agent/component/otelcol/receiver/zipkin" // Import otelcol.receiver.zipkin - _ "github.com/grafana/agent/component/prometheus/exporter/apache" // Import prometheus.exporter.apache - _ "github.com/grafana/agent/component/prometheus/exporter/azure" // Import prometheus.exporter.azure - _ "github.com/grafana/agent/component/prometheus/exporter/blackbox" // Import prometheus.exporter.blackbox - _ "github.com/grafana/agent/component/prometheus/exporter/cadvisor" // Import prometheus.exporter.cadvisor - _ "github.com/grafana/agent/component/prometheus/exporter/cloudwatch" // Import prometheus.exporter.cloudwatch - _ "github.com/grafana/agent/component/prometheus/exporter/consul" // Import prometheus.exporter.consul - _ "github.com/grafana/agent/component/prometheus/exporter/dnsmasq" // Import prometheus.exporter.dnsmasq - _ "github.com/grafana/agent/component/prometheus/exporter/elasticsearch" // Import prometheus.exporter.elasticsearch - _ "github.com/grafana/agent/component/prometheus/exporter/gcp" // Import prometheus.exporter.gcp - _ "github.com/grafana/agent/component/prometheus/exporter/github" // Import prometheus.exporter.github - _ "github.com/grafana/agent/component/prometheus/exporter/kafka" // Import prometheus.exporter.kafka - _ "github.com/grafana/agent/component/prometheus/exporter/memcached" // Import prometheus.exporter.memcached - _ "github.com/grafana/agent/component/prometheus/exporter/mongodb" // Import prometheus.exporter.mongodb - _ "github.com/grafana/agent/component/prometheus/exporter/mssql" // Import prometheus.exporter.mssql - _ "github.com/grafana/agent/component/prometheus/exporter/mysql" // Import prometheus.exporter.mysql - _ "github.com/grafana/agent/component/prometheus/exporter/oracledb" // Import prometheus.exporter.oracledb - _ "github.com/grafana/agent/component/prometheus/exporter/postgres" // Import prometheus.exporter.postgres - _ "github.com/grafana/agent/component/prometheus/exporter/process" // Import prometheus.exporter.process - _ "github.com/grafana/agent/component/prometheus/exporter/redis" // Import prometheus.exporter.redis - _ "github.com/grafana/agent/component/prometheus/exporter/self" // Import prometheus.exporter.self - _ "github.com/grafana/agent/component/prometheus/exporter/snmp" // Import prometheus.exporter.snmp - _ "github.com/grafana/agent/component/prometheus/exporter/snowflake" // Import prometheus.exporter.snowflake - _ "github.com/grafana/agent/component/prometheus/exporter/squid" // Import prometheus.exporter.squid - _ "github.com/grafana/agent/component/prometheus/exporter/statsd" // Import prometheus.exporter.statsd - _ "github.com/grafana/agent/component/prometheus/exporter/unix" // Import prometheus.exporter.unix - _ "github.com/grafana/agent/component/prometheus/exporter/vsphere" // Import prometheus.exporter.vsphere - _ "github.com/grafana/agent/component/prometheus/exporter/windows" // Import prometheus.exporter.windows - _ "github.com/grafana/agent/component/prometheus/operator/podmonitors" // Import prometheus.operator.podmonitors - _ "github.com/grafana/agent/component/prometheus/operator/probes" // Import prometheus.operator.probes - _ "github.com/grafana/agent/component/prometheus/operator/servicemonitors" // Import prometheus.operator.servicemonitors - _ "github.com/grafana/agent/component/prometheus/receive_http" // Import prometheus.receive_http - _ "github.com/grafana/agent/component/prometheus/relabel" // Import prometheus.relabel - _ "github.com/grafana/agent/component/prometheus/remotewrite" // Import prometheus.remote_write - _ "github.com/grafana/agent/component/prometheus/scrape" // Import prometheus.scrape - _ "github.com/grafana/agent/component/pyroscope/ebpf" // Import pyroscope.ebpf - _ "github.com/grafana/agent/component/pyroscope/java" // Import pyroscope.java - _ "github.com/grafana/agent/component/pyroscope/scrape" // Import pyroscope.scrape - _ "github.com/grafana/agent/component/pyroscope/write" // Import pyroscope.write - _ "github.com/grafana/agent/component/remote/http" // Import remote.http - _ "github.com/grafana/agent/component/remote/kubernetes/configmap" // Import remote.kubernetes.configmap - _ "github.com/grafana/agent/component/remote/kubernetes/secret" // Import remote.kubernetes.secret - _ "github.com/grafana/agent/component/remote/s3" // Import remote.s3 - _ "github.com/grafana/agent/component/remote/vault" // Import remote.vault -) diff --git a/converter/internal/prometheusconvert/prometheusconvert_test.go b/converter/internal/prometheusconvert/prometheusconvert_test.go deleted file mode 100644 index 00adf0544b..0000000000 --- a/converter/internal/prometheusconvert/prometheusconvert_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package prometheusconvert_test - -import ( - "testing" - - "github.com/grafana/agent/converter/internal/prometheusconvert" - "github.com/grafana/agent/converter/internal/test_common" - _ "github.com/grafana/agent/pkg/metrics/instance" -) - -func TestConvert(t *testing.T) { - test_common.TestDirectory(t, "testdata", ".yaml", true, []string{}, prometheusconvert.Convert) -} diff --git a/converter/internal/promtailconvert/promtailconvert_test.go b/converter/internal/promtailconvert/promtailconvert_test.go deleted file mode 100644 index 02184f1fcf..0000000000 --- a/converter/internal/promtailconvert/promtailconvert_test.go +++ /dev/null @@ -1,13 +0,0 @@ -package promtailconvert_test - -import ( - "testing" - - "github.com/grafana/agent/converter/internal/promtailconvert" - "github.com/grafana/agent/converter/internal/test_common" - _ "github.com/grafana/agent/pkg/metrics/instance" // Imported to override default values via the init function. -) - -func TestConvert(t *testing.T) { - test_common.TestDirectory(t, "testdata", ".yaml", true, []string{}, promtailconvert.Convert) -} diff --git a/docs/Makefile b/docs/Makefile index 473f6bab03..ea9ddf0df3 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -11,11 +11,11 @@ include docs.mk docs: check-cloudwatch-integration check-cloudwatch-integration: - $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.21-bullseye go run pkg/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md - $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.21-bullseye go run pkg/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md + $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.21-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/static/configuration/integrations/cloudwatch-exporter-config.md + $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.21-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go check /docs/sources/flow/reference/components/prometheus.exporter.cloudwatch.md generate-cloudwatch-integration: - $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.21-bullseye go run pkg/integrations/cloudwatch_exporter/docs/doc.go generate + $(PODMAN) run -v $(shell git rev-parse --show-toplevel):/repo -v $(shell pwd):/docs -w /repo golang:1.21-bullseye go run internal/static/integrations/cloudwatch_exporter/docs/doc.go generate sources/assets/hierarchy.svg: sources/operator/hierarchy.dot cat $< | $(PODMAN) run --rm -i nshine/dot dot -Tsvg > $@ diff --git a/docs/sources/operator/api.md b/docs/sources/operator/api.md index f79995f095..04df805f73 100644 --- a/docs/sources/operator/api.md +++ b/docs/sources/operator/api.md @@ -28,7 +28,7 @@ Deployment is a set of discovered resources relative to a GrafanaAgent. The tree |`Metrics`
_[[]MetricsDeployment](#monitoring.grafana.com/v1alpha1.MetricsDeployment)_| Metrics resources discovered by Agent. | |`Logs`
_[[]LogsDeployment](#monitoring.grafana.com/v1alpha1.LogsDeployment)_| Logs resources discovered by Agent. | |`Integrations`
_[[]IntegrationsDeployment](#monitoring.grafana.com/v1alpha1.IntegrationsDeployment)_| Integrations resources discovered by Agent. | -|`Secrets`
_[github.com/grafana/agent/pkg/operator/assets.SecretStore](https://pkg.go.dev/github.com/grafana/agent/pkg/operator/assets#SecretStore)_| The full list of Secrets referenced by resources in the Deployment. | +|`Secrets`
_[github.com/grafana/agent/internal/static/operator/assets.SecretStore](https://pkg.go.dev/github.com/grafana/agent/internal/static/operator/assets#SecretStore)_| The full list of Secrets referenced by resources in the Deployment. | ### GrafanaAgent (Appears on:[Deployment](#monitoring.grafana.com/v1alpha1.Deployment)) GrafanaAgent defines a Grafana Agent deployment. @@ -438,7 +438,7 @@ PipelineStageSpec defines an individual pipeline stage. Each stage type is mutua |`labels`
_map[string]string_| Labels is an action stage that takes data from the extracted map and modifies the label set that is sent to Loki with the log entry. The key is REQUIRED and represents the name for the label that will be created. Value is optional and will be the name from extracted data to use for the value of the label. If the value is not provided, it defaults to match the key. | |`limit`
_[LimitStageSpec](#monitoring.grafana.com/v1alpha1.LimitStageSpec)_| Limit is a rate-limiting stage that throttles logs based on several options. | |`match`
_[MatchStageSpec](#monitoring.grafana.com/v1alpha1.MatchStageSpec)_| Match is a filtering stage that conditionally applies a set of stages or drop entries when a log entry matches a configurable LogQL stream selector and filter expressions. | -|`metrics`
_[map[string]github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1.MetricsStageSpec](#monitoring.grafana.com/v1alpha1.MetricsStageSpec)_| Metrics is an action stage that supports defining and updating metrics based on data from the extracted map. Created metrics are not pushed to Loki or Prometheus and are instead exposed via the /metrics endpoint of the Grafana Agent pod. The Grafana Agent Operator should be configured with a MetricsInstance that discovers the logging DaemonSet to collect metrics created by this stage. | +|`metrics`
_[map[string]github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1.MetricsStageSpec](#monitoring.grafana.com/v1alpha1.MetricsStageSpec)_| Metrics is an action stage that supports defining and updating metrics based on data from the extracted map. Created metrics are not pushed to Loki or Prometheus and are instead exposed via the /metrics endpoint of the Grafana Agent pod. The Grafana Agent Operator should be configured with a MetricsInstance that discovers the logging DaemonSet to collect metrics created by this stage. | |`multiline`
_[MultilineStageSpec](#monitoring.grafana.com/v1alpha1.MultilineStageSpec)_| Multiline stage merges multiple lines into a multiline block before passing it on to the next stage in the pipeline. | |`output`
_[OutputStageSpec](#monitoring.grafana.com/v1alpha1.OutputStageSpec)_| Output stage is an action stage that takes data from the extracted map and changes the log line that will be sent to Loki. | |`pack`
_[PackStageSpec](#monitoring.grafana.com/v1alpha1.PackStageSpec)_| Pack is a transform stage that lets you embed extracted values and labels into the log line by packing the log line and labels inside of a JSON object. | diff --git a/docs/sources/static/api/_index.md b/docs/sources/static/api/_index.md index 077ba3e1b2..1f6715e9d7 100644 --- a/docs/sources/static/api/_index.md +++ b/docs/sources/static/api/_index.md @@ -402,7 +402,7 @@ defaults to `localhost:12345`. The support bundle contains all information in plain text, so that it can be inspected before sharing, to verify that no sensitive information has leaked. -In addition, you can inspect the [supportbundle package](https://github.com/grafana/agent/tree/main/pkg/supportbundle) +In addition, you can inspect the [supportbundle package](https://github.com/grafana/agent/tree/main/internal/static/supportbundle) to verify the code that is being used to generate these bundles. A support bundle contains the following data: diff --git a/docs/sources/static/configuration/integrations/integrations-next/snmp-config.md b/docs/sources/static/configuration/integrations/integrations-next/snmp-config.md index 173711f713..2f331d6d69 100644 --- a/docs/sources/static/configuration/integrations/integrations-next/snmp-config.md +++ b/docs/sources/static/configuration/integrations/integrations-next/snmp-config.md @@ -124,7 +124,7 @@ Full reference of options: snmp_config: [- ... ] [- ... ] - + # List of SNMP targets to poll snmp_targets: [- ... ] @@ -148,7 +148,7 @@ Full reference of options: [module: | default = ""] # SNMP authentication profile to use - [auth: | default = ""] + [auth: | default = ""] # walk_param config to use for this snmp_target [walk_params: | default = ""] @@ -173,6 +173,6 @@ Full reference of options: SNMP module is the set of SNMP counters to be scraped together from the specific network device. -SNMP modules available can be found in the embedded snmp.yml file [here](https://github.com/grafana/agent/blob/main/pkg/integrations/snmp_exporter/common/snmp.yml). If not specified, `if_mib` module is used. +SNMP modules available can be found in the embedded snmp.yml file [here](https://github.com/grafana/agent/blob/main/internal/static/integrations/snmp_exporter/common/snmp.yml). If not specified, `if_mib` module is used. If you need to use custom SNMP modules, you can [generate](https://github.com/prometheus/snmp_exporter#generating-configuration) your own snmp.yml file and specify it using `config_file` parameter. diff --git a/docs/sources/static/configuration/integrations/snmp-config.md b/docs/sources/static/configuration/integrations/snmp-config.md index c9c4f910f9..bd8cfcfe62 100644 --- a/docs/sources/static/configuration/integrations/snmp-config.md +++ b/docs/sources/static/configuration/integrations/snmp-config.md @@ -188,6 +188,6 @@ Full reference of options: SNMP module is the set of SNMP counters to be scraped together from the specific network device. -SNMP modules available can be found in the embedded snmp.yml file [here](https://github.com/grafana/agent/blob/main/pkg/integrations/snmp_exporter/common/snmp.yml). If not specified, `if_mib` module is used. +SNMP modules available can be found in the embedded snmp.yml file [here](https://github.com/grafana/agent/blob/main/internal/static/integrations/snmp_exporter/common/snmp.yml). If not specified, `if_mib` module is used. If you need to use custom SNMP modules, you can [generate](https://github.com/prometheus/snmp_exporter#generating-configuration) your own snmp.yml file and specify it using `config_file` parameter. diff --git a/internal/agentseed/agentseed.go b/internal/agentseed/agentseed.go index 2405c732d9..0275e81c33 100644 --- a/internal/agentseed/agentseed.go +++ b/internal/agentseed/agentseed.go @@ -11,7 +11,7 @@ import ( "github.com/go-kit/log" "github.com/google/uuid" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/version" ) diff --git a/pkg/boringcrypto/disabled.go b/internal/boringcrypto/disabled.go similarity index 100% rename from pkg/boringcrypto/disabled.go rename to internal/boringcrypto/disabled.go diff --git a/pkg/boringcrypto/enabled.go b/internal/boringcrypto/enabled.go similarity index 100% rename from pkg/boringcrypto/enabled.go rename to internal/boringcrypto/enabled.go diff --git a/pkg/build/build.go b/internal/build/build.go similarity index 100% rename from pkg/build/build.go rename to internal/build/build.go diff --git a/tools/agentlint/go.mod b/internal/cmd/agentlint/go.mod similarity index 62% rename from tools/agentlint/go.mod rename to internal/cmd/agentlint/go.mod index 1b7afa5bd2..8c68e5a43b 100644 --- a/tools/agentlint/go.mod +++ b/internal/cmd/agentlint/go.mod @@ -1,4 +1,4 @@ -module github.com/grafana/agent/tools/agentlint +module github.com/grafana/agent/internal/cmd/agentlint go 1.21 diff --git a/tools/agentlint/go.sum b/internal/cmd/agentlint/go.sum similarity index 100% rename from tools/agentlint/go.sum rename to internal/cmd/agentlint/go.sum diff --git a/tools/agentlint/internal/findcomponents/findcomponents.go b/internal/cmd/agentlint/internal/findcomponents/findcomponents.go similarity index 94% rename from tools/agentlint/internal/findcomponents/findcomponents.go rename to internal/cmd/agentlint/internal/findcomponents/findcomponents.go index 835c01bfce..922798a89d 100644 --- a/tools/agentlint/internal/findcomponents/findcomponents.go +++ b/internal/cmd/agentlint/internal/findcomponents/findcomponents.go @@ -18,8 +18,8 @@ var Analyzer = &analysis.Analyzer{ } var ( - componentPattern = "./component/..." - checkPackage = "github.com/grafana/agent/component/all" + componentPattern = "./internal/component/..." + checkPackage = "github.com/grafana/agent/internal/component/all" ) func init() { @@ -131,7 +131,7 @@ func declaresComponent(pkg *packages.Package, file *ast.File) bool { // Check to see if the ident refers to // github.com/grafana/agent/component. if pkgName, ok := pkg.TypesInfo.Uses[ident].(*types.PkgName); ok { - if pkgName.Imported().Path() == "github.com/grafana/agent/component" && + if pkgName.Imported().Path() == "github.com/grafana/agent/internal/component" && sel.Sel.Name == "Register" { foundComponentDecl = true diff --git a/tools/agentlint/internal/rivertags/rivertags.go b/internal/cmd/agentlint/internal/rivertags/rivertags.go similarity index 100% rename from tools/agentlint/internal/rivertags/rivertags.go rename to internal/cmd/agentlint/internal/rivertags/rivertags.go diff --git a/tools/agentlint/main.go b/internal/cmd/agentlint/main.go similarity index 63% rename from tools/agentlint/main.go rename to internal/cmd/agentlint/main.go index fa3d349dc1..d580d4a324 100644 --- a/tools/agentlint/main.go +++ b/internal/cmd/agentlint/main.go @@ -3,8 +3,8 @@ package main import ( - "github.com/grafana/agent/tools/agentlint/internal/findcomponents" - "github.com/grafana/agent/tools/agentlint/internal/rivertags" + "github.com/grafana/agent/internal/cmd/agentlint/internal/findcomponents" + "github.com/grafana/agent/internal/cmd/agentlint/internal/rivertags" "golang.org/x/tools/go/analysis/multichecker" ) diff --git a/integration-tests/README.md b/internal/cmd/integration-tests/README.md similarity index 100% rename from integration-tests/README.md rename to internal/cmd/integration-tests/README.md diff --git a/integration-tests/common/common.go b/internal/cmd/integration-tests/common/common.go similarity index 100% rename from integration-tests/common/common.go rename to internal/cmd/integration-tests/common/common.go diff --git a/integration-tests/common/log.go b/internal/cmd/integration-tests/common/log.go similarity index 100% rename from integration-tests/common/log.go rename to internal/cmd/integration-tests/common/log.go diff --git a/integration-tests/common/metric.go b/internal/cmd/integration-tests/common/metric.go similarity index 100% rename from integration-tests/common/metric.go rename to internal/cmd/integration-tests/common/metric.go diff --git a/integration-tests/common/metrics_assert.go b/internal/cmd/integration-tests/common/metrics_assert.go similarity index 100% rename from integration-tests/common/metrics_assert.go rename to internal/cmd/integration-tests/common/metrics_assert.go diff --git a/integration-tests/configs/mimir/mimir.yaml b/internal/cmd/integration-tests/configs/mimir/mimir.yaml similarity index 100% rename from integration-tests/configs/mimir/mimir.yaml rename to internal/cmd/integration-tests/configs/mimir/mimir.yaml diff --git a/integration-tests/configs/prom-gen/Dockerfile b/internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile similarity index 74% rename from integration-tests/configs/prom-gen/Dockerfile rename to internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile index 7c39574868..0270edbd0b 100644 --- a/integration-tests/configs/prom-gen/Dockerfile +++ b/internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.21 as build WORKDIR /app/ COPY go.mod go.sum ./ RUN go mod download -COPY ./integration-tests/configs/prom-gen/ ./ +COPY ./internal/cmd/integration-tests/configs/otel-metrics-gen/ ./ RUN CGO_ENABLED=0 go build -o main main.go FROM alpine:3.18 COPY --from=build /app/main /app/main diff --git a/integration-tests/configs/otel-metrics-gen/main.go b/internal/cmd/integration-tests/configs/otel-metrics-gen/main.go similarity index 100% rename from integration-tests/configs/otel-metrics-gen/main.go rename to internal/cmd/integration-tests/configs/otel-metrics-gen/main.go diff --git a/integration-tests/configs/otel-metrics-gen/Dockerfile b/internal/cmd/integration-tests/configs/prom-gen/Dockerfile similarity index 77% rename from integration-tests/configs/otel-metrics-gen/Dockerfile rename to internal/cmd/integration-tests/configs/prom-gen/Dockerfile index 8bf0038766..d1e0bfdcaf 100644 --- a/integration-tests/configs/otel-metrics-gen/Dockerfile +++ b/internal/cmd/integration-tests/configs/prom-gen/Dockerfile @@ -2,7 +2,7 @@ FROM golang:1.21 as build WORKDIR /app/ COPY go.mod go.sum ./ RUN go mod download -COPY ./integration-tests/configs/otel-metrics-gen/ ./ +COPY ./internal/cmd/integration-tests/configs/prom-gen/ ./ RUN CGO_ENABLED=0 go build -o main main.go FROM alpine:3.18 COPY --from=build /app/main /app/main diff --git a/integration-tests/configs/prom-gen/main.go b/internal/cmd/integration-tests/configs/prom-gen/main.go similarity index 100% rename from integration-tests/configs/prom-gen/main.go rename to internal/cmd/integration-tests/configs/prom-gen/main.go diff --git a/integration-tests/docker-compose.yaml b/internal/cmd/integration-tests/docker-compose.yaml similarity index 71% rename from integration-tests/docker-compose.yaml rename to internal/cmd/integration-tests/docker-compose.yaml index eb5650f75f..1b1d40df71 100644 --- a/integration-tests/docker-compose.yaml +++ b/internal/cmd/integration-tests/docker-compose.yaml @@ -19,18 +19,18 @@ services: otel-metrics-gen: build: - dockerfile: ./integration-tests/configs/otel-metrics-gen/Dockerfile - context: .. + dockerfile: ./internal/cmd/integration-tests/configs/otel-metrics-gen/Dockerfile + context: ../../.. environment: - OTEL_EXPORTER_ENDPOINT=${OTEL_EXPORTER_ENDPOINT:-host.docker.internal:4318} - + prom-gen: build: - dockerfile: ./integration-tests/configs/prom-gen/Dockerfile - context: .. + dockerfile: ./internal/cmd/integration-tests/configs/prom-gen/Dockerfile + context: ../../.. ports: - "9001:9001" redis: image: redis:6.0.9-alpine ports: - - "6379:6379" \ No newline at end of file + - "6379:6379" diff --git a/integration-tests/main.go b/internal/cmd/integration-tests/main.go similarity index 100% rename from integration-tests/main.go rename to internal/cmd/integration-tests/main.go diff --git a/integration-tests/tests/otlp-metrics/config.river b/internal/cmd/integration-tests/tests/otlp-metrics/config.river similarity index 100% rename from integration-tests/tests/otlp-metrics/config.river rename to internal/cmd/integration-tests/tests/otlp-metrics/config.river diff --git a/integration-tests/tests/otlp-metrics/otlp_metrics_test.go b/internal/cmd/integration-tests/tests/otlp-metrics/otlp_metrics_test.go similarity index 75% rename from integration-tests/tests/otlp-metrics/otlp_metrics_test.go rename to internal/cmd/integration-tests/tests/otlp-metrics/otlp_metrics_test.go index f244f57213..157f334448 100644 --- a/integration-tests/tests/otlp-metrics/otlp_metrics_test.go +++ b/internal/cmd/integration-tests/tests/otlp-metrics/otlp_metrics_test.go @@ -5,7 +5,7 @@ package main import ( "testing" - "github.com/grafana/agent/integration-tests/common" + "github.com/grafana/agent/internal/cmd/integration-tests/common" ) func TestOTLPMetrics(t *testing.T) { diff --git a/integration-tests/tests/otlp-metrics/otlp_to_prom_metrics_test.go b/internal/cmd/integration-tests/tests/otlp-metrics/otlp_to_prom_metrics_test.go similarity index 90% rename from integration-tests/tests/otlp-metrics/otlp_to_prom_metrics_test.go rename to internal/cmd/integration-tests/tests/otlp-metrics/otlp_to_prom_metrics_test.go index 930de77ba4..beca3f9ccf 100644 --- a/integration-tests/tests/otlp-metrics/otlp_to_prom_metrics_test.go +++ b/internal/cmd/integration-tests/tests/otlp-metrics/otlp_to_prom_metrics_test.go @@ -5,7 +5,7 @@ package main import ( "testing" - "github.com/grafana/agent/integration-tests/common" + "github.com/grafana/agent/internal/cmd/integration-tests/common" ) func TestOTLPToPromMetrics(t *testing.T) { diff --git a/integration-tests/tests/read-log-file/config.river b/internal/cmd/integration-tests/tests/read-log-file/config.river similarity index 100% rename from integration-tests/tests/read-log-file/config.river rename to internal/cmd/integration-tests/tests/read-log-file/config.river diff --git a/integration-tests/tests/read-log-file/logs.txt b/internal/cmd/integration-tests/tests/read-log-file/logs.txt similarity index 100% rename from integration-tests/tests/read-log-file/logs.txt rename to internal/cmd/integration-tests/tests/read-log-file/logs.txt diff --git a/integration-tests/tests/read-log-file/read_log_file_test.go b/internal/cmd/integration-tests/tests/read-log-file/read_log_file_test.go similarity index 93% rename from integration-tests/tests/read-log-file/read_log_file_test.go rename to internal/cmd/integration-tests/tests/read-log-file/read_log_file_test.go index 5e42fc3a6b..0549fcbb1e 100644 --- a/integration-tests/tests/read-log-file/read_log_file_test.go +++ b/internal/cmd/integration-tests/tests/read-log-file/read_log_file_test.go @@ -5,7 +5,7 @@ package main import ( "testing" - "github.com/grafana/agent/integration-tests/common" + "github.com/grafana/agent/internal/cmd/integration-tests/common" "github.com/stretchr/testify/assert" ) diff --git a/integration-tests/tests/redis/config.river b/internal/cmd/integration-tests/tests/redis/config.river similarity index 100% rename from integration-tests/tests/redis/config.river rename to internal/cmd/integration-tests/tests/redis/config.river diff --git a/integration-tests/tests/redis/redis_metrics_test.go b/internal/cmd/integration-tests/tests/redis/redis_metrics_test.go similarity index 91% rename from integration-tests/tests/redis/redis_metrics_test.go rename to internal/cmd/integration-tests/tests/redis/redis_metrics_test.go index b21c35c0ef..3063d8fdf1 100644 --- a/integration-tests/tests/redis/redis_metrics_test.go +++ b/internal/cmd/integration-tests/tests/redis/redis_metrics_test.go @@ -5,7 +5,7 @@ package main import ( "testing" - "github.com/grafana/agent/integration-tests/common" + "github.com/grafana/agent/internal/cmd/integration-tests/common" ) func TestRedisMetrics(t *testing.T) { diff --git a/integration-tests/tests/scrape-prom-metrics/config.river b/internal/cmd/integration-tests/tests/scrape-prom-metrics/config.river similarity index 100% rename from integration-tests/tests/scrape-prom-metrics/config.river rename to internal/cmd/integration-tests/tests/scrape-prom-metrics/config.river diff --git a/integration-tests/tests/scrape-prom-metrics/scrape_prom_metrics_test.go b/internal/cmd/integration-tests/tests/scrape-prom-metrics/scrape_prom_metrics_test.go similarity index 76% rename from integration-tests/tests/scrape-prom-metrics/scrape_prom_metrics_test.go rename to internal/cmd/integration-tests/tests/scrape-prom-metrics/scrape_prom_metrics_test.go index 8765c8930e..dbac235d18 100644 --- a/integration-tests/tests/scrape-prom-metrics/scrape_prom_metrics_test.go +++ b/internal/cmd/integration-tests/tests/scrape-prom-metrics/scrape_prom_metrics_test.go @@ -5,7 +5,7 @@ package main import ( "testing" - "github.com/grafana/agent/integration-tests/common" + "github.com/grafana/agent/internal/cmd/integration-tests/common" ) func TestScrapePromMetrics(t *testing.T) { diff --git a/integration-tests/tests/unix/config.river b/internal/cmd/integration-tests/tests/unix/config.river similarity index 100% rename from integration-tests/tests/unix/config.river rename to internal/cmd/integration-tests/tests/unix/config.river diff --git a/integration-tests/tests/unix/unix_metrics_test.go b/internal/cmd/integration-tests/tests/unix/unix_metrics_test.go similarity index 98% rename from integration-tests/tests/unix/unix_metrics_test.go rename to internal/cmd/integration-tests/tests/unix/unix_metrics_test.go index 7456ac2970..1611a47959 100644 --- a/integration-tests/tests/unix/unix_metrics_test.go +++ b/internal/cmd/integration-tests/tests/unix/unix_metrics_test.go @@ -5,7 +5,7 @@ package main import ( "testing" - "github.com/grafana/agent/integration-tests/common" + "github.com/grafana/agent/internal/cmd/integration-tests/common" ) func TestUnixMetrics(t *testing.T) { diff --git a/integration-tests/utils.go b/internal/cmd/integration-tests/utils.go similarity index 95% rename from integration-tests/utils.go rename to internal/cmd/integration-tests/utils.go index 28ad81b95e..a7d94650a7 100644 --- a/integration-tests/utils.go +++ b/internal/cmd/integration-tests/utils.go @@ -12,7 +12,7 @@ import ( ) const ( - agentBinaryPath = "../../../build/grafana-agent-flow" + agentBinaryPath = "../../../../../build/grafana-agent-flow" ) type TestLog struct { @@ -34,7 +34,7 @@ func executeCommand(command string, args []string, taskDescription string) { } func buildAgent() { - executeCommand("make", []string{"-C", "..", "agent-flow"}, "Building agent") + executeCommand("make", []string{"-C", "../../..", "agent-flow"}, "Building agent") } func setupEnvironment() { diff --git a/tools/rivereval/example.river b/internal/cmd/rivereval/example.river similarity index 100% rename from tools/rivereval/example.river rename to internal/cmd/rivereval/example.river diff --git a/tools/rivereval/main.go b/internal/cmd/rivereval/main.go similarity index 100% rename from tools/rivereval/main.go rename to internal/cmd/rivereval/main.go diff --git a/internal/component/all/all.go b/internal/component/all/all.go new file mode 100644 index 0000000000..f6911eb95b --- /dev/null +++ b/internal/component/all/all.go @@ -0,0 +1,142 @@ +// Package all imports all known component packages. +package all + +import ( + _ "github.com/grafana/agent/internal/component/discovery/aws" // Import discovery.aws.ec2 and discovery.aws.lightsail + _ "github.com/grafana/agent/internal/component/discovery/azure" // Import discovery.azure + _ "github.com/grafana/agent/internal/component/discovery/consul" // Import discovery.consul + _ "github.com/grafana/agent/internal/component/discovery/consulagent" // Import discovery.consulagent + _ "github.com/grafana/agent/internal/component/discovery/digitalocean" // Import discovery.digitalocean + _ "github.com/grafana/agent/internal/component/discovery/dns" // Import discovery.dns + _ "github.com/grafana/agent/internal/component/discovery/docker" // Import discovery.docker + _ "github.com/grafana/agent/internal/component/discovery/dockerswarm" // Import discovery.dockerswarm + _ "github.com/grafana/agent/internal/component/discovery/eureka" // Import discovery.eureka + _ "github.com/grafana/agent/internal/component/discovery/file" // Import discovery.file + _ "github.com/grafana/agent/internal/component/discovery/gce" // Import discovery.gce + _ "github.com/grafana/agent/internal/component/discovery/hetzner" // Import discovery.hetzner + _ "github.com/grafana/agent/internal/component/discovery/http" // Import discovery.http + _ "github.com/grafana/agent/internal/component/discovery/ionos" // Import discovery.ionos + _ "github.com/grafana/agent/internal/component/discovery/kubelet" // Import discovery.kubelet + _ "github.com/grafana/agent/internal/component/discovery/kubernetes" // Import discovery.kubernetes + _ "github.com/grafana/agent/internal/component/discovery/kuma" // Import discovery.kuma + _ "github.com/grafana/agent/internal/component/discovery/linode" // Import discovery.linode + _ "github.com/grafana/agent/internal/component/discovery/marathon" // Import discovery.marathon + _ "github.com/grafana/agent/internal/component/discovery/nerve" // Import discovery.nerve + _ "github.com/grafana/agent/internal/component/discovery/nomad" // Import discovery.nomad + _ "github.com/grafana/agent/internal/component/discovery/openstack" // Import discovery.openstack + _ "github.com/grafana/agent/internal/component/discovery/ovhcloud" // Import discovery.ovhcloud + _ "github.com/grafana/agent/internal/component/discovery/process" // Import discovery.process + _ "github.com/grafana/agent/internal/component/discovery/puppetdb" // Import discovery.puppetdb + _ "github.com/grafana/agent/internal/component/discovery/relabel" // Import discovery.relabel + _ "github.com/grafana/agent/internal/component/discovery/scaleway" // Import discovery.scaleway + _ "github.com/grafana/agent/internal/component/discovery/serverset" // Import discovery.serverset + _ "github.com/grafana/agent/internal/component/discovery/triton" // Import discovery.triton + _ "github.com/grafana/agent/internal/component/discovery/uyuni" // Import discovery.uyuni + _ "github.com/grafana/agent/internal/component/faro/receiver" // Import faro.receiver + _ "github.com/grafana/agent/internal/component/local/file" // Import local.file + _ "github.com/grafana/agent/internal/component/local/file_match" // Import local.file_match + _ "github.com/grafana/agent/internal/component/loki/echo" // Import loki.echo + _ "github.com/grafana/agent/internal/component/loki/process" // Import loki.process + _ "github.com/grafana/agent/internal/component/loki/relabel" // Import loki.relabel + _ "github.com/grafana/agent/internal/component/loki/rules/kubernetes" // Import loki.rules.kubernetes + _ "github.com/grafana/agent/internal/component/loki/source/api" // Import loki.source.api + _ "github.com/grafana/agent/internal/component/loki/source/aws_firehose" // Import loki.source.awsfirehose + _ "github.com/grafana/agent/internal/component/loki/source/azure_event_hubs" // Import loki.source.azure_event_hubs + _ "github.com/grafana/agent/internal/component/loki/source/cloudflare" // Import loki.source.cloudflare + _ "github.com/grafana/agent/internal/component/loki/source/docker" // Import loki.source.docker + _ "github.com/grafana/agent/internal/component/loki/source/file" // Import loki.source.file + _ "github.com/grafana/agent/internal/component/loki/source/gcplog" // Import loki.source.gcplog + _ "github.com/grafana/agent/internal/component/loki/source/gelf" // Import loki.source.gelf + _ "github.com/grafana/agent/internal/component/loki/source/heroku" // Import loki.source.heroku + _ "github.com/grafana/agent/internal/component/loki/source/journal" // Import loki.source.journal + _ "github.com/grafana/agent/internal/component/loki/source/kafka" // Import loki.source.kafka + _ "github.com/grafana/agent/internal/component/loki/source/kubernetes" // Import loki.source.kubernetes + _ "github.com/grafana/agent/internal/component/loki/source/kubernetes_events" // Import loki.source.kubernetes_events + _ "github.com/grafana/agent/internal/component/loki/source/podlogs" // Import loki.source.podlogs + _ "github.com/grafana/agent/internal/component/loki/source/syslog" // Import loki.source.syslog + _ "github.com/grafana/agent/internal/component/loki/source/windowsevent" // Import loki.source.windowsevent + _ "github.com/grafana/agent/internal/component/loki/write" // Import loki.write + _ "github.com/grafana/agent/internal/component/mimir/rules/kubernetes" // Import mimir.rules.kubernetes + _ "github.com/grafana/agent/internal/component/module/file" // Import module.file + _ "github.com/grafana/agent/internal/component/module/git" // Import module.git + _ "github.com/grafana/agent/internal/component/module/http" // Import module.http + _ "github.com/grafana/agent/internal/component/module/string" // Import module.string + _ "github.com/grafana/agent/internal/component/otelcol/auth/basic" // Import otelcol.auth.basic + _ "github.com/grafana/agent/internal/component/otelcol/auth/bearer" // Import otelcol.auth.bearer + _ "github.com/grafana/agent/internal/component/otelcol/auth/headers" // Import otelcol.auth.headers + _ "github.com/grafana/agent/internal/component/otelcol/auth/oauth2" // Import otelcol.auth.oauth2 + _ "github.com/grafana/agent/internal/component/otelcol/auth/sigv4" // Import otelcol.auth.sigv4 + _ "github.com/grafana/agent/internal/component/otelcol/connector/host_info" // Import otelcol.connector.host_info + _ "github.com/grafana/agent/internal/component/otelcol/connector/servicegraph" // Import otelcol.connector.servicegraph + _ "github.com/grafana/agent/internal/component/otelcol/connector/spanlogs" // Import otelcol.connector.spanlogs + _ "github.com/grafana/agent/internal/component/otelcol/connector/spanmetrics" // Import otelcol.connector.spanmetrics + _ "github.com/grafana/agent/internal/component/otelcol/exporter/loadbalancing" // Import otelcol.exporter.loadbalancing + _ "github.com/grafana/agent/internal/component/otelcol/exporter/logging" // Import otelcol.exporter.logging + _ "github.com/grafana/agent/internal/component/otelcol/exporter/loki" // Import otelcol.exporter.loki + _ "github.com/grafana/agent/internal/component/otelcol/exporter/otlp" // Import otelcol.exporter.otlp + _ "github.com/grafana/agent/internal/component/otelcol/exporter/otlphttp" // Import otelcol.exporter.otlphttp + _ "github.com/grafana/agent/internal/component/otelcol/exporter/prometheus" // Import otelcol.exporter.prometheus + _ "github.com/grafana/agent/internal/component/otelcol/extension/jaeger_remote_sampling" // Import otelcol.extension.jaeger_remote_sampling + _ "github.com/grafana/agent/internal/component/otelcol/processor/attributes" // Import otelcol.processor.attributes + _ "github.com/grafana/agent/internal/component/otelcol/processor/batch" // Import otelcol.processor.batch + _ "github.com/grafana/agent/internal/component/otelcol/processor/discovery" // Import otelcol.processor.discovery + _ "github.com/grafana/agent/internal/component/otelcol/processor/filter" // Import otelcol.processor.filter + _ "github.com/grafana/agent/internal/component/otelcol/processor/k8sattributes" // Import otelcol.processor.k8sattributes + _ "github.com/grafana/agent/internal/component/otelcol/processor/memorylimiter" // Import otelcol.processor.memory_limiter + _ "github.com/grafana/agent/internal/component/otelcol/processor/probabilistic_sampler" // Import otelcol.processor.probabilistic_sampler + _ "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection" // Import otelcol.processor.resourcedetection + _ "github.com/grafana/agent/internal/component/otelcol/processor/span" // Import otelcol.processor.span + _ "github.com/grafana/agent/internal/component/otelcol/processor/tail_sampling" // Import otelcol.processor.tail_sampling + _ "github.com/grafana/agent/internal/component/otelcol/processor/transform" // Import otelcol.processor.transform + _ "github.com/grafana/agent/internal/component/otelcol/receiver/jaeger" // Import otelcol.receiver.jaeger + _ "github.com/grafana/agent/internal/component/otelcol/receiver/kafka" // Import otelcol.receiver.kafka + _ "github.com/grafana/agent/internal/component/otelcol/receiver/loki" // Import otelcol.receiver.loki + _ "github.com/grafana/agent/internal/component/otelcol/receiver/opencensus" // Import otelcol.receiver.opencensus + _ "github.com/grafana/agent/internal/component/otelcol/receiver/otlp" // Import otelcol.receiver.otlp + _ "github.com/grafana/agent/internal/component/otelcol/receiver/prometheus" // Import otelcol.receiver.prometheus + _ "github.com/grafana/agent/internal/component/otelcol/receiver/vcenter" // Import otelcol.receiver.vcenter + _ "github.com/grafana/agent/internal/component/otelcol/receiver/zipkin" // Import otelcol.receiver.zipkin + _ "github.com/grafana/agent/internal/component/prometheus/exporter/apache" // Import prometheus.exporter.apache + _ "github.com/grafana/agent/internal/component/prometheus/exporter/azure" // Import prometheus.exporter.azure + _ "github.com/grafana/agent/internal/component/prometheus/exporter/blackbox" // Import prometheus.exporter.blackbox + _ "github.com/grafana/agent/internal/component/prometheus/exporter/cadvisor" // Import prometheus.exporter.cadvisor + _ "github.com/grafana/agent/internal/component/prometheus/exporter/cloudwatch" // Import prometheus.exporter.cloudwatch + _ "github.com/grafana/agent/internal/component/prometheus/exporter/consul" // Import prometheus.exporter.consul + _ "github.com/grafana/agent/internal/component/prometheus/exporter/dnsmasq" // Import prometheus.exporter.dnsmasq + _ "github.com/grafana/agent/internal/component/prometheus/exporter/elasticsearch" // Import prometheus.exporter.elasticsearch + _ "github.com/grafana/agent/internal/component/prometheus/exporter/gcp" // Import prometheus.exporter.gcp + _ "github.com/grafana/agent/internal/component/prometheus/exporter/github" // Import prometheus.exporter.github + _ "github.com/grafana/agent/internal/component/prometheus/exporter/kafka" // Import prometheus.exporter.kafka + _ "github.com/grafana/agent/internal/component/prometheus/exporter/memcached" // Import prometheus.exporter.memcached + _ "github.com/grafana/agent/internal/component/prometheus/exporter/mongodb" // Import prometheus.exporter.mongodb + _ "github.com/grafana/agent/internal/component/prometheus/exporter/mssql" // Import prometheus.exporter.mssql + _ "github.com/grafana/agent/internal/component/prometheus/exporter/mysql" // Import prometheus.exporter.mysql + _ "github.com/grafana/agent/internal/component/prometheus/exporter/oracledb" // Import prometheus.exporter.oracledb + _ "github.com/grafana/agent/internal/component/prometheus/exporter/postgres" // Import prometheus.exporter.postgres + _ "github.com/grafana/agent/internal/component/prometheus/exporter/process" // Import prometheus.exporter.process + _ "github.com/grafana/agent/internal/component/prometheus/exporter/redis" // Import prometheus.exporter.redis + _ "github.com/grafana/agent/internal/component/prometheus/exporter/self" // Import prometheus.exporter.self + _ "github.com/grafana/agent/internal/component/prometheus/exporter/snmp" // Import prometheus.exporter.snmp + _ "github.com/grafana/agent/internal/component/prometheus/exporter/snowflake" // Import prometheus.exporter.snowflake + _ "github.com/grafana/agent/internal/component/prometheus/exporter/squid" // Import prometheus.exporter.squid + _ "github.com/grafana/agent/internal/component/prometheus/exporter/statsd" // Import prometheus.exporter.statsd + _ "github.com/grafana/agent/internal/component/prometheus/exporter/unix" // Import prometheus.exporter.unix + _ "github.com/grafana/agent/internal/component/prometheus/exporter/vsphere" // Import prometheus.exporter.vsphere + _ "github.com/grafana/agent/internal/component/prometheus/exporter/windows" // Import prometheus.exporter.windows + _ "github.com/grafana/agent/internal/component/prometheus/operator/podmonitors" // Import prometheus.operator.podmonitors + _ "github.com/grafana/agent/internal/component/prometheus/operator/probes" // Import prometheus.operator.probes + _ "github.com/grafana/agent/internal/component/prometheus/operator/servicemonitors" // Import prometheus.operator.servicemonitors + _ "github.com/grafana/agent/internal/component/prometheus/receive_http" // Import prometheus.receive_http + _ "github.com/grafana/agent/internal/component/prometheus/relabel" // Import prometheus.relabel + _ "github.com/grafana/agent/internal/component/prometheus/remotewrite" // Import prometheus.remote_write + _ "github.com/grafana/agent/internal/component/prometheus/scrape" // Import prometheus.scrape + _ "github.com/grafana/agent/internal/component/pyroscope/ebpf" // Import pyroscope.ebpf + _ "github.com/grafana/agent/internal/component/pyroscope/java" // Import pyroscope.java + _ "github.com/grafana/agent/internal/component/pyroscope/scrape" // Import pyroscope.scrape + _ "github.com/grafana/agent/internal/component/pyroscope/write" // Import pyroscope.write + _ "github.com/grafana/agent/internal/component/remote/http" // Import remote.http + _ "github.com/grafana/agent/internal/component/remote/kubernetes/configmap" // Import remote.kubernetes.configmap + _ "github.com/grafana/agent/internal/component/remote/kubernetes/secret" // Import remote.kubernetes.secret + _ "github.com/grafana/agent/internal/component/remote/s3" // Import remote.s3 + _ "github.com/grafana/agent/internal/component/remote/vault" // Import remote.vault +) diff --git a/component/common/config/selectors.go b/internal/component/common/config/selectors.go similarity index 100% rename from component/common/config/selectors.go rename to internal/component/common/config/selectors.go diff --git a/component/common/config/types.go b/internal/component/common/config/types.go similarity index 100% rename from component/common/config/types.go rename to internal/component/common/config/types.go diff --git a/component/common/config/types_test.go b/internal/component/common/config/types_test.go similarity index 100% rename from component/common/config/types_test.go rename to internal/component/common/config/types_test.go diff --git a/component/common/kubernetes/kubernetes.go b/internal/component/common/kubernetes/kubernetes.go similarity index 95% rename from component/common/kubernetes/kubernetes.go rename to internal/component/common/kubernetes/kubernetes.go index d46c3c0238..df09a0f224 100644 --- a/component/common/kubernetes/kubernetes.go +++ b/internal/component/common/kubernetes/kubernetes.go @@ -5,9 +5,9 @@ import ( "reflect" "github.com/go-kit/log" - commoncfg "github.com/grafana/agent/component/common/config" + commoncfg "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" promconfig "github.com/prometheus/common/config" "k8s.io/client-go/rest" "k8s.io/client-go/tools/clientcmd" diff --git a/component/common/kubernetes/kubernetes_test.go b/internal/component/common/kubernetes/kubernetes_test.go similarity index 100% rename from component/common/kubernetes/kubernetes_test.go rename to internal/component/common/kubernetes/kubernetes_test.go diff --git a/component/common/loki/client/batch.go b/internal/component/common/loki/client/batch.go similarity index 98% rename from component/common/loki/client/batch.go rename to internal/component/common/loki/client/batch.go index 66a2ac7859..c47d60ee1b 100644 --- a/component/common/loki/client/batch.go +++ b/internal/component/common/loki/client/batch.go @@ -11,7 +11,7 @@ import ( "github.com/prometheus/common/model" "golang.org/x/exp/slices" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/logproto" ) diff --git a/component/common/loki/client/batch_test.go b/internal/component/common/loki/client/batch_test.go similarity index 98% rename from component/common/loki/client/batch_test.go rename to internal/component/common/loki/client/batch_test.go index 2701f0a0c7..db27075800 100644 --- a/component/common/loki/client/batch_test.go +++ b/internal/component/common/loki/client/batch_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/logproto" ) diff --git a/component/common/loki/client/client.go b/internal/component/common/loki/client/client.go similarity index 99% rename from component/common/loki/client/client.go rename to internal/component/common/loki/client/client.go index 5b426b4a18..b3726cd6f3 100644 --- a/component/common/loki/client/client.go +++ b/internal/component/common/loki/client/client.go @@ -13,15 +13,15 @@ import ( "time" "github.com/go-kit/log" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" "github.com/grafana/dskit/backoff" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/config" "github.com/prometheus/common/model" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/util" lokiutil "github.com/grafana/loki/pkg/util" ) diff --git a/component/common/loki/client/client_test.go b/internal/component/common/loki/client/client_test.go similarity index 99% rename from component/common/loki/client/client_test.go rename to internal/component/common/loki/client/client_test.go index a253fdf613..4849562bdd 100644 --- a/component/common/loki/client/client_test.go +++ b/internal/component/common/loki/client/client_test.go @@ -19,7 +19,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/clients/pkg/promtail/utils" "github.com/grafana/loki/pkg/logproto" diff --git a/component/common/loki/client/config.go b/internal/component/common/loki/client/config.go similarity index 100% rename from component/common/loki/client/config.go rename to internal/component/common/loki/client/config.go diff --git a/component/common/loki/client/config_test.go b/internal/component/common/loki/client/config_test.go similarity index 100% rename from component/common/loki/client/config_test.go rename to internal/component/common/loki/client/config_test.go diff --git a/component/common/loki/client/fake/client.go b/internal/component/common/loki/client/fake/client.go similarity index 95% rename from component/common/loki/client/fake/client.go rename to internal/component/common/loki/client/fake/client.go index 63b0253dfd..e27f2c2c8a 100644 --- a/component/common/loki/client/fake/client.go +++ b/internal/component/common/loki/client/fake/client.go @@ -3,7 +3,7 @@ package fake import ( "sync" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" ) // Client is a fake client used for testing. diff --git a/component/common/loki/client/internal/marker_encoding.go b/internal/component/common/loki/client/internal/marker_encoding.go similarity index 100% rename from component/common/loki/client/internal/marker_encoding.go rename to internal/component/common/loki/client/internal/marker_encoding.go diff --git a/component/common/loki/client/internal/marker_encoding_test.go b/internal/component/common/loki/client/internal/marker_encoding_test.go similarity index 100% rename from component/common/loki/client/internal/marker_encoding_test.go rename to internal/component/common/loki/client/internal/marker_encoding_test.go diff --git a/component/common/loki/client/internal/marker_file_handler.go b/internal/component/common/loki/client/internal/marker_file_handler.go similarity index 98% rename from component/common/loki/client/internal/marker_file_handler.go rename to internal/component/common/loki/client/internal/marker_file_handler.go index 72a314af3e..d96f14225d 100644 --- a/component/common/loki/client/internal/marker_file_handler.go +++ b/internal/component/common/loki/client/internal/marker_file_handler.go @@ -8,7 +8,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/component/common/loki/wal" + "github.com/grafana/agent/internal/component/common/loki/wal" "github.com/natefinch/atomic" ) diff --git a/component/common/loki/client/internal/marker_file_handler_test.go b/internal/component/common/loki/client/internal/marker_file_handler_test.go similarity index 100% rename from component/common/loki/client/internal/marker_file_handler_test.go rename to internal/component/common/loki/client/internal/marker_file_handler_test.go diff --git a/component/common/loki/client/internal/marker_handler.go b/internal/component/common/loki/client/internal/marker_handler.go similarity index 98% rename from component/common/loki/client/internal/marker_handler.go rename to internal/component/common/loki/client/internal/marker_handler.go index 0aaf5ff193..7b59e618f3 100644 --- a/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/agent/component/common/loki/wal" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki/wal" + "github.com/grafana/agent/internal/flow/logging/level" ) type MarkerHandler interface { diff --git a/component/common/loki/client/internal/marker_handler_test.go b/internal/component/common/loki/client/internal/marker_handler_test.go similarity index 100% rename from component/common/loki/client/internal/marker_handler_test.go rename to internal/component/common/loki/client/internal/marker_handler_test.go diff --git a/component/common/loki/client/internal/metrics.go b/internal/component/common/loki/client/internal/metrics.go similarity index 96% rename from component/common/loki/client/internal/metrics.go rename to internal/component/common/loki/client/internal/metrics.go index f169fde398..baf2700763 100644 --- a/component/common/loki/client/internal/metrics.go +++ b/internal/component/common/loki/client/internal/metrics.go @@ -1,7 +1,7 @@ package internal import ( - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" ) diff --git a/component/common/loki/client/logger.go b/internal/component/common/loki/client/logger.go similarity index 90% rename from component/common/loki/client/logger.go rename to internal/component/common/loki/client/logger.go index 073d74bb0b..7f9790a542 100644 --- a/component/common/loki/client/logger.go +++ b/internal/component/common/loki/client/logger.go @@ -12,9 +12,9 @@ import ( "github.com/prometheus/client_golang/prometheus" "gopkg.in/yaml.v2" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/limit" - "github.com/grafana/agent/component/common/loki/wal" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/limit" + "github.com/grafana/agent/internal/component/common/loki/wal" ) var ( diff --git a/component/common/loki/client/logger_test.go b/internal/component/common/loki/client/logger_test.go similarity index 92% rename from component/common/loki/client/logger_test.go rename to internal/component/common/loki/client/logger_test.go index 54109c94f6..fd8451095e 100644 --- a/component/common/loki/client/logger_test.go +++ b/internal/component/common/loki/client/logger_test.go @@ -9,7 +9,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/logproto" util_log "github.com/grafana/loki/pkg/util/log" ) diff --git a/component/common/loki/client/manager.go b/internal/component/common/loki/client/manager.go similarity index 96% rename from component/common/loki/client/manager.go rename to internal/component/common/loki/client/manager.go index 244aa587a8..b9fa13c7ce 100644 --- a/component/common/loki/client/manager.go +++ b/internal/component/common/loki/client/manager.go @@ -7,13 +7,13 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki/client/internal" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki/client/internal" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/limit" - "github.com/grafana/agent/component/common/loki/wal" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/limit" + "github.com/grafana/agent/internal/component/common/loki/wal" ) // WriterEventsNotifier implements a notifier that's received by the Manager, to which wal.Watcher can subscribe for diff --git a/component/common/loki/client/manager_test.go b/internal/component/common/loki/client/manager_test.go similarity index 97% rename from component/common/loki/client/manager_test.go rename to internal/component/common/loki/client/manager_test.go index 6dae1370d4..c499e957d3 100644 --- a/component/common/loki/client/manager_test.go +++ b/internal/component/common/loki/client/manager_test.go @@ -16,10 +16,10 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/limit" - "github.com/grafana/agent/component/common/loki/utils" - "github.com/grafana/agent/component/common/loki/wal" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/limit" + "github.com/grafana/agent/internal/component/common/loki/utils" + "github.com/grafana/agent/internal/component/common/loki/wal" "github.com/grafana/loki/pkg/logproto" lokiflag "github.com/grafana/loki/pkg/util/flagext" diff --git a/component/common/loki/client/metrics.go b/internal/component/common/loki/client/metrics.go similarity index 95% rename from component/common/loki/client/metrics.go rename to internal/component/common/loki/client/metrics.go index 6d32bf1ce4..3bd8a2324a 100644 --- a/component/common/loki/client/metrics.go +++ b/internal/component/common/loki/client/metrics.go @@ -1,7 +1,7 @@ package client import ( - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" ) diff --git a/component/common/loki/client/queue_client.go b/internal/component/common/loki/client/queue_client.go similarity index 99% rename from component/common/loki/client/queue_client.go rename to internal/component/common/loki/client/queue_client.go index edd9c25bbd..4f6bef989b 100644 --- a/component/common/loki/client/queue_client.go +++ b/internal/component/common/loki/client/queue_client.go @@ -14,7 +14,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - agentWal "github.com/grafana/agent/component/common/loki/wal" + agentWal "github.com/grafana/agent/internal/component/common/loki/wal" "github.com/grafana/dskit/backoff" "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/common/loki/client/queue_client_test.go b/internal/component/common/loki/client/queue_client_test.go similarity index 98% rename from component/common/loki/client/queue_client_test.go rename to internal/component/common/loki/client/queue_client_test.go index cf59f49e1b..daf798a955 100644 --- a/component/common/loki/client/queue_client_test.go +++ b/internal/component/common/loki/client/queue_client_test.go @@ -8,9 +8,9 @@ import ( "github.com/alecthomas/units" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/client/internal" - "github.com/grafana/agent/component/common/loki/utils" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/client/internal" + "github.com/grafana/agent/internal/component/common/loki/utils" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/flagext" "github.com/prometheus/client_golang/prometheus" diff --git a/component/common/loki/limit/config.go b/internal/component/common/loki/limit/config.go similarity index 100% rename from component/common/loki/limit/config.go rename to internal/component/common/loki/limit/config.go diff --git a/component/common/loki/positions/positions.go b/internal/component/common/loki/positions/positions.go similarity index 99% rename from component/common/loki/positions/positions.go rename to internal/component/common/loki/positions/positions.go index eb6b72d3dd..0201d39e47 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" yaml "gopkg.in/yaml.v2" ) diff --git a/component/common/loki/positions/positions_test.go b/internal/component/common/loki/positions/positions_test.go similarity index 100% rename from component/common/loki/positions/positions_test.go rename to internal/component/common/loki/positions/positions_test.go diff --git a/component/common/loki/positions/write_positions_unix.go b/internal/component/common/loki/positions/write_positions_unix.go similarity index 100% rename from component/common/loki/positions/write_positions_unix.go rename to internal/component/common/loki/positions/write_positions_unix.go diff --git a/component/common/loki/positions/write_positions_windows.go b/internal/component/common/loki/positions/write_positions_windows.go similarity index 100% rename from component/common/loki/positions/write_positions_windows.go rename to internal/component/common/loki/positions/write_positions_windows.go diff --git a/component/common/loki/types.go b/internal/component/common/loki/types.go similarity index 100% rename from component/common/loki/types.go rename to internal/component/common/loki/types.go diff --git a/component/common/loki/utils/convert.go b/internal/component/common/loki/utils/convert.go similarity index 100% rename from component/common/loki/utils/convert.go rename to internal/component/common/loki/utils/convert.go diff --git a/component/common/loki/utils/remotewrite_server.go b/internal/component/common/loki/utils/remotewrite_server.go similarity index 100% rename from component/common/loki/utils/remotewrite_server.go rename to internal/component/common/loki/utils/remotewrite_server.go diff --git a/component/common/loki/utils/sync.go b/internal/component/common/loki/utils/sync.go similarity index 100% rename from component/common/loki/utils/sync.go rename to internal/component/common/loki/utils/sync.go diff --git a/component/common/loki/wal/config.go b/internal/component/common/loki/wal/config.go similarity index 100% rename from component/common/loki/wal/config.go rename to internal/component/common/loki/wal/config.go diff --git a/component/common/loki/wal/internal/watcher_state.go b/internal/component/common/loki/wal/internal/watcher_state.go similarity index 97% rename from component/common/loki/wal/internal/watcher_state.go rename to internal/component/common/loki/wal/internal/watcher_state.go index c81413dfd2..e9ae3614c2 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) const ( diff --git a/component/common/loki/wal/reader.go b/internal/component/common/loki/wal/reader.go similarity index 96% rename from component/common/loki/wal/reader.go rename to internal/component/common/loki/wal/reader.go index 4664e946eb..41cdc19787 100644 --- a/component/common/loki/wal/reader.go +++ b/internal/component/common/loki/wal/reader.go @@ -5,7 +5,7 @@ import ( "github.com/prometheus/common/model" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/ingester/wal" "github.com/grafana/loki/pkg/util" walUtils "github.com/grafana/loki/pkg/util/wal" diff --git a/component/common/loki/wal/timer.go b/internal/component/common/loki/wal/timer.go similarity index 100% rename from component/common/loki/wal/timer.go rename to internal/component/common/loki/wal/timer.go diff --git a/component/common/loki/wal/timer_test.go b/internal/component/common/loki/wal/timer_test.go similarity index 100% rename from component/common/loki/wal/timer_test.go rename to internal/component/common/loki/wal/timer_test.go diff --git a/component/common/loki/wal/wal.go b/internal/component/common/loki/wal/wal.go similarity index 98% rename from component/common/loki/wal/wal.go rename to internal/component/common/loki/wal/wal.go index 9e1999ec90..277c7d67df 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/tsdb/wlog" diff --git a/component/common/loki/wal/watcher.go b/internal/component/common/loki/wal/watcher.go similarity index 99% rename from component/common/loki/wal/watcher.go rename to internal/component/common/loki/wal/watcher.go index f91e71b856..a7818ac491 100644 --- a/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/agent/component/common/loki/wal/internal" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki/wal/internal" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/prometheus/tsdb/record" "github.com/prometheus/prometheus/tsdb/wlog" diff --git a/component/common/loki/wal/watcher_metrics.go b/internal/component/common/loki/wal/watcher_metrics.go similarity index 98% rename from component/common/loki/wal/watcher_metrics.go rename to internal/component/common/loki/wal/watcher_metrics.go index ce8052fd44..6c7d06b442 100644 --- a/component/common/loki/wal/watcher_metrics.go +++ b/internal/component/common/loki/wal/watcher_metrics.go @@ -1,7 +1,7 @@ package wal import ( - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" ) diff --git a/component/common/loki/wal/watcher_test.go b/internal/component/common/loki/wal/watcher_test.go similarity index 99% rename from component/common/loki/wal/watcher_test.go rename to internal/component/common/loki/wal/watcher_test.go index 959dad3a5f..aa025bf302 100644 --- a/component/common/loki/wal/watcher_test.go +++ b/internal/component/common/loki/wal/watcher_test.go @@ -8,15 +8,15 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/tsdb/record" "github.com/stretchr/testify/require" "go.uber.org/atomic" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/utils" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/utils" "github.com/grafana/loki/pkg/ingester/wal" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/util" diff --git a/component/common/loki/wal/writer.go b/internal/component/common/loki/wal/writer.go similarity index 98% rename from component/common/loki/wal/writer.go rename to internal/component/common/loki/wal/writer.go index e71773d944..a44b9e59dc 100644 --- a/component/common/loki/wal/writer.go +++ b/internal/component/common/loki/wal/writer.go @@ -10,13 +10,13 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/tsdb/chunks" "github.com/prometheus/prometheus/tsdb/record" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/ingester/wal" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/util" diff --git a/component/common/loki/wal/writer_test.go b/internal/component/common/loki/wal/writer_test.go similarity index 98% rename from component/common/loki/wal/writer_test.go rename to internal/component/common/loki/wal/writer_test.go index c8ef5d50dc..019506343e 100644 --- a/component/common/loki/wal/writer_test.go +++ b/internal/component/common/loki/wal/writer_test.go @@ -8,12 +8,12 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/logproto" ) diff --git a/component/common/net/config.go b/internal/component/common/net/config.go similarity index 100% rename from component/common/net/config.go rename to internal/component/common/net/config.go diff --git a/component/common/net/config_test.go b/internal/component/common/net/config_test.go similarity index 100% rename from component/common/net/config_test.go rename to internal/component/common/net/config_test.go diff --git a/component/common/net/server.go b/internal/component/common/net/server.go similarity index 98% rename from component/common/net/server.go rename to internal/component/common/net/server.go index 7756cf1c60..d892b341d2 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" dskit "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/component/common/net/server_test.go b/internal/component/common/net/server_test.go similarity index 97% rename from component/common/net/server_test.go rename to internal/component/common/net/server_test.go index 5c0261b6ae..657aee26b2 100644 --- a/component/common/net/server_test.go +++ b/internal/component/common/net/server_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" ) diff --git a/component/common/relabel/relabel.go b/internal/component/common/relabel/relabel.go similarity index 100% rename from component/common/relabel/relabel.go rename to internal/component/common/relabel/relabel.go diff --git a/component/common/relabel/relabel_test.go b/internal/component/common/relabel/relabel_test.go similarity index 100% rename from component/common/relabel/relabel_test.go rename to internal/component/common/relabel/relabel_test.go diff --git a/component/component.go b/internal/component/component.go similarity index 100% rename from component/component.go rename to internal/component/component.go diff --git a/component/component_health.go b/internal/component/component_health.go similarity index 100% rename from component/component_health.go rename to internal/component/component_health.go diff --git a/component/component_health_test.go b/internal/component/component_health_test.go similarity index 97% rename from component/component_health_test.go rename to internal/component/component_health_test.go index 8fca2bbfe2..831fdc6c9e 100644 --- a/component/component_health_test.go +++ b/internal/component/component_health_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/stretchr/testify/require" ) diff --git a/component/component_provider.go b/internal/component/component_provider.go similarity index 100% rename from component/component_provider.go rename to internal/component/component_provider.go diff --git a/component/discovery/aws/ec2.go b/internal/component/discovery/aws/ec2.go similarity index 95% rename from component/discovery/aws/ec2.go rename to internal/component/discovery/aws/ec2.go index 689355b1b3..2ce3b18090 100644 --- a/component/discovery/aws/ec2.go +++ b/internal/component/discovery/aws/ec2.go @@ -6,9 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" promcfg "github.com/prometheus/common/config" diff --git a/component/discovery/aws/ec2_test.go b/internal/component/discovery/aws/ec2_test.go similarity index 92% rename from component/discovery/aws/ec2_test.go rename to internal/component/discovery/aws/ec2_test.go index a927716afb..d0239f43cd 100644 --- a/component/discovery/aws/ec2_test.go +++ b/internal/component/discovery/aws/ec2_test.go @@ -4,7 +4,7 @@ import ( "net/url" "testing" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/stretchr/testify/require" "gotest.tools/assert" ) diff --git a/component/discovery/aws/lightsail.go b/internal/component/discovery/aws/lightsail.go similarity index 94% rename from component/discovery/aws/lightsail.go rename to internal/component/discovery/aws/lightsail.go index 9ba82a6735..786cab3d07 100644 --- a/component/discovery/aws/lightsail.go +++ b/internal/component/discovery/aws/lightsail.go @@ -6,9 +6,9 @@ import ( "github.com/aws/aws-sdk-go/aws/ec2metadata" "github.com/aws/aws-sdk-go/aws/session" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" promcfg "github.com/prometheus/common/config" diff --git a/component/discovery/azure/azure.go b/internal/component/discovery/azure/azure.go similarity index 95% rename from component/discovery/azure/azure.go rename to internal/component/discovery/azure/azure.go index 2f7ff9263c..78a8a669e0 100644 --- a/component/discovery/azure/azure.go +++ b/internal/component/discovery/azure/azure.go @@ -5,9 +5,9 @@ import ( "time" "github.com/Azure/go-autorest/autorest/azure" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" common "github.com/prometheus/common/config" diff --git a/component/discovery/azure/azure_test.go b/internal/component/discovery/azure/azure_test.go similarity index 98% rename from component/discovery/azure/azure_test.go rename to internal/component/discovery/azure/azure_test.go index bf350c0bab..df28d6765e 100644 --- a/component/discovery/azure/azure_test.go +++ b/internal/component/discovery/azure/azure_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" diff --git a/component/discovery/consul/consul.go b/internal/component/discovery/consul/consul.go similarity index 95% rename from component/discovery/consul/consul.go rename to internal/component/discovery/consul/consul.go index 2286641297..a7fe7b95ec 100644 --- a/component/discovery/consul/consul.go +++ b/internal/component/discovery/consul/consul.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/component/discovery/consul/consul_test.go b/internal/component/discovery/consul/consul_test.go similarity index 100% rename from component/discovery/consul/consul_test.go rename to internal/component/discovery/consul/consul_test.go diff --git a/component/discovery/consulagent/consulagent.go b/internal/component/discovery/consulagent/consulagent.go similarity index 94% rename from component/discovery/consulagent/consulagent.go rename to internal/component/discovery/consulagent/consulagent.go index 556a5484a4..2610fbcc9c 100644 --- a/component/discovery/consulagent/consulagent.go +++ b/internal/component/discovery/consulagent/consulagent.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" promcfg "github.com/prometheus/common/config" diff --git a/component/discovery/consulagent/consulagent_test.go b/internal/component/discovery/consulagent/consulagent_test.go similarity index 100% rename from component/discovery/consulagent/consulagent_test.go rename to internal/component/discovery/consulagent/consulagent_test.go diff --git a/component/discovery/consulagent/promtail_consulagent.go b/internal/component/discovery/consulagent/promtail_consulagent.go similarity index 99% rename from component/discovery/consulagent/promtail_consulagent.go rename to internal/component/discovery/consulagent/promtail_consulagent.go index 0cc56d0987..77e98d4c4f 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" consul "github.com/hashicorp/consul/api" conntrack "github.com/mwitkow/go-conntrack" "github.com/prometheus/client_golang/prometheus" diff --git a/component/discovery/consulagent/promtail_consulagent_test.go b/internal/component/discovery/consulagent/promtail_consulagent_test.go similarity index 100% rename from component/discovery/consulagent/promtail_consulagent_test.go rename to internal/component/discovery/consulagent/promtail_consulagent_test.go diff --git a/component/discovery/digitalocean/digitalocean.go b/internal/component/discovery/digitalocean/digitalocean.go similarity index 94% rename from component/discovery/digitalocean/digitalocean.go rename to internal/component/discovery/digitalocean/digitalocean.go index 19131e92ee..1cae77f9be 100644 --- a/component/discovery/digitalocean/digitalocean.go +++ b/internal/component/discovery/digitalocean/digitalocean.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/model" diff --git a/component/discovery/digitalocean/digitalocean_test.go b/internal/component/discovery/digitalocean/digitalocean_test.go similarity index 97% rename from component/discovery/digitalocean/digitalocean_test.go rename to internal/component/discovery/digitalocean/digitalocean_test.go index ade941f53b..1988858333 100644 --- a/component/discovery/digitalocean/digitalocean_test.go +++ b/internal/component/discovery/digitalocean/digitalocean_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" prom_common_config "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/discovery/discovery.go b/internal/component/discovery/discovery.go similarity index 98% rename from component/discovery/discovery.go rename to internal/component/discovery/discovery.go index ebeca72ecd..2d4014cbb7 100644 --- a/component/discovery/discovery.go +++ b/internal/component/discovery/discovery.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/service/cluster" "github.com/grafana/ckit/shard" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery" diff --git a/component/discovery/dns/dns.go b/internal/component/discovery/dns/dns.go similarity index 95% rename from component/discovery/dns/dns.go rename to internal/component/discovery/dns/dns.go index 0e059b8497..3a774ae291 100644 --- a/component/discovery/dns/dns.go +++ b/internal/component/discovery/dns/dns.go @@ -6,8 +6,8 @@ import ( "strings" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/dns" diff --git a/component/discovery/dns/dns_test.go b/internal/component/discovery/dns/dns_test.go similarity index 100% rename from component/discovery/dns/dns_test.go rename to internal/component/discovery/dns/dns_test.go diff --git a/component/discovery/docker/docker.go b/internal/component/discovery/docker/docker.go similarity index 94% rename from component/discovery/docker/docker.go rename to internal/component/discovery/docker/docker.go index 42dae8b170..517311174b 100644 --- a/component/discovery/docker/docker.go +++ b/internal/component/discovery/docker/docker.go @@ -6,9 +6,9 @@ import ( "net/url" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/moby" diff --git a/component/discovery/docker/docker_test.go b/internal/component/discovery/docker/docker_test.go similarity index 100% rename from component/discovery/docker/docker_test.go rename to internal/component/discovery/docker/docker_test.go diff --git a/component/discovery/dockerswarm/dockerswarm.go b/internal/component/discovery/dockerswarm/dockerswarm.go similarity index 94% rename from component/discovery/dockerswarm/dockerswarm.go rename to internal/component/discovery/dockerswarm/dockerswarm.go index be6326ab41..030d8cad99 100644 --- a/component/discovery/dockerswarm/dockerswarm.go +++ b/internal/component/discovery/dockerswarm/dockerswarm.go @@ -5,9 +5,9 @@ import ( "net/url" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/moby" diff --git a/component/discovery/dockerswarm/dockerswarm_test.go b/internal/component/discovery/dockerswarm/dockerswarm_test.go similarity index 97% rename from component/discovery/dockerswarm/dockerswarm_test.go rename to internal/component/discovery/dockerswarm/dockerswarm_test.go index 683da4fb35..d15b6a94f3 100644 --- a/component/discovery/dockerswarm/dockerswarm_test.go +++ b/internal/component/discovery/dockerswarm/dockerswarm_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" "github.com/grafana/river/rivertypes" promConfig "github.com/prometheus/common/config" diff --git a/component/discovery/eureka/eureka.go b/internal/component/discovery/eureka/eureka.go similarity index 91% rename from component/discovery/eureka/eureka.go rename to internal/component/discovery/eureka/eureka.go index 3314a87bc1..1ca6bee686 100644 --- a/component/discovery/eureka/eureka.go +++ b/internal/component/discovery/eureka/eureka.go @@ -5,9 +5,9 @@ import ( "net/url" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/eureka" diff --git a/component/discovery/eureka/eureka_test.go b/internal/component/discovery/eureka/eureka_test.go similarity index 97% rename from component/discovery/eureka/eureka_test.go rename to internal/component/discovery/eureka/eureka_test.go index eda8fcbdaf..ebe6c516b3 100644 --- a/component/discovery/eureka/eureka_test.go +++ b/internal/component/discovery/eureka/eureka_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" "github.com/grafana/river/rivertypes" promcfg "github.com/prometheus/common/config" diff --git a/component/discovery/file/file.go b/internal/component/discovery/file/file.go similarity index 92% rename from component/discovery/file/file.go rename to internal/component/discovery/file/file.go index cb9e855d2e..5d075cbfb8 100644 --- a/component/discovery/file/file.go +++ b/internal/component/discovery/file/file.go @@ -3,8 +3,8 @@ package file import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/file" diff --git a/component/discovery/file/file_test.go b/internal/component/discovery/file/file_test.go similarity index 100% rename from component/discovery/file/file_test.go rename to internal/component/discovery/file/file_test.go diff --git a/component/discovery/gce/gce.go b/internal/component/discovery/gce/gce.go similarity index 95% rename from component/discovery/gce/gce.go rename to internal/component/discovery/gce/gce.go index 155936dee2..ca5d3a5401 100644 --- a/component/discovery/gce/gce.go +++ b/internal/component/discovery/gce/gce.go @@ -4,8 +4,8 @@ package gce import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/gce" diff --git a/component/discovery/gce/gce_test.go b/internal/component/discovery/gce/gce_test.go similarity index 100% rename from component/discovery/gce/gce_test.go rename to internal/component/discovery/gce/gce_test.go diff --git a/component/discovery/hetzner/hetzner.go b/internal/component/discovery/hetzner/hetzner.go similarity index 92% rename from component/discovery/hetzner/hetzner.go rename to internal/component/discovery/hetzner/hetzner.go index 7c1551ea67..be10a499d5 100644 --- a/component/discovery/hetzner/hetzner.go +++ b/internal/component/discovery/hetzner/hetzner.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/hetzner" diff --git a/component/discovery/hetzner/hetzner_test.go b/internal/component/discovery/hetzner/hetzner_test.go similarity index 100% rename from component/discovery/hetzner/hetzner_test.go rename to internal/component/discovery/hetzner/hetzner_test.go diff --git a/component/discovery/http/http.go b/internal/component/discovery/http/http.go similarity index 90% rename from component/discovery/http/http.go rename to internal/component/discovery/http/http.go index aee30c0321..fe74b8fd66 100644 --- a/component/discovery/http/http.go +++ b/internal/component/discovery/http/http.go @@ -3,9 +3,9 @@ package http import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" promcfg "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/discovery/http/http_test.go b/internal/component/discovery/http/http_test.go similarity index 94% rename from component/discovery/http/http_test.go rename to internal/component/discovery/http/http_test.go index 095d341e93..2827f495d1 100644 --- a/component/discovery/http/http_test.go +++ b/internal/component/discovery/http/http_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/river" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" diff --git a/component/discovery/ionos/ionos.go b/internal/component/discovery/ionos/ionos.go similarity index 92% rename from component/discovery/ionos/ionos.go rename to internal/component/discovery/ionos/ionos.go index a5b2f61908..d1ae37cf35 100644 --- a/component/discovery/ionos/ionos.go +++ b/internal/component/discovery/ionos/ionos.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/ionos" diff --git a/component/discovery/ionos/ionos_test.go b/internal/component/discovery/ionos/ionos_test.go similarity index 97% rename from component/discovery/ionos/ionos_test.go rename to internal/component/discovery/ionos/ionos_test.go index 9ec7f989a6..ab3a3c2726 100644 --- a/component/discovery/ionos/ionos_test.go +++ b/internal/component/discovery/ionos/ionos_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" "github.com/grafana/river/rivertypes" promConfig "github.com/prometheus/common/config" diff --git a/component/discovery/kubelet/kubelet.go b/internal/component/discovery/kubelet/kubelet.go similarity index 98% rename from component/discovery/kubelet/kubelet.go rename to internal/component/discovery/kubelet/kubelet.go index acb0c494ae..a753c1e734 100644 --- a/component/discovery/kubelet/kubelet.go +++ b/internal/component/discovery/kubelet/kubelet.go @@ -13,9 +13,9 @@ import ( "strings" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" commonConfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/discovery/kubelet/kubelet_test.go b/internal/component/discovery/kubelet/kubelet_test.go similarity index 98% rename from component/discovery/kubelet/kubelet_test.go rename to internal/component/discovery/kubelet/kubelet_test.go index abde266307..078162fe7a 100644 --- a/component/discovery/kubelet/kubelet_test.go +++ b/internal/component/discovery/kubelet/kubelet_test.go @@ -8,7 +8,7 @@ import ( v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/discovery/kubernetes/kubernetes.go b/internal/component/discovery/kubernetes/kubernetes.go similarity index 95% rename from component/discovery/kubernetes/kubernetes.go rename to internal/component/discovery/kubernetes/kubernetes.go index 6cda5b4dc8..7f379bac53 100644 --- a/component/discovery/kubernetes/kubernetes.go +++ b/internal/component/discovery/kubernetes/kubernetes.go @@ -2,9 +2,9 @@ package kubernetes import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" promk8s "github.com/prometheus/prometheus/discovery/kubernetes" ) diff --git a/component/discovery/kubernetes/kubernetes_test.go b/internal/component/discovery/kubernetes/kubernetes_test.go similarity index 100% rename from component/discovery/kubernetes/kubernetes_test.go rename to internal/component/discovery/kubernetes/kubernetes_test.go diff --git a/component/discovery/kuma/kuma.go b/internal/component/discovery/kuma/kuma.go similarity index 93% rename from component/discovery/kuma/kuma.go rename to internal/component/discovery/kuma/kuma.go index 139095d06a..f4adf85de0 100644 --- a/component/discovery/kuma/kuma.go +++ b/internal/component/discovery/kuma/kuma.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/xds" diff --git a/component/discovery/kuma/kuma_test.go b/internal/component/discovery/kuma/kuma_test.go similarity index 97% rename from component/discovery/kuma/kuma_test.go rename to internal/component/discovery/kuma/kuma_test.go index 488834540c..c1c89a66a9 100644 --- a/component/discovery/kuma/kuma_test.go +++ b/internal/component/discovery/kuma/kuma_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" promConfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/discovery/linode/linode.go b/internal/component/discovery/linode/linode.go similarity index 92% rename from component/discovery/linode/linode.go rename to internal/component/discovery/linode/linode.go index 62d5ccc788..152167c010 100644 --- a/component/discovery/linode/linode.go +++ b/internal/component/discovery/linode/linode.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/linode" diff --git a/component/discovery/linode/linode_test.go b/internal/component/discovery/linode/linode_test.go similarity index 96% rename from component/discovery/linode/linode_test.go rename to internal/component/discovery/linode/linode_test.go index b8effb7eae..3f26becc68 100644 --- a/component/discovery/linode/linode_test.go +++ b/internal/component/discovery/linode/linode_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" promconfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/discovery/marathon/marathon.go b/internal/component/discovery/marathon/marathon.go similarity index 94% rename from component/discovery/marathon/marathon.go rename to internal/component/discovery/marathon/marathon.go index 3bb92d2e30..c948732925 100644 --- a/component/discovery/marathon/marathon.go +++ b/internal/component/discovery/marathon/marathon.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" promcfg "github.com/prometheus/common/config" diff --git a/component/discovery/marathon/marathon_test.go b/internal/component/discovery/marathon/marathon_test.go similarity index 98% rename from component/discovery/marathon/marathon_test.go rename to internal/component/discovery/marathon/marathon_test.go index e94c177fb2..3108e3171d 100644 --- a/component/discovery/marathon/marathon_test.go +++ b/internal/component/discovery/marathon/marathon_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" "github.com/grafana/river/rivertypes" promConfig "github.com/prometheus/common/config" diff --git a/component/discovery/nerve/nerve.go b/internal/component/discovery/nerve/nerve.go similarity index 94% rename from component/discovery/nerve/nerve.go rename to internal/component/discovery/nerve/nerve.go index 411667710e..d7a71f28ac 100644 --- a/component/discovery/nerve/nerve.go +++ b/internal/component/discovery/nerve/nerve.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/zookeeper" diff --git a/component/discovery/nerve/nerve_test.go b/internal/component/discovery/nerve/nerve_test.go similarity index 100% rename from component/discovery/nerve/nerve_test.go rename to internal/component/discovery/nerve/nerve_test.go diff --git a/component/discovery/nomad/nomad.go b/internal/component/discovery/nomad/nomad.go similarity index 93% rename from component/discovery/nomad/nomad.go rename to internal/component/discovery/nomad/nomad.go index 3a64f22370..f2a86a4773 100644 --- a/component/discovery/nomad/nomad.go +++ b/internal/component/discovery/nomad/nomad.go @@ -5,9 +5,9 @@ import ( "strings" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/nomad" diff --git a/component/discovery/nomad/nomad_test.go b/internal/component/discovery/nomad/nomad_test.go similarity index 100% rename from component/discovery/nomad/nomad_test.go rename to internal/component/discovery/nomad/nomad_test.go diff --git a/component/discovery/openstack/openstack.go b/internal/component/discovery/openstack/openstack.go similarity index 96% rename from component/discovery/openstack/openstack.go rename to internal/component/discovery/openstack/openstack.go index ca14709ab9..885c151d83 100644 --- a/component/discovery/openstack/openstack.go +++ b/internal/component/discovery/openstack/openstack.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/component/discovery/openstack/openstack_test.go b/internal/component/discovery/openstack/openstack_test.go similarity index 98% rename from component/discovery/openstack/openstack_test.go rename to internal/component/discovery/openstack/openstack_test.go index 0a86d15128..623c7b5be4 100644 --- a/component/discovery/openstack/openstack_test.go +++ b/internal/component/discovery/openstack/openstack_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" promcfg "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/discovery/ovhcloud/ovhcloud.go b/internal/component/discovery/ovhcloud/ovhcloud.go similarity index 96% rename from component/discovery/ovhcloud/ovhcloud.go rename to internal/component/discovery/ovhcloud/ovhcloud.go index 6812272a28..ee5abd9902 100644 --- a/component/discovery/ovhcloud/ovhcloud.go +++ b/internal/component/discovery/ovhcloud/ovhcloud.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/config" diff --git a/component/discovery/ovhcloud/ovhcloud_test.go b/internal/component/discovery/ovhcloud/ovhcloud_test.go similarity index 97% rename from component/discovery/ovhcloud/ovhcloud_test.go rename to internal/component/discovery/ovhcloud/ovhcloud_test.go index 8e579574fc..e6fc4a1f51 100644 --- a/component/discovery/ovhcloud/ovhcloud_test.go +++ b/internal/component/discovery/ovhcloud/ovhcloud_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/discovery/ovhcloud" + "github.com/grafana/agent/internal/component/discovery/ovhcloud" "github.com/grafana/river" "github.com/prometheus/common/model" prom_ovh "github.com/prometheus/prometheus/discovery/ovhcloud" diff --git a/component/discovery/process/args.go b/internal/component/discovery/process/args.go similarity index 94% rename from component/discovery/process/args.go rename to internal/component/discovery/process/args.go index 636f623186..7323b7858c 100644 --- a/component/discovery/process/args.go +++ b/internal/component/discovery/process/args.go @@ -3,7 +3,7 @@ package process import ( "time" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" ) type Arguments struct { diff --git a/component/discovery/process/container.go b/internal/component/discovery/process/container.go similarity index 95% rename from component/discovery/process/container.go rename to internal/component/discovery/process/container.go index 8453e99728..89811eebd8 100644 --- a/component/discovery/process/container.go +++ b/internal/component/discovery/process/container.go @@ -8,7 +8,7 @@ import ( "regexp" "strings" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" ) var ( diff --git a/component/discovery/process/container_test.go b/internal/component/discovery/process/container_test.go similarity index 100% rename from component/discovery/process/container_test.go rename to internal/component/discovery/process/container_test.go diff --git a/component/discovery/process/discover.go b/internal/component/discovery/process/discover.go similarity index 98% rename from component/discovery/process/discover.go rename to internal/component/discovery/process/discover.go index f8444a5e38..f17f40c989 100644 --- a/component/discovery/process/discover.go +++ b/internal/component/discovery/process/discover.go @@ -12,7 +12,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" gopsutil "github.com/shirou/gopsutil/v3/process" "golang.org/x/sys/unix" ) diff --git a/component/discovery/process/join.go b/internal/component/discovery/process/join.go similarity index 93% rename from component/discovery/process/join.go rename to internal/component/discovery/process/join.go index 24f0a8b228..5c3b612de4 100644 --- a/component/discovery/process/join.go +++ b/internal/component/discovery/process/join.go @@ -2,7 +2,7 @@ package process -import "github.com/grafana/agent/component/discovery" +import "github.com/grafana/agent/internal/component/discovery" func join(processes, containers []discovery.Target) []discovery.Target { res := make([]discovery.Target, 0, len(processes)+len(containers)) diff --git a/component/discovery/process/join_test.go b/internal/component/discovery/process/join_test.go similarity index 98% rename from component/discovery/process/join_test.go rename to internal/component/discovery/process/join_test.go index 8ddd7dc7cd..5aa05d3a00 100644 --- a/component/discovery/process/join_test.go +++ b/internal/component/discovery/process/join_test.go @@ -6,7 +6,7 @@ import ( "fmt" "testing" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" "github.com/stretchr/testify/assert" ) diff --git a/component/discovery/process/process.go b/internal/component/discovery/process/process.go similarity index 94% rename from component/discovery/process/process.go rename to internal/component/discovery/process/process.go index 52892cff9b..54e1d08f02 100644 --- a/component/discovery/process/process.go +++ b/internal/component/discovery/process/process.go @@ -7,8 +7,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/discovery/process/process_stub.go b/internal/component/discovery/process/process_stub.go similarity index 84% rename from component/discovery/process/process_stub.go rename to internal/component/discovery/process/process_stub.go index 31282eb963..74c1f394ea 100644 --- a/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/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/discovery/puppetdb/puppetdb.go b/internal/component/discovery/puppetdb/puppetdb.go similarity index 93% rename from component/discovery/puppetdb/puppetdb.go rename to internal/component/discovery/puppetdb/puppetdb.go index eef0a1e867..7299051ea7 100644 --- a/component/discovery/puppetdb/puppetdb.go +++ b/internal/component/discovery/puppetdb/puppetdb.go @@ -5,9 +5,9 @@ import ( "net/url" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/puppetdb" diff --git a/component/discovery/puppetdb/puppetdb_test.go b/internal/component/discovery/puppetdb/puppetdb_test.go similarity index 100% rename from component/discovery/puppetdb/puppetdb_test.go rename to internal/component/discovery/puppetdb/puppetdb_test.go diff --git a/component/discovery/relabel/relabel.go b/internal/component/discovery/relabel/relabel.go similarity index 93% rename from component/discovery/relabel/relabel.go rename to internal/component/discovery/relabel/relabel.go index 3e0f6a1a2a..77519abcf8 100644 --- a/component/discovery/relabel/relabel.go +++ b/internal/component/discovery/relabel/relabel.go @@ -4,9 +4,9 @@ import ( "context" "sync" - "github.com/grafana/agent/component" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" diff --git a/component/discovery/relabel/relabel_test.go b/internal/component/discovery/relabel/relabel_test.go similarity index 92% rename from component/discovery/relabel/relabel_test.go rename to internal/component/discovery/relabel/relabel_test.go index c2757c7d41..a2478d1175 100644 --- a/component/discovery/relabel/relabel_test.go +++ b/internal/component/discovery/relabel/relabel_test.go @@ -4,10 +4,10 @@ import ( "testing" "time" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/relabel" - "github.com/grafana/agent/pkg/flow/componenttest" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/relabel" + "github.com/grafana/agent/internal/flow/componenttest" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/discovery/scaleway/scaleway.go b/internal/component/discovery/scaleway/scaleway.go similarity index 97% rename from component/discovery/scaleway/scaleway.go rename to internal/component/discovery/scaleway/scaleway.go index df9d26174d..2a20c71f85 100644 --- a/component/discovery/scaleway/scaleway.go +++ b/internal/component/discovery/scaleway/scaleway.go @@ -6,9 +6,9 @@ import ( "reflect" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" prom_config "github.com/prometheus/common/config" diff --git a/component/discovery/scaleway/scaleway_test.go b/internal/component/discovery/scaleway/scaleway_test.go similarity index 100% rename from component/discovery/scaleway/scaleway_test.go rename to internal/component/discovery/scaleway/scaleway_test.go diff --git a/component/discovery/serverset/serverset.go b/internal/component/discovery/serverset/serverset.go similarity index 95% rename from component/discovery/serverset/serverset.go rename to internal/component/discovery/serverset/serverset.go index 026793aeb6..c63855822f 100644 --- a/component/discovery/serverset/serverset.go +++ b/internal/component/discovery/serverset/serverset.go @@ -6,8 +6,8 @@ import ( "strings" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/zookeeper" diff --git a/component/discovery/serverset/serverset_test.go b/internal/component/discovery/serverset/serverset_test.go similarity index 100% rename from component/discovery/serverset/serverset_test.go rename to internal/component/discovery/serverset/serverset_test.go diff --git a/component/discovery/triton/triton.go b/internal/component/discovery/triton/triton.go similarity index 93% rename from component/discovery/triton/triton.go rename to internal/component/discovery/triton/triton.go index 3fce24f77a..0aa1fea3f9 100644 --- a/component/discovery/triton/triton.go +++ b/internal/component/discovery/triton/triton.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/prometheus/common/model" prom_discovery "github.com/prometheus/prometheus/discovery/triton" diff --git a/component/discovery/triton/triton_test.go b/internal/component/discovery/triton/triton_test.go similarity index 100% rename from component/discovery/triton/triton_test.go rename to internal/component/discovery/triton/triton_test.go diff --git a/component/discovery/uyuni/uyuni.go b/internal/component/discovery/uyuni/uyuni.go similarity index 94% rename from component/discovery/uyuni/uyuni.go rename to internal/component/discovery/uyuni/uyuni.go index 1aeddcd959..4d67ead59d 100644 --- a/component/discovery/uyuni/uyuni.go +++ b/internal/component/discovery/uyuni/uyuni.go @@ -5,9 +5,9 @@ import ( "net/url" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" promcfg "github.com/prometheus/common/config" diff --git a/component/discovery/uyuni/uyuni_test.go b/internal/component/discovery/uyuni/uyuni_test.go similarity index 96% rename from component/discovery/uyuni/uyuni_test.go rename to internal/component/discovery/uyuni/uyuni_test.go index 3cab338bd7..a66e1799a2 100644 --- a/component/discovery/uyuni/uyuni_test.go +++ b/internal/component/discovery/uyuni/uyuni_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/river" promcfg "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/faro/receiver/arguments.go b/internal/component/faro/receiver/arguments.go similarity index 96% rename from component/faro/receiver/arguments.go rename to internal/component/faro/receiver/arguments.go index 65fc6f29fb..62d2e413be 100644 --- a/component/faro/receiver/arguments.go +++ b/internal/component/faro/receiver/arguments.go @@ -4,8 +4,8 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/otelcol" "github.com/grafana/river" "github.com/grafana/river/rivertypes" ) diff --git a/component/faro/receiver/exporters.go b/internal/component/faro/receiver/exporters.go similarity index 95% rename from component/faro/receiver/exporters.go rename to internal/component/faro/receiver/exporters.go index a470987011..57514b417e 100644 --- a/component/faro/receiver/exporters.go +++ b/internal/component/faro/receiver/exporters.go @@ -8,10 +8,10 @@ import ( "github.com/go-kit/log" "github.com/go-logfmt/logfmt" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/faro/receiver/internal/payload" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/faro/receiver/internal/payload" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/component/faro/receiver/exporters_test.go b/internal/component/faro/receiver/exporters_test.go similarity index 94% rename from component/faro/receiver/exporters_test.go rename to internal/component/faro/receiver/exporters_test.go index 84acf4aa27..a6ec19ecf1 100644 --- a/component/faro/receiver/exporters_test.go +++ b/internal/component/faro/receiver/exporters_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/grafana/agent/component/faro/receiver/internal/payload" + "github.com/grafana/agent/internal/component/faro/receiver/internal/payload" "github.com/prometheus/client_golang/prometheus" promtestutil "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/require" diff --git a/component/faro/receiver/handler.go b/internal/component/faro/receiver/handler.go similarity index 96% rename from component/faro/receiver/handler.go rename to internal/component/faro/receiver/handler.go index 636f00859e..e6207e511a 100644 --- a/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/agent/component/faro/receiver/internal/payload" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/faro/receiver/internal/payload" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/rs/cors" "golang.org/x/time/rate" diff --git a/component/faro/receiver/handler_test.go b/internal/component/faro/receiver/handler_test.go similarity index 98% rename from component/faro/receiver/handler_test.go rename to internal/component/faro/receiver/handler_test.go index 28bc531597..79f93fe744 100644 --- a/component/faro/receiver/handler_test.go +++ b/internal/component/faro/receiver/handler_test.go @@ -9,8 +9,8 @@ import ( "testing" "github.com/alecthomas/units" - "github.com/grafana/agent/component/faro/receiver/internal/payload" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/faro/receiver/internal/payload" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/component/faro/receiver/internal/payload/payload.go b/internal/component/faro/receiver/internal/payload/payload.go similarity index 100% rename from component/faro/receiver/internal/payload/payload.go rename to internal/component/faro/receiver/internal/payload/payload.go diff --git a/component/faro/receiver/internal/payload/payload_test.go b/internal/component/faro/receiver/internal/payload/payload_test.go similarity index 100% rename from component/faro/receiver/internal/payload/payload_test.go rename to internal/component/faro/receiver/internal/payload/payload_test.go diff --git a/component/faro/receiver/internal/payload/utils.go b/internal/component/faro/receiver/internal/payload/utils.go similarity index 100% rename from component/faro/receiver/internal/payload/utils.go rename to internal/component/faro/receiver/internal/payload/utils.go diff --git a/component/faro/receiver/receiver.go b/internal/component/faro/receiver/receiver.go similarity index 98% rename from component/faro/receiver/receiver.go rename to internal/component/faro/receiver/receiver.go index a6b452a3f2..1a77503498 100644 --- a/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/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/faro/receiver/receiver_test.go b/internal/component/faro/receiver/receiver_test.go similarity index 93% rename from component/faro/receiver/receiver_test.go rename to internal/component/faro/receiver/receiver_test.go index 45ffa25cfa..4e6e78e04e 100644 --- a/component/faro/receiver/receiver_test.go +++ b/internal/component/faro/receiver/receiver_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/phayes/freeport" "github.com/prometheus/common/model" diff --git a/component/faro/receiver/server.go b/internal/component/faro/receiver/server.go similarity index 98% rename from component/faro/receiver/server.go rename to internal/component/faro/receiver/server.go index 446193f5fb..1b96fa1b4e 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/middleware" "github.com/prometheus/client_golang/prometheus" diff --git a/component/faro/receiver/sourcemaps.go b/internal/component/faro/receiver/sourcemaps.go similarity index 98% rename from component/faro/receiver/sourcemaps.go rename to internal/component/faro/receiver/sourcemaps.go index 0c679052b6..5dc1e7643f 100644 --- a/component/faro/receiver/sourcemaps.go +++ b/internal/component/faro/receiver/sourcemaps.go @@ -16,9 +16,9 @@ import ( "github.com/go-kit/log" "github.com/go-sourcemap/sourcemap" - "github.com/grafana/agent/component/faro/receiver/internal/payload" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util/wildcard" + "github.com/grafana/agent/internal/component/faro/receiver/internal/payload" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util/wildcard" "github.com/prometheus/client_golang/prometheus" "github.com/vincent-petithory/dataurl" ) diff --git a/component/faro/receiver/sourcemaps_test.go b/internal/component/faro/receiver/sourcemaps_test.go similarity index 99% rename from component/faro/receiver/sourcemaps_test.go rename to internal/component/faro/receiver/sourcemaps_test.go index 63b1dedee1..6ad1f7fcdd 100644 --- a/component/faro/receiver/sourcemaps_test.go +++ b/internal/component/faro/receiver/sourcemaps_test.go @@ -10,8 +10,8 @@ import ( "path/filepath" "testing" - "github.com/grafana/agent/component/faro/receiver/internal/payload" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/faro/receiver/internal/payload" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" ) diff --git a/component/faro/receiver/testdata/foo.js b/internal/component/faro/receiver/testdata/foo.js similarity index 100% rename from component/faro/receiver/testdata/foo.js rename to internal/component/faro/receiver/testdata/foo.js diff --git a/component/faro/receiver/testdata/foo.js.map b/internal/component/faro/receiver/testdata/foo.js.map similarity index 100% rename from component/faro/receiver/testdata/foo.js.map rename to internal/component/faro/receiver/testdata/foo.js.map diff --git a/component/faro/receiver/testdata/payload.json b/internal/component/faro/receiver/testdata/payload.json similarity index 100% rename from component/faro/receiver/testdata/payload.json rename to internal/component/faro/receiver/testdata/payload.json diff --git a/component/faro/receiver/testdata/payload_2.json b/internal/component/faro/receiver/testdata/payload_2.json similarity index 100% rename from component/faro/receiver/testdata/payload_2.json rename to internal/component/faro/receiver/testdata/payload_2.json diff --git a/component/local/file/detector.go b/internal/component/local/file/detector.go similarity index 98% rename from component/local/file/detector.go rename to internal/component/local/file/detector.go index 463d5fe23d..31769c2e21 100644 --- a/component/local/file/detector.go +++ b/internal/component/local/file/detector.go @@ -9,7 +9,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) // Detector is used to specify how changes to the file should be detected. diff --git a/component/local/file/file.go b/internal/component/local/file/file.go similarity index 98% rename from component/local/file/file.go rename to internal/component/local/file/file.go index a94c143400..ae2ed385ea 100644 --- a/component/local/file/file.go +++ b/internal/component/local/file/file.go @@ -10,9 +10,9 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/river/rivertypes" ) diff --git a/component/local/file/file_test.go b/internal/component/local/file/file_test.go similarity index 97% rename from component/local/file/file_test.go rename to internal/component/local/file/file_test.go index da4686e50b..6f0344b7c4 100644 --- a/component/local/file/file_test.go +++ b/internal/component/local/file/file_test.go @@ -8,8 +8,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/local/file" - "github.com/grafana/agent/pkg/flow/componenttest" + "github.com/grafana/agent/internal/component/local/file" + "github.com/grafana/agent/internal/flow/componenttest" "github.com/grafana/river/rivertypes" "github.com/stretchr/testify/require" ) diff --git a/component/local/file_match/file.go b/internal/component/local/file_match/file.go similarity index 94% rename from component/local/file_match/file.go rename to internal/component/local/file_match/file.go index 49d791c230..b3cba10824 100644 --- a/component/local/file_match/file.go +++ b/internal/component/local/file_match/file.go @@ -5,10 +5,10 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/local/file_match/file_test.go b/internal/component/local/file_match/file_test.go similarity index 98% rename from component/local/file_match/file_test.go rename to internal/component/local/file_match/file_test.go index 06879da223..913a1fe680 100644 --- a/component/local/file_match/file_test.go +++ b/internal/component/local/file_match/file_test.go @@ -10,12 +10,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" "context" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" ) diff --git a/component/local/file_match/watch.go b/internal/component/local/file_match/watch.go similarity index 91% rename from component/local/file_match/watch.go rename to internal/component/local/file_match/watch.go index 2a78af1fa7..21a6778eb9 100644 --- a/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/agent/component/discovery" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/flow/logging/level" ) // watch handles a single discovery.target for file watching. diff --git a/component/loki/echo/echo.go b/internal/component/loki/echo/echo.go similarity index 92% rename from component/loki/echo/echo.go rename to internal/component/loki/echo/echo.go index ba14008af2..8ceb29d4a4 100644 --- a/component/loki/echo/echo.go +++ b/internal/component/loki/echo/echo.go @@ -4,10 +4,10 @@ import ( "context" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/loki/process/metric/counters.go b/internal/component/loki/process/metric/counters.go similarity index 100% rename from component/loki/process/metric/counters.go rename to internal/component/loki/process/metric/counters.go diff --git a/component/loki/process/metric/counters_test.go b/internal/component/loki/process/metric/counters_test.go similarity index 100% rename from component/loki/process/metric/counters_test.go rename to internal/component/loki/process/metric/counters_test.go diff --git a/component/loki/process/metric/gauges.go b/internal/component/loki/process/metric/gauges.go similarity index 100% rename from component/loki/process/metric/gauges.go rename to internal/component/loki/process/metric/gauges.go diff --git a/component/loki/process/metric/gauges_test.go b/internal/component/loki/process/metric/gauges_test.go similarity index 100% rename from component/loki/process/metric/gauges_test.go rename to internal/component/loki/process/metric/gauges_test.go diff --git a/component/loki/process/metric/histograms.go b/internal/component/loki/process/metric/histograms.go similarity index 100% rename from component/loki/process/metric/histograms.go rename to internal/component/loki/process/metric/histograms.go diff --git a/component/loki/process/metric/histograms_test.go b/internal/component/loki/process/metric/histograms_test.go similarity index 100% rename from component/loki/process/metric/histograms_test.go rename to internal/component/loki/process/metric/histograms_test.go diff --git a/component/loki/process/metric/metricvec.go b/internal/component/loki/process/metric/metricvec.go similarity index 100% rename from component/loki/process/metric/metricvec.go rename to internal/component/loki/process/metric/metricvec.go diff --git a/component/loki/process/process.go b/internal/component/loki/process/process.go similarity index 96% rename from component/loki/process/process.go rename to internal/component/loki/process/process.go index 7c8ca740c0..b084582a95 100644 --- a/component/loki/process/process.go +++ b/internal/component/loki/process/process.go @@ -8,9 +8,9 @@ import ( "reflect" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/loki/process/stages" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/loki/process/stages" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/loki/process/process_test.go b/internal/component/loki/process/process_test.go similarity index 97% rename from component/loki/process/process_test.go rename to internal/component/loki/process/process_test.go index 0fac72dfc3..8a423c02af 100644 --- a/component/loki/process/process_test.go +++ b/internal/component/loki/process/process_test.go @@ -8,13 +8,13 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/loki/process/stages" - lsf "github.com/grafana/agent/component/loki/source/file" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/loki/process/stages" + lsf "github.com/grafana/agent/internal/component/loki/source/file" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/river" "github.com/prometheus/client_golang/prometheus" diff --git a/component/loki/process/stages/decolorize.go b/internal/component/loki/process/stages/decolorize.go similarity index 100% rename from component/loki/process/stages/decolorize.go rename to internal/component/loki/process/stages/decolorize.go diff --git a/component/loki/process/stages/decolorize_test.go b/internal/component/loki/process/stages/decolorize_test.go similarity index 100% rename from component/loki/process/stages/decolorize_test.go rename to internal/component/loki/process/stages/decolorize_test.go diff --git a/component/loki/process/stages/drop.go b/internal/component/loki/process/stages/drop.go similarity index 99% rename from component/loki/process/stages/drop.go rename to internal/component/loki/process/stages/drop.go index 222885919b..96c212ba3c 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/component/loki/process/stages/drop_test.go b/internal/component/loki/process/stages/drop_test.go similarity index 99% rename from component/loki/process/stages/drop_test.go rename to internal/component/loki/process/stages/drop_test.go index 00f6169ad5..820d597d0a 100644 --- a/component/loki/process/stages/drop_test.go +++ b/internal/component/loki/process/stages/drop_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" dskit "github.com/grafana/dskit/server" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/component/loki/process/stages/eventlogmessage.go b/internal/component/loki/process/stages/eventlogmessage.go similarity index 98% rename from component/loki/process/stages/eventlogmessage.go rename to internal/component/loki/process/stages/eventlogmessage.go index 25a5bb67f5..247b801639 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/eventlogmessage_test.go b/internal/component/loki/process/stages/eventlogmessage_test.go similarity index 100% rename from component/loki/process/stages/eventlogmessage_test.go rename to internal/component/loki/process/stages/eventlogmessage_test.go diff --git a/component/loki/process/stages/extensions.go b/internal/component/loki/process/stages/extensions.go similarity index 98% rename from component/loki/process/stages/extensions.go rename to internal/component/loki/process/stages/extensions.go index 58e2eac36b..3abbfd6243 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/river" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/component/loki/process/stages/extensions_test.go b/internal/component/loki/process/stages/extensions_test.go similarity index 100% rename from component/loki/process/stages/extensions_test.go rename to internal/component/loki/process/stages/extensions_test.go diff --git a/component/loki/process/stages/geoip.go b/internal/component/loki/process/stages/geoip.go similarity index 99% rename from component/loki/process/stages/geoip.go rename to internal/component/loki/process/stages/geoip.go index a157e236d9..505077ecfe 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/jmespath/go-jmespath" "github.com/oschwald/geoip2-golang" "github.com/oschwald/maxminddb-golang" diff --git a/component/loki/process/stages/geoip_test.go b/internal/component/loki/process/stages/geoip_test.go similarity index 100% rename from component/loki/process/stages/geoip_test.go rename to internal/component/loki/process/stages/geoip_test.go diff --git a/component/loki/process/stages/inspector.go b/internal/component/loki/process/stages/inspector.go similarity index 100% rename from component/loki/process/stages/inspector.go rename to internal/component/loki/process/stages/inspector.go diff --git a/component/loki/process/stages/json.go b/internal/component/loki/process/stages/json.go similarity index 98% rename from component/loki/process/stages/json.go rename to internal/component/loki/process/stages/json.go index b4aa5ae0bb..5f98209b46 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/jmespath/go-jmespath" json "github.com/json-iterator/go" ) diff --git a/component/loki/process/stages/json_test.go b/internal/component/loki/process/stages/json_test.go similarity index 99% rename from component/loki/process/stages/json_test.go rename to internal/component/loki/process/stages/json_test.go index 3cbdde3f16..982c70554c 100644 --- a/component/loki/process/stages/json_test.go +++ b/internal/component/loki/process/stages/json_test.go @@ -10,7 +10,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" ) diff --git a/component/loki/process/stages/label_drop.go b/internal/component/loki/process/stages/label_drop.go similarity index 100% rename from component/loki/process/stages/label_drop.go rename to internal/component/loki/process/stages/label_drop.go diff --git a/component/loki/process/stages/label_drop_test.go b/internal/component/loki/process/stages/label_drop_test.go similarity index 100% rename from component/loki/process/stages/label_drop_test.go rename to internal/component/loki/process/stages/label_drop_test.go diff --git a/component/loki/process/stages/label_keep.go b/internal/component/loki/process/stages/label_keep.go similarity index 100% rename from component/loki/process/stages/label_keep.go rename to internal/component/loki/process/stages/label_keep.go diff --git a/component/loki/process/stages/label_keep_test.go b/internal/component/loki/process/stages/label_keep_test.go similarity index 100% rename from component/loki/process/stages/label_keep_test.go rename to internal/component/loki/process/stages/label_keep_test.go diff --git a/component/loki/process/stages/labels.go b/internal/component/loki/process/stages/labels.go similarity index 97% rename from component/loki/process/stages/labels.go rename to internal/component/loki/process/stages/labels.go index 7ccaedb8a1..5faac02cc0 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/labels_test.go b/internal/component/loki/process/stages/labels_test.go similarity index 100% rename from component/loki/process/stages/labels_test.go rename to internal/component/loki/process/stages/labels_test.go diff --git a/component/loki/process/stages/limit.go b/internal/component/loki/process/stages/limit.go similarity index 98% rename from component/loki/process/stages/limit.go rename to internal/component/loki/process/stages/limit.go index 307a29c296..aee76ee519 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "golang.org/x/time/rate" diff --git a/component/loki/process/stages/limit_test.go b/internal/component/loki/process/stages/limit_test.go similarity index 100% rename from component/loki/process/stages/limit_test.go rename to internal/component/loki/process/stages/limit_test.go diff --git a/component/loki/process/stages/logfmt.go b/internal/component/loki/process/stages/logfmt.go similarity index 98% rename from component/loki/process/stages/logfmt.go rename to internal/component/loki/process/stages/logfmt.go index a8129d9815..a70c84f527 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/logfmt_test.go b/internal/component/loki/process/stages/logfmt_test.go similarity index 99% rename from component/loki/process/stages/logfmt_test.go rename to internal/component/loki/process/stages/logfmt_test.go index e32dc279a8..961cc8ab44 100644 --- a/component/loki/process/stages/logfmt_test.go +++ b/internal/component/loki/process/stages/logfmt_test.go @@ -7,7 +7,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" util_log "github.com/grafana/loki/pkg/util/log" ) diff --git a/component/loki/process/stages/match.go b/internal/component/loki/process/stages/match.go similarity index 100% rename from component/loki/process/stages/match.go rename to internal/component/loki/process/stages/match.go diff --git a/component/loki/process/stages/match_test.go b/internal/component/loki/process/stages/match_test.go similarity index 99% rename from component/loki/process/stages/match_test.go rename to internal/component/loki/process/stages/match_test.go index 12bff81877..c35c85a160 100644 --- a/component/loki/process/stages/match_test.go +++ b/internal/component/loki/process/stages/match_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" ) diff --git a/component/loki/process/stages/metric.go b/internal/component/loki/process/stages/metric.go similarity index 98% rename from component/loki/process/stages/metric.go rename to internal/component/loki/process/stages/metric.go index dfe745133d..983354abd6 100644 --- a/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/agent/component/loki/process/metric" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/loki/process/metric" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/metric_test.go b/internal/component/loki/process/stages/metric_test.go similarity index 99% rename from component/loki/process/stages/metric_test.go rename to internal/component/loki/process/stages/metric_test.go index 9a0023d4cd..559c5fc913 100644 --- a/component/loki/process/stages/metric_test.go +++ b/internal/component/loki/process/stages/metric_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component/loki/process/metric" + "github.com/grafana/agent/internal/component/loki/process/metric" util_log "github.com/grafana/loki/pkg/util/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" diff --git a/component/loki/process/stages/multiline.go b/internal/component/loki/process/stages/multiline.go similarity index 97% rename from component/loki/process/stages/multiline.go rename to internal/component/loki/process/stages/multiline.go index 9c2ab940e7..677fe5c09b 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/multiline_test.go b/internal/component/loki/process/stages/multiline_test.go similarity index 97% rename from component/loki/process/stages/multiline_test.go rename to internal/component/loki/process/stages/multiline_test.go index d876df508d..2f236e3a35 100644 --- a/component/loki/process/stages/multiline_test.go +++ b/internal/component/loki/process/stages/multiline_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" diff --git a/component/loki/process/stages/output.go b/internal/component/loki/process/stages/output.go similarity index 96% rename from component/loki/process/stages/output.go rename to internal/component/loki/process/stages/output.go index 06b3a61521..ae68a59384 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/output_test.go b/internal/component/loki/process/stages/output_test.go similarity index 98% rename from component/loki/process/stages/output_test.go rename to internal/component/loki/process/stages/output_test.go index 5ec1dd251b..b2e6fbb021 100644 --- a/component/loki/process/stages/output_test.go +++ b/internal/component/loki/process/stages/output_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/component/loki/process/stages/pack.go b/internal/component/loki/process/stages/pack.go similarity index 98% rename from component/loki/process/stages/pack.go rename to internal/component/loki/process/stages/pack.go index 0f680e7c38..a5d1633b40 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logqlmodel" json "github.com/json-iterator/go" "github.com/prometheus/client_golang/prometheus" diff --git a/component/loki/process/stages/pack_test.go b/internal/component/loki/process/stages/pack_test.go similarity index 98% rename from component/loki/process/stages/pack_test.go rename to internal/component/loki/process/stages/pack_test.go index 41aee52ae9..1bf443f8bd 100644 --- a/component/loki/process/stages/pack_test.go +++ b/internal/component/loki/process/stages/pack_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/logqlmodel" json "github.com/json-iterator/go" diff --git a/component/loki/process/stages/pipeline.go b/internal/component/loki/process/stages/pipeline.go similarity index 99% rename from component/loki/process/stages/pipeline.go rename to internal/component/loki/process/stages/pipeline.go index 194a57ccd0..fb1be291e5 100644 --- a/component/loki/process/stages/pipeline.go +++ b/internal/component/loki/process/stages/pipeline.go @@ -6,7 +6,7 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/prometheus/client_golang/prometheus" "golang.org/x/time/rate" ) diff --git a/component/loki/process/stages/pipeline_test.go b/internal/component/loki/process/stages/pipeline_test.go similarity index 98% rename from component/loki/process/stages/pipeline_test.go rename to internal/component/loki/process/stages/pipeline_test.go index 9d797c4c76..52988ddeda 100644 --- a/component/loki/process/stages/pipeline_test.go +++ b/internal/component/loki/process/stages/pipeline_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" util_log "github.com/grafana/loki/pkg/util/log" "github.com/grafana/river" diff --git a/component/loki/process/stages/regex.go b/internal/component/loki/process/stages/regex.go similarity index 98% rename from component/loki/process/stages/regex.go rename to internal/component/loki/process/stages/regex.go index cf1482d20a..bc4a3e0e57 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/mitchellh/mapstructure" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/regex_test.go b/internal/component/loki/process/stages/regex_test.go similarity index 99% rename from component/loki/process/stages/regex_test.go rename to internal/component/loki/process/stages/regex_test.go index 26a7ba4654..f9928aa62a 100644 --- a/component/loki/process/stages/regex_test.go +++ b/internal/component/loki/process/stages/regex_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" diff --git a/component/loki/process/stages/replace.go b/internal/component/loki/process/stages/replace.go similarity index 99% rename from component/loki/process/stages/replace.go rename to internal/component/loki/process/stages/replace.go index cda06a0203..8cbb6ce75e 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/replace_test.go b/internal/component/loki/process/stages/replace_test.go similarity index 99% rename from component/loki/process/stages/replace_test.go rename to internal/component/loki/process/stages/replace_test.go index aa189f06d0..b03ccee7a4 100644 --- a/component/loki/process/stages/replace_test.go +++ b/internal/component/loki/process/stages/replace_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" ) diff --git a/component/loki/process/stages/sampling.go b/internal/component/loki/process/stages/sampling.go similarity index 100% rename from component/loki/process/stages/sampling.go rename to internal/component/loki/process/stages/sampling.go diff --git a/component/loki/process/stages/sampling_test.go b/internal/component/loki/process/stages/sampling_test.go similarity index 100% rename from component/loki/process/stages/sampling_test.go rename to internal/component/loki/process/stages/sampling_test.go diff --git a/component/loki/process/stages/stage.go b/internal/component/loki/process/stages/stage.go similarity index 99% rename from component/loki/process/stages/stage.go rename to internal/component/loki/process/stages/stage.go index 055467c6cf..a5657d570e 100644 --- a/component/loki/process/stages/stage.go +++ b/internal/component/loki/process/stages/stage.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "gopkg.in/yaml.v2" diff --git a/component/loki/process/stages/static_labels.go b/internal/component/loki/process/stages/static_labels.go similarity index 97% rename from component/loki/process/stages/static_labels.go rename to internal/component/loki/process/stages/static_labels.go index 4ccb22538d..8d1d2873f7 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/static_labels_test.go b/internal/component/loki/process/stages/static_labels_test.go similarity index 100% rename from component/loki/process/stages/static_labels_test.go rename to internal/component/loki/process/stages/static_labels_test.go diff --git a/component/loki/process/stages/structured_metadata.go b/internal/component/loki/process/stages/structured_metadata.go similarity index 100% rename from component/loki/process/stages/structured_metadata.go rename to internal/component/loki/process/stages/structured_metadata.go diff --git a/component/loki/process/stages/structured_metadata_test.go b/internal/component/loki/process/stages/structured_metadata_test.go similarity index 100% rename from component/loki/process/stages/structured_metadata_test.go rename to internal/component/loki/process/stages/structured_metadata_test.go diff --git a/component/loki/process/stages/template.go b/internal/component/loki/process/stages/template.go similarity index 98% rename from component/loki/process/stages/template.go rename to internal/component/loki/process/stages/template.go index 311185c170..3da3a782e9 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" "golang.org/x/crypto/sha3" diff --git a/component/loki/process/stages/template_test.go b/internal/component/loki/process/stages/template_test.go similarity index 100% rename from component/loki/process/stages/template_test.go rename to internal/component/loki/process/stages/template_test.go diff --git a/component/loki/process/stages/tenant.go b/internal/component/loki/process/stages/tenant.go similarity index 98% rename from component/loki/process/stages/tenant.go rename to internal/component/loki/process/stages/tenant.go index 3a66d0d52b..fab08ec479 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/common/model" ) diff --git a/component/loki/process/stages/tenant_test.go b/internal/component/loki/process/stages/tenant_test.go similarity index 100% rename from component/loki/process/stages/tenant_test.go rename to internal/component/loki/process/stages/tenant_test.go diff --git a/component/loki/process/stages/testdata/geoip_maxmind_asn.mmdb b/internal/component/loki/process/stages/testdata/geoip_maxmind_asn.mmdb similarity index 100% rename from component/loki/process/stages/testdata/geoip_maxmind_asn.mmdb rename to internal/component/loki/process/stages/testdata/geoip_maxmind_asn.mmdb diff --git a/component/loki/process/stages/testdata/geoip_maxmind_city.mmdb b/internal/component/loki/process/stages/testdata/geoip_maxmind_city.mmdb similarity index 100% rename from component/loki/process/stages/testdata/geoip_maxmind_city.mmdb rename to internal/component/loki/process/stages/testdata/geoip_maxmind_city.mmdb diff --git a/component/loki/process/stages/testdata/geoip_maxmind_country.mmdb b/internal/component/loki/process/stages/testdata/geoip_maxmind_country.mmdb similarity index 100% rename from component/loki/process/stages/testdata/geoip_maxmind_country.mmdb rename to internal/component/loki/process/stages/testdata/geoip_maxmind_country.mmdb diff --git a/component/loki/process/stages/testdata/geoip_source.json b/internal/component/loki/process/stages/testdata/geoip_source.json similarity index 100% rename from component/loki/process/stages/testdata/geoip_source.json rename to internal/component/loki/process/stages/testdata/geoip_source.json diff --git a/component/loki/process/stages/timestamp.go b/internal/component/loki/process/stages/timestamp.go similarity index 99% rename from component/loki/process/stages/timestamp.go rename to internal/component/loki/process/stages/timestamp.go index 1e9ac10bc5..7bb19c50e6 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" lru "github.com/hashicorp/golang-lru" "github.com/prometheus/common/model" diff --git a/component/loki/process/stages/timestamp_test.go b/internal/component/loki/process/stages/timestamp_test.go similarity index 99% rename from component/loki/process/stages/timestamp_test.go rename to internal/component/loki/process/stages/timestamp_test.go index e36471548e..da95753cdf 100644 --- a/component/loki/process/stages/timestamp_test.go +++ b/internal/component/loki/process/stages/timestamp_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" diff --git a/component/loki/process/stages/util.go b/internal/component/loki/process/stages/util.go similarity index 100% rename from component/loki/process/stages/util.go rename to internal/component/loki/process/stages/util.go diff --git a/component/loki/process/stages/util_test.go b/internal/component/loki/process/stages/util_test.go similarity index 99% rename from component/loki/process/stages/util_test.go rename to internal/component/loki/process/stages/util_test.go index 721814c0c2..a2d6313b6a 100644 --- a/component/loki/process/stages/util_test.go +++ b/internal/component/loki/process/stages/util_test.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/logproto" ) diff --git a/component/loki/relabel/metrics.go b/internal/component/loki/relabel/metrics.go similarity index 100% rename from component/loki/relabel/metrics.go rename to internal/component/loki/relabel/metrics.go diff --git a/component/loki/relabel/relabel.go b/internal/component/loki/relabel/relabel.go similarity index 96% rename from component/loki/relabel/relabel.go rename to internal/component/loki/relabel/relabel.go index 88ac81b7dc..1d79993dea 100644 --- a/component/loki/relabel/relabel.go +++ b/internal/component/loki/relabel/relabel.go @@ -5,11 +5,11 @@ import ( "reflect" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" lru "github.com/hashicorp/golang-lru" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/component/loki/relabel/relabel_test.go b/internal/component/loki/relabel/relabel_test.go similarity index 96% rename from component/loki/relabel/relabel_test.go rename to internal/component/loki/relabel/relabel_test.go index 3a97be23d7..e562bd03d8 100644 --- a/component/loki/relabel/relabel_test.go +++ b/internal/component/loki/relabel/relabel_test.go @@ -7,13 +7,13 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/discovery" - lsf "github.com/grafana/agent/component/loki/source/file" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/discovery" + lsf "github.com/grafana/agent/internal/component/loki/source/file" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/river" "github.com/prometheus/client_golang/prometheus" diff --git a/component/loki/rules/kubernetes/debug.go b/internal/component/loki/rules/kubernetes/debug.go similarity index 100% rename from component/loki/rules/kubernetes/debug.go rename to internal/component/loki/rules/kubernetes/debug.go diff --git a/component/loki/rules/kubernetes/diff.go b/internal/component/loki/rules/kubernetes/diff.go similarity index 100% rename from component/loki/rules/kubernetes/diff.go rename to internal/component/loki/rules/kubernetes/diff.go diff --git a/component/loki/rules/kubernetes/diff_test.go b/internal/component/loki/rules/kubernetes/diff_test.go similarity index 100% rename from component/loki/rules/kubernetes/diff_test.go rename to internal/component/loki/rules/kubernetes/diff_test.go diff --git a/component/loki/rules/kubernetes/events.go b/internal/component/loki/rules/kubernetes/events.go similarity index 99% rename from component/loki/rules/kubernetes/events.go rename to internal/component/loki/rules/kubernetes/events.go index 1d76323cb4..f8f80da31f 100644 --- a/component/loki/rules/kubernetes/events.go +++ b/internal/component/loki/rules/kubernetes/events.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/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/component/loki/rules/kubernetes/events_test.go b/internal/component/loki/rules/kubernetes/events_test.go similarity index 98% rename from component/loki/rules/kubernetes/events_test.go rename to internal/component/loki/rules/kubernetes/events_test.go index 71fcdc54e8..e6ebf800d6 100644 --- a/component/loki/rules/kubernetes/events_test.go +++ b/internal/component/loki/rules/kubernetes/events_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - lokiClient "github.com/grafana/agent/pkg/loki/client" + lokiClient "github.com/grafana/agent/internal/loki/client" v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" promListers "github.com/prometheus-operator/prometheus-operator/pkg/client/listers/monitoring/v1" "github.com/prometheus/prometheus/model/rulefmt" diff --git a/component/loki/rules/kubernetes/health.go b/internal/component/loki/rules/kubernetes/health.go similarity index 92% rename from component/loki/rules/kubernetes/health.go rename to internal/component/loki/rules/kubernetes/health.go index b48ffb4a54..101bfd1d0a 100644 --- a/component/loki/rules/kubernetes/health.go +++ b/internal/component/loki/rules/kubernetes/health.go @@ -3,7 +3,7 @@ package rules import ( "time" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" ) func (c *Component) reportUnhealthy(err error) { diff --git a/component/loki/rules/kubernetes/rules.go b/internal/component/loki/rules/kubernetes/rules.go similarity index 98% rename from component/loki/rules/kubernetes/rules.go rename to internal/component/loki/rules/kubernetes/rules.go index 72b5633347..d2cd5ca87d 100644 --- a/component/loki/rules/kubernetes/rules.go +++ b/internal/component/loki/rules/kubernetes/rules.go @@ -7,10 +7,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - lokiClient "github.com/grafana/agent/pkg/loki/client" + "github.com/grafana/agent/internal/flow/logging/level" + lokiClient "github.com/grafana/agent/internal/loki/client" "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/component/loki/rules/kubernetes/rules_test.go b/internal/component/loki/rules/kubernetes/rules_test.go similarity index 100% rename from component/loki/rules/kubernetes/rules_test.go rename to internal/component/loki/rules/kubernetes/rules_test.go diff --git a/component/loki/rules/kubernetes/types.go b/internal/component/loki/rules/kubernetes/types.go similarity index 96% rename from component/loki/rules/kubernetes/types.go rename to internal/component/loki/rules/kubernetes/types.go index 1e37bd2e50..0e9f0bfedc 100644 --- a/component/loki/rules/kubernetes/types.go +++ b/internal/component/loki/rules/kubernetes/types.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" ) type Arguments struct { diff --git a/component/loki/source/api/api.go b/internal/component/loki/source/api/api.go similarity index 92% rename from component/loki/source/api/api.go rename to internal/component/loki/source/api/api.go index c786efcf32..33159ab84b 100644 --- a/component/loki/source/api/api.go +++ b/internal/component/loki/source/api/api.go @@ -6,13 +6,13 @@ import ( "reflect" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/api/internal/lokipush" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/api/internal/lokipush" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" ) diff --git a/component/loki/source/api/api_test.go b/internal/component/loki/source/api/api_test.go similarity index 96% rename from component/loki/source/api/api_test.go rename to internal/component/loki/source/api/api_test.go index 38334ded78..df5a9785b6 100644 --- a/component/loki/source/api/api_test.go +++ b/internal/component/loki/source/api/api_test.go @@ -9,13 +9,13 @@ import ( "github.com/phayes/freeport" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/client" - "github.com/grafana/agent/component/common/loki/client/fake" - "github.com/grafana/agent/component/common/net" - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/client" + "github.com/grafana/agent/internal/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/net" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/flagext" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/regexp" diff --git a/component/loki/source/api/internal/lokipush/push_api_server.go b/internal/component/loki/source/api/internal/lokipush/push_api_server.go similarity index 96% rename from component/loki/source/api/internal/lokipush/push_api_server.go rename to internal/component/loki/source/api/internal/lokipush/push_api_server.go index d2813d2755..1b73950cc6 100644 --- a/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/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - frelabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + frelabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/dskit/tenant" "github.com/grafana/loki/pkg/loghttp/push" "github.com/grafana/loki/pkg/logproto" diff --git a/component/loki/source/api/internal/lokipush/push_api_server_test.go b/internal/component/loki/source/api/internal/lokipush/push_api_server_test.go similarity index 96% rename from component/loki/source/api/internal/lokipush/push_api_server_test.go rename to internal/component/loki/source/api/internal/lokipush/push_api_server_test.go index 8cc9e827ad..7e38572437 100644 --- a/component/loki/source/api/internal/lokipush/push_api_server_test.go +++ b/internal/component/loki/source/api/internal/lokipush/push_api_server_test.go @@ -16,11 +16,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/client" - "github.com/grafana/agent/component/common/loki/client/fake" - fnet "github.com/grafana/agent/component/common/net" - frelabel "github.com/grafana/agent/component/common/relabel" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/client" + "github.com/grafana/agent/internal/component/common/loki/client/fake" + fnet "github.com/grafana/agent/internal/component/common/net" + frelabel "github.com/grafana/agent/internal/component/common/relabel" "github.com/grafana/dskit/flagext" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/river" diff --git a/component/loki/source/aws_firehose/component.go b/internal/component/loki/source/aws_firehose/component.go similarity index 93% rename from component/loki/source/aws_firehose/component.go rename to internal/component/loki/source/aws_firehose/component.go index 65d1dbc9c2..f4ec7e31f1 100644 --- a/component/loki/source/aws_firehose/component.go +++ b/internal/component/loki/source/aws_firehose/component.go @@ -12,12 +12,12 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/aws_firehose/internal" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/aws_firehose/internal" + "github.com/grafana/agent/internal/util" "github.com/grafana/river/rivertypes" ) diff --git a/component/loki/source/aws_firehose/component_test.go b/internal/component/loki/source/aws_firehose/component_test.go similarity index 96% rename from component/loki/source/aws_firehose/component_test.go rename to internal/component/loki/source/aws_firehose/component_test.go index 7d5517cd76..164f4d5b45 100644 --- a/component/loki/source/aws_firehose/component_test.go +++ b/internal/component/loki/source/aws_firehose/component_test.go @@ -15,11 +15,11 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/util" ) const singleRecordRequest = `{"requestId":"a1af4300-6c09-4916-ba8f-12f336176246","timestamp":1684422829730,"records":[{"data":"eyJDSEFOR0UiOi0wLjIzLCJQUklDRSI6NC44LCJUSUNLRVJfU1lNQk9MIjoiTkdDIiwiU0VDVE9SIjoiSEVBTFRIQ0FSRSJ9"}]}` diff --git a/component/loki/source/aws_firehose/internal/errors.go b/internal/component/loki/source/aws_firehose/internal/errors.go similarity index 100% rename from component/loki/source/aws_firehose/internal/errors.go rename to internal/component/loki/source/aws_firehose/internal/errors.go diff --git a/component/loki/source/aws_firehose/internal/handler.go b/internal/component/loki/source/aws_firehose/internal/handler.go similarity index 97% rename from component/loki/source/aws_firehose/internal/handler.go rename to internal/component/loki/source/aws_firehose/internal/handler.go index 6a59ec0ee7..38c98631c9 100644 --- a/component/loki/source/aws_firehose/internal/handler.go +++ b/internal/component/loki/source/aws_firehose/internal/handler.go @@ -15,14 +15,14 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/agent/component/common/loki" - lokiClient "github.com/grafana/agent/component/common/loki/client" + "github.com/grafana/agent/internal/component/common/loki" + lokiClient "github.com/grafana/agent/internal/component/common/loki/client" ) const ( diff --git a/component/loki/source/aws_firehose/internal/handler_test.go b/internal/component/loki/source/aws_firehose/internal/handler_test.go similarity index 99% rename from component/loki/source/aws_firehose/internal/handler_test.go rename to internal/component/loki/source/aws_firehose/internal/handler_test.go index c926dbc34b..54848c9660 100644 --- a/component/loki/source/aws_firehose/internal/handler_test.go +++ b/internal/component/loki/source/aws_firehose/internal/handler_test.go @@ -22,7 +22,7 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" ) const ( diff --git a/component/loki/source/aws_firehose/internal/metrics.go b/internal/component/loki/source/aws_firehose/internal/metrics.go similarity index 100% rename from component/loki/source/aws_firehose/internal/metrics.go rename to internal/component/loki/source/aws_firehose/internal/metrics.go diff --git a/component/loki/source/aws_firehose/internal/model.go b/internal/component/loki/source/aws_firehose/internal/model.go similarity index 100% rename from component/loki/source/aws_firehose/internal/model.go rename to internal/component/loki/source/aws_firehose/internal/model.go diff --git a/component/loki/source/aws_firehose/internal/testdata/cw_logs_control_and_bad_records.json b/internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_control_and_bad_records.json similarity index 100% rename from component/loki/source/aws_firehose/internal/testdata/cw_logs_control_and_bad_records.json rename to internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_control_and_bad_records.json diff --git a/component/loki/source/aws_firehose/internal/testdata/cw_logs_mixed.json b/internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_mixed.json similarity index 100% rename from component/loki/source/aws_firehose/internal/testdata/cw_logs_mixed.json rename to internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_mixed.json diff --git a/component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_control_messages.json b/internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_control_messages.json similarity index 100% rename from component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_control_messages.json rename to internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_control_messages.json diff --git a/component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_data_messages.json b/internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_data_messages.json similarity index 100% rename from component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_data_messages.json rename to internal/component/loki/source/aws_firehose/internal/testdata/cw_logs_with_only_data_messages.json diff --git a/component/loki/source/aws_firehose/internal/testdata/direct_put.json b/internal/component/loki/source/aws_firehose/internal/testdata/direct_put.json similarity index 100% rename from component/loki/source/aws_firehose/internal/testdata/direct_put.json rename to internal/component/loki/source/aws_firehose/internal/testdata/direct_put.json diff --git a/component/loki/source/aws_firehose/internal/testdata/direct_put_with_non_json_message.json b/internal/component/loki/source/aws_firehose/internal/testdata/direct_put_with_non_json_message.json similarity index 100% rename from component/loki/source/aws_firehose/internal/testdata/direct_put_with_non_json_message.json rename to internal/component/loki/source/aws_firehose/internal/testdata/direct_put_with_non_json_message.json diff --git a/component/loki/source/azure_event_hubs/azure_event_hubs.go b/internal/component/loki/source/azure_event_hubs/azure_event_hubs.go similarity index 94% rename from component/loki/source/azure_event_hubs/azure_event_hubs.go rename to internal/component/loki/source/azure_event_hubs/azure_event_hubs.go index d6badd98b0..1a35824c14 100644 --- a/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/agent/component" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/azure_event_hubs/internal/parser" - kt "github.com/grafana/agent/component/loki/source/internal/kafkatarget" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/azure_event_hubs/internal/parser" + kt "github.com/grafana/agent/internal/component/loki/source/internal/kafkatarget" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/dskit/flagext" "github.com/prometheus/common/model" diff --git a/component/loki/source/azure_event_hubs/azure_event_hubs_test.go b/internal/component/loki/source/azure_event_hubs/azure_event_hubs_test.go similarity index 100% rename from component/loki/source/azure_event_hubs/azure_event_hubs_test.go rename to internal/component/loki/source/azure_event_hubs/azure_event_hubs_test.go diff --git a/component/loki/source/azure_event_hubs/internal/parser/parser.go b/internal/component/loki/source/azure_event_hubs/internal/parser/parser.go similarity index 99% rename from component/loki/source/azure_event_hubs/internal/parser/parser.go rename to internal/component/loki/source/azure_event_hubs/internal/parser/parser.go index 0d257840d8..227fad601a 100644 --- a/component/loki/source/azure_event_hubs/internal/parser/parser.go +++ b/internal/component/loki/source/azure_event_hubs/internal/parser/parser.go @@ -12,7 +12,7 @@ import ( "time" "github.com/IBM/sarama" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/component/loki/source/azure_event_hubs/internal/parser/parser_test.go b/internal/component/loki/source/azure_event_hubs/internal/parser/parser_test.go similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/parser_test.go rename to internal/component/loki/source/azure_event_hubs/internal/parser/parser_test.go diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_message_and_logic_app_logs.json b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_message_and_logic_app_logs.json similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/custom_message_and_logic_app_logs.json rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_message_and_logic_app_logs.json diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json.json b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json.json similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json.json rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json.json diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_array.json b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_array.json similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_array.json rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_array.json diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_string.json b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_string.json similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_string.json rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_json_with_records_string.json diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_text.txt b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_text.txt similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_text.txt rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/custom_payload_text.txt diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/function_app_logs_message.txt b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/function_app_logs_message.txt similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/function_app_logs_message.txt rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/function_app_logs_message.txt diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/logic_app_logs_message.json b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/logic_app_logs_message.json similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/logic_app_logs_message.json rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/logic_app_logs_message.json diff --git a/component/loki/source/azure_event_hubs/internal/parser/testdata/message_with_invalid_time.json b/internal/component/loki/source/azure_event_hubs/internal/parser/testdata/message_with_invalid_time.json similarity index 100% rename from component/loki/source/azure_event_hubs/internal/parser/testdata/message_with_invalid_time.json rename to internal/component/loki/source/azure_event_hubs/internal/parser/testdata/message_with_invalid_time.json diff --git a/component/loki/source/cloudflare/cloudflare.go b/internal/component/loki/source/cloudflare/cloudflare.go similarity index 94% rename from component/loki/source/cloudflare/cloudflare.go rename to internal/component/loki/source/cloudflare/cloudflare.go index aa6aebd71c..937c650106 100644 --- a/component/loki/source/cloudflare/cloudflare.go +++ b/internal/component/loki/source/cloudflare/cloudflare.go @@ -13,12 +13,12 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - cft "github.com/grafana/agent/component/loki/source/cloudflare/internal/cloudflaretarget" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + cft "github.com/grafana/agent/internal/component/loki/source/cloudflare/internal/cloudflaretarget" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/model" ) diff --git a/component/loki/source/cloudflare/internal/cloudflaretarget/client.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/client.go similarity index 100% rename from component/loki/source/cloudflare/internal/cloudflaretarget/client.go rename to internal/component/loki/source/cloudflare/internal/cloudflaretarget/client.go diff --git a/component/loki/source/cloudflare/internal/cloudflaretarget/fields.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/fields.go similarity index 100% rename from component/loki/source/cloudflare/internal/cloudflaretarget/fields.go rename to internal/component/loki/source/cloudflare/internal/cloudflaretarget/fields.go diff --git a/component/loki/source/cloudflare/internal/cloudflaretarget/fields_test.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/fields_test.go similarity index 100% rename from component/loki/source/cloudflare/internal/cloudflaretarget/fields_test.go rename to internal/component/loki/source/cloudflare/internal/cloudflaretarget/fields_test.go diff --git a/component/loki/source/cloudflare/internal/cloudflaretarget/metrics.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/metrics.go similarity index 100% rename from component/loki/source/cloudflare/internal/cloudflaretarget/metrics.go rename to internal/component/loki/source/cloudflare/internal/cloudflaretarget/metrics.go diff --git a/component/loki/source/cloudflare/internal/cloudflaretarget/target.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target.go similarity index 97% rename from component/loki/source/cloudflare/internal/cloudflaretarget/target.go rename to internal/component/loki/source/cloudflare/internal/cloudflaretarget/target.go index d6401d91bb..33c860cf98 100644 --- a/component/loki/source/cloudflare/internal/cloudflaretarget/target.go +++ b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target.go @@ -14,9 +14,9 @@ import ( "github.com/buger/jsonparser" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/cloudflare-go" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/concurrency" diff --git a/component/loki/source/cloudflare/internal/cloudflaretarget/target_test.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target_test.go similarity index 98% rename from component/loki/source/cloudflare/internal/cloudflaretarget/target_test.go rename to internal/component/loki/source/cloudflare/internal/cloudflaretarget/target_test.go index e7e935fc33..5a0a54f2c3 100644 --- a/component/loki/source/cloudflare/internal/cloudflaretarget/target_test.go +++ b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/target_test.go @@ -13,10 +13,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki/positions" + "github.com/grafana/agent/internal/component/common/loki/positions" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" diff --git a/component/loki/source/cloudflare/internal/cloudflaretarget/util_test.go b/internal/component/loki/source/cloudflare/internal/cloudflaretarget/util_test.go similarity index 100% rename from component/loki/source/cloudflare/internal/cloudflaretarget/util_test.go rename to internal/component/loki/source/cloudflare/internal/cloudflaretarget/util_test.go diff --git a/component/loki/source/docker/docker.go b/internal/component/loki/source/docker/docker.go similarity index 94% rename from component/loki/source/docker/docker.go rename to internal/component/loki/source/docker/docker.go index 680fff736c..d1b1430db7 100644 --- a/component/loki/source/docker/docker.go +++ b/internal/component/loki/source/docker/docker.go @@ -15,16 +15,16 @@ import ( "github.com/docker/docker/client" "github.com/go-kit/log" - "github.com/grafana/agent/component" - types "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/discovery" - dt "github.com/grafana/agent/component/loki/source/docker/internal/dockertarget" + "github.com/grafana/agent/internal/component" + types "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/discovery" + dt "github.com/grafana/agent/internal/component/loki/source/docker/internal/dockertarget" "github.com/grafana/agent/internal/featuregate" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" "github.com/prometheus/common/config" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" diff --git a/component/loki/source/docker/docker_test.go b/internal/component/loki/source/docker/docker_test.go similarity index 92% rename from component/loki/source/docker/docker_test.go rename to internal/component/loki/source/docker/docker_test.go index c4b99c4738..722a720772 100644 --- a/component/loki/source/docker/docker_test.go +++ b/internal/component/loki/source/docker/docker_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" diff --git a/component/loki/source/docker/internal/dockertarget/metrics.go b/internal/component/loki/source/docker/internal/dockertarget/metrics.go similarity index 100% rename from component/loki/source/docker/internal/dockertarget/metrics.go rename to internal/component/loki/source/docker/internal/dockertarget/metrics.go diff --git a/component/loki/source/docker/internal/dockertarget/target.go b/internal/component/loki/source/docker/internal/dockertarget/target.go similarity index 97% rename from component/loki/source/docker/internal/dockertarget/target.go rename to internal/component/loki/source/docker/internal/dockertarget/target.go index 25acdefa5e..5e118fab98 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/component/loki/source/docker/internal/dockertarget/target_test.go b/internal/component/loki/source/docker/internal/dockertarget/target_test.go similarity index 97% rename from component/loki/source/docker/internal/dockertarget/target_test.go rename to internal/component/loki/source/docker/internal/dockertarget/target_test.go index 6f3b52a442..701d3f86f5 100644 --- a/component/loki/source/docker/internal/dockertarget/target_test.go +++ b/internal/component/loki/source/docker/internal/dockertarget/target_test.go @@ -13,13 +13,13 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki/positions" + "github.com/grafana/agent/internal/component/common/loki/positions" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" diff --git a/component/loki/source/docker/internal/dockertarget/testdata/flog.log b/internal/component/loki/source/docker/internal/dockertarget/testdata/flog.log similarity index 100% rename from component/loki/source/docker/internal/dockertarget/testdata/flog.log rename to internal/component/loki/source/docker/internal/dockertarget/testdata/flog.log diff --git a/component/loki/source/docker/internal/dockertarget/testdata/flog_after_restart.log b/internal/component/loki/source/docker/internal/dockertarget/testdata/flog_after_restart.log similarity index 100% rename from component/loki/source/docker/internal/dockertarget/testdata/flog_after_restart.log rename to internal/component/loki/source/docker/internal/dockertarget/testdata/flog_after_restart.log diff --git a/component/loki/source/docker/runner.go b/internal/component/loki/source/docker/runner.go similarity index 95% rename from component/loki/source/docker/runner.go rename to internal/component/loki/source/docker/runner.go index c010a02fee..61fb9d6407 100644 --- a/component/loki/source/docker/runner.go +++ b/internal/component/loki/source/docker/runner.go @@ -9,11 +9,11 @@ import ( "github.com/docker/docker/api/types/container" "github.com/docker/docker/client" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - dt "github.com/grafana/agent/component/loki/source/docker/internal/dockertarget" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/runner" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + dt "github.com/grafana/agent/internal/component/loki/source/docker/internal/dockertarget" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/runner" ) // A manager manages a set of running tailers. diff --git a/component/loki/source/file/compression_format.go b/internal/component/loki/source/file/compression_format.go similarity index 100% rename from component/loki/source/file/compression_format.go rename to internal/component/loki/source/file/compression_format.go diff --git a/component/loki/source/file/decompresser.go b/internal/component/loki/source/file/decompresser.go similarity index 97% rename from component/loki/source/file/decompresser.go rename to internal/component/loki/source/file/decompresser.go index c70ec2b7b9..85696f3676 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "go.uber.org/atomic" diff --git a/component/loki/source/file/decompresser_test.go b/internal/component/loki/source/file/decompresser_test.go similarity index 97% rename from component/loki/source/file/decompresser_test.go rename to internal/component/loki/source/file/decompresser_test.go index 5116b1e86e..d3ecc7d872 100644 --- a/component/loki/source/file/decompresser_test.go +++ b/internal/component/loki/source/file/decompresser_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" "go.uber.org/atomic" diff --git a/component/loki/source/file/file.go b/internal/component/loki/source/file/file.go similarity index 97% rename from component/loki/source/file/file.go rename to internal/component/loki/source/file/file.go index 907d070f24..63598afe86 100644 --- a/component/loki/source/file/file.go +++ b/internal/component/loki/source/file/file.go @@ -9,12 +9,12 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/tail/watch" "github.com/prometheus/common/model" ) diff --git a/component/loki/source/file/file_test.go b/internal/component/loki/source/file/file_test.go similarity index 96% rename from component/loki/source/file/file_test.go rename to internal/component/loki/source/file/file_test.go index a1256e2950..d7ca89b933 100644 --- a/component/loki/source/file/file_test.go +++ b/internal/component/loki/source/file/file_test.go @@ -11,11 +11,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" diff --git a/component/loki/source/file/metrics.go b/internal/component/loki/source/file/metrics.go similarity index 100% rename from component/loki/source/file/metrics.go rename to internal/component/loki/source/file/metrics.go diff --git a/component/loki/source/file/reader.go b/internal/component/loki/source/file/reader.go similarity index 100% rename from component/loki/source/file/reader.go rename to internal/component/loki/source/file/reader.go diff --git a/component/loki/source/file/tailer.go b/internal/component/loki/source/file/tailer.go similarity index 98% rename from component/loki/source/file/tailer.go rename to internal/component/loki/source/file/tailer.go index c05fcda166..94de433ae6 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/loki/pkg/util" "github.com/grafana/tail" diff --git a/component/loki/source/file/tailer_test.go b/internal/component/loki/source/file/tailer_test.go similarity index 100% rename from component/loki/source/file/tailer_test.go rename to internal/component/loki/source/file/tailer_test.go diff --git a/component/loki/source/file/testdata/long-access.gz b/internal/component/loki/source/file/testdata/long-access.gz similarity index 100% rename from component/loki/source/file/testdata/long-access.gz rename to internal/component/loki/source/file/testdata/long-access.gz diff --git a/component/loki/source/file/testdata/long-access.tar.gz b/internal/component/loki/source/file/testdata/long-access.tar.gz similarity index 100% rename from component/loki/source/file/testdata/long-access.tar.gz rename to internal/component/loki/source/file/testdata/long-access.tar.gz diff --git a/component/loki/source/file/testdata/onelinelog.log b/internal/component/loki/source/file/testdata/onelinelog.log similarity index 100% rename from component/loki/source/file/testdata/onelinelog.log rename to internal/component/loki/source/file/testdata/onelinelog.log diff --git a/component/loki/source/file/testdata/onelinelog.log.bz2 b/internal/component/loki/source/file/testdata/onelinelog.log.bz2 similarity index 100% rename from component/loki/source/file/testdata/onelinelog.log.bz2 rename to internal/component/loki/source/file/testdata/onelinelog.log.bz2 diff --git a/component/loki/source/file/testdata/onelinelog.log.gz b/internal/component/loki/source/file/testdata/onelinelog.log.gz similarity index 100% rename from component/loki/source/file/testdata/onelinelog.log.gz rename to internal/component/loki/source/file/testdata/onelinelog.log.gz diff --git a/component/loki/source/file/testdata/onelinelog.tar.gz b/internal/component/loki/source/file/testdata/onelinelog.tar.gz similarity index 100% rename from component/loki/source/file/testdata/onelinelog.tar.gz rename to internal/component/loki/source/file/testdata/onelinelog.tar.gz diff --git a/component/loki/source/file/testdata/short-access.log b/internal/component/loki/source/file/testdata/short-access.log similarity index 100% rename from component/loki/source/file/testdata/short-access.log rename to internal/component/loki/source/file/testdata/short-access.log diff --git a/component/loki/source/file/testdata/short-access.tar.gz b/internal/component/loki/source/file/testdata/short-access.tar.gz similarity index 100% rename from component/loki/source/file/testdata/short-access.tar.gz rename to internal/component/loki/source/file/testdata/short-access.tar.gz diff --git a/component/loki/source/gcplog/gcplog.go b/internal/component/loki/source/gcplog/gcplog.go similarity index 91% rename from component/loki/source/gcplog/gcplog.go rename to internal/component/loki/source/gcplog/gcplog.go index 0f994d5412..1d8c5aaa6f 100644 --- a/component/loki/source/gcplog/gcplog.go +++ b/internal/component/loki/source/gcplog/gcplog.go @@ -7,16 +7,16 @@ import ( "sync" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/gcplog/gcptypes" - gt "github.com/grafana/agent/component/loki/source/gcplog/internal/gcplogtarget" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/gcplog/gcptypes" + gt "github.com/grafana/agent/internal/component/loki/source/gcplog/internal/gcplogtarget" + "github.com/grafana/agent/internal/util" ) func init() { diff --git a/component/loki/source/gcplog/gcplog_test.go b/internal/component/loki/source/gcplog/gcplog_test.go similarity index 92% rename from component/loki/source/gcplog/gcplog_test.go rename to internal/component/loki/source/gcplog/gcplog_test.go index f1c44454e7..1d54519369 100644 --- a/component/loki/source/gcplog/gcplog_test.go +++ b/internal/component/loki/source/gcplog/gcplog_test.go @@ -14,12 +14,12 @@ import ( "github.com/prometheus/common/model" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/gcplog/gcptypes" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/gcplog/gcptypes" + "github.com/grafana/agent/internal/util" ) // TODO (@tpaschalis) We can't test this easily as there's no way to inject diff --git a/component/loki/source/gcplog/gcptypes/gcptypes.go b/internal/component/loki/source/gcplog/gcptypes/gcptypes.go similarity index 95% rename from component/loki/source/gcplog/gcptypes/gcptypes.go rename to internal/component/loki/source/gcplog/gcptypes/gcptypes.go index ebbdc73569..3008c7b0d9 100644 --- a/component/loki/source/gcplog/gcptypes/gcptypes.go +++ b/internal/component/loki/source/gcplog/gcptypes/gcptypes.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - fnet "github.com/grafana/agent/component/common/net" + fnet "github.com/grafana/agent/internal/component/common/net" ) // PullConfig configures a GCPLog target with the 'pull' strategy. diff --git a/component/loki/source/gcplog/internal/gcplogtarget/formatter.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/formatter.go similarity index 98% rename from component/loki/source/gcplog/internal/gcplogtarget/formatter.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/formatter.go index 2bb1d287f8..9085737c15 100644 --- a/component/loki/source/gcplog/internal/gcplogtarget/formatter.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/formatter.go @@ -16,7 +16,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" ) // GCPLogEntry that will be written to the pubsub topic according to the following spec. diff --git a/component/loki/source/gcplog/internal/gcplogtarget/formatter_test.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/formatter_test.go similarity index 100% rename from component/loki/source/gcplog/internal/gcplogtarget/formatter_test.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/formatter_test.go diff --git a/component/loki/source/gcplog/internal/gcplogtarget/metrics.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/metrics.go similarity index 100% rename from component/loki/source/gcplog/internal/gcplogtarget/metrics.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/metrics.go diff --git a/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go similarity index 95% rename from component/loki/source/gcplog/internal/gcplogtarget/pull_target.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go index 9362aaadd5..67fbf13675 100644 --- a/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target.go @@ -13,14 +13,14 @@ import ( "cloud.google.com/go/pubsub" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/dskit/backoff" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" "google.golang.org/api/option" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/loki/source/gcplog/gcptypes" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/loki/source/gcplog/gcptypes" ) // PullTarget represents a target that scrapes logs from a GCP project id and diff --git a/component/loki/source/gcplog/internal/gcplogtarget/pull_target_test.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target_test.go similarity index 97% rename from component/loki/source/gcplog/internal/gcplogtarget/pull_target_test.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target_test.go index b19022641a..669fc43031 100644 --- a/component/loki/source/gcplog/internal/gcplogtarget/pull_target_test.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/pull_target_test.go @@ -14,8 +14,8 @@ import ( "github.com/stretchr/testify/require" "gotest.tools/assert" - "github.com/grafana/agent/component/common/loki/client/fake" - "github.com/grafana/agent/component/loki/source/gcplog/gcptypes" + "github.com/grafana/agent/internal/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/loki/source/gcplog/gcptypes" ) func TestPullTarget_RunStop(t *testing.T) { diff --git a/component/loki/source/gcplog/internal/gcplogtarget/push_target.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target.go similarity index 95% rename from component/loki/source/gcplog/internal/gcplogtarget/push_target.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/push_target.go index bd79ff676d..c4091693ee 100644 --- a/component/loki/source/gcplog/internal/gcplogtarget/push_target.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target.go @@ -14,14 +14,14 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - "github.com/grafana/agent/component/loki/source/gcplog/gcptypes" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + "github.com/grafana/agent/internal/component/loki/source/gcplog/gcptypes" ) // PushTarget defines a server for receiving messages from a GCP PubSub push diff --git a/component/loki/source/gcplog/internal/gcplogtarget/push_target_test.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target_test.go similarity index 98% rename from component/loki/source/gcplog/internal/gcplogtarget/push_target_test.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/push_target_test.go index 25321c9c3f..68886b33c2 100644 --- a/component/loki/source/gcplog/internal/gcplogtarget/push_target_test.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_target_test.go @@ -16,10 +16,10 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/client/fake" - fnet "github.com/grafana/agent/component/common/net" - "github.com/grafana/agent/component/loki/source/gcplog/gcptypes" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/client/fake" + fnet "github.com/grafana/agent/internal/component/common/net" + "github.com/grafana/agent/internal/component/loki/source/gcplog/gcptypes" ) const localhost = "127.0.0.1" diff --git a/component/loki/source/gcplog/internal/gcplogtarget/push_translation.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_translation.go similarity index 98% rename from component/loki/source/gcplog/internal/gcplogtarget/push_translation.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/push_translation.go index 99022dc920..624c0678be 100644 --- a/component/loki/source/gcplog/internal/gcplogtarget/push_translation.go +++ b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_translation.go @@ -15,7 +15,7 @@ import ( "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" ) // ReservedLabelTenantID reserved to override the tenant ID while processing diff --git a/component/loki/source/gcplog/internal/gcplogtarget/push_translation_test.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/push_translation_test.go similarity index 100% rename from component/loki/source/gcplog/internal/gcplogtarget/push_translation_test.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/push_translation_test.go diff --git a/component/loki/source/gcplog/internal/gcplogtarget/types.go b/internal/component/loki/source/gcplog/internal/gcplogtarget/types.go similarity index 100% rename from component/loki/source/gcplog/internal/gcplogtarget/types.go rename to internal/component/loki/source/gcplog/internal/gcplogtarget/types.go diff --git a/component/loki/source/gelf/gelf.go b/internal/component/loki/source/gelf/gelf.go similarity index 92% rename from component/loki/source/gelf/gelf.go rename to internal/component/loki/source/gelf/gelf.go index 7f4125b4b0..c1a1815779 100644 --- a/component/loki/source/gelf/gelf.go +++ b/internal/component/loki/source/gelf/gelf.go @@ -4,10 +4,10 @@ import ( "context" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/gelf/internal/target" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/gelf/internal/target" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/prometheus/common/model" diff --git a/component/loki/source/gelf/gelf_test.go b/internal/component/loki/source/gelf/gelf_test.go similarity index 90% rename from component/loki/source/gelf/gelf_test.go rename to internal/component/loki/source/gelf/gelf_test.go index b9a64dd03b..0e1104717c 100644 --- a/component/loki/source/gelf/gelf_test.go +++ b/internal/component/loki/source/gelf/gelf_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/util" "github.com/phayes/freeport" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" diff --git a/component/loki/source/gelf/internal/target/gelftarget.go b/internal/component/loki/source/gelf/internal/target/gelftarget.go similarity index 97% rename from component/loki/source/gelf/internal/target/gelftarget.go rename to internal/component/loki/source/gelf/internal/target/gelftarget.go index 17e4c03ec9..5868f59ba2 100644 --- a/component/loki/source/gelf/internal/target/gelftarget.go +++ b/internal/component/loki/source/gelf/internal/target/gelftarget.go @@ -11,10 +11,10 @@ import ( "sync" "time" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/go-gelf/v2/gelf" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/component/loki/source/gelf/internal/target/metrics.go b/internal/component/loki/source/gelf/internal/target/metrics.go similarity index 100% rename from component/loki/source/gelf/internal/target/metrics.go rename to internal/component/loki/source/gelf/internal/target/metrics.go diff --git a/component/loki/source/heroku/heroku.go b/internal/component/loki/source/heroku/heroku.go similarity index 92% rename from component/loki/source/heroku/heroku.go rename to internal/component/loki/source/heroku/heroku.go index 58c6090638..9acf470109 100644 --- a/component/loki/source/heroku/heroku.go +++ b/internal/component/loki/source/heroku/heroku.go @@ -5,14 +5,14 @@ import ( "reflect" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - flow_relabel "github.com/grafana/agent/component/common/relabel" - ht "github.com/grafana/agent/component/loki/source/heroku/internal/herokutarget" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + ht "github.com/grafana/agent/internal/component/loki/source/heroku/internal/herokutarget" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" diff --git a/component/loki/source/heroku/heroku_test.go b/internal/component/loki/source/heroku/heroku_test.go similarity index 95% rename from component/loki/source/heroku/heroku_test.go rename to internal/component/loki/source/heroku/heroku_test.go index 886f05d9ac..8a6692aa09 100644 --- a/component/loki/source/heroku/heroku_test.go +++ b/internal/component/loki/source/heroku/heroku_test.go @@ -8,12 +8,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/heroku/internal/herokutarget" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/heroku/internal/herokutarget" + "github.com/grafana/agent/internal/util" "github.com/grafana/regexp" "github.com/phayes/freeport" "github.com/prometheus/client_golang/prometheus" diff --git a/component/loki/source/heroku/internal/herokutarget/herokutarget.go b/internal/component/loki/source/heroku/internal/herokutarget/herokutarget.go similarity index 96% rename from component/loki/source/heroku/internal/herokutarget/herokutarget.go rename to internal/component/loki/source/heroku/internal/herokutarget/herokutarget.go index 83eaf31c0a..903285e16a 100644 --- a/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/agent/component/common/loki" - fnet "github.com/grafana/agent/component/common/net" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + fnet "github.com/grafana/agent/internal/component/common/net" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/loki/pkg/logproto" herokuEncoding "github.com/heroku/x/logplex/encoding" "github.com/prometheus/client_golang/prometheus" diff --git a/component/loki/source/heroku/internal/herokutarget/metrics.go b/internal/component/loki/source/heroku/internal/herokutarget/metrics.go similarity index 100% rename from component/loki/source/heroku/internal/herokutarget/metrics.go rename to internal/component/loki/source/heroku/internal/herokutarget/metrics.go diff --git a/component/loki/source/heroku/internal/herokutarget/target_test.go b/internal/component/loki/source/heroku/internal/herokutarget/target_test.go similarity index 99% rename from component/loki/source/heroku/internal/herokutarget/target_test.go rename to internal/component/loki/source/heroku/internal/herokutarget/target_test.go index 9af1354feb..4da6704e16 100644 --- a/component/loki/source/heroku/internal/herokutarget/target_test.go +++ b/internal/component/loki/source/heroku/internal/herokutarget/target_test.go @@ -14,7 +14,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/go-kit/log" "github.com/google/uuid" @@ -23,7 +23,7 @@ import ( "github.com/prometheus/prometheus/model/relabel" "github.com/stretchr/testify/require" - fnet "github.com/grafana/agent/component/common/net" + fnet "github.com/grafana/agent/internal/component/common/net" ) const localhost = "127.0.0.1" diff --git a/component/loki/source/internal/kafkatarget/authentication.go b/internal/component/loki/source/internal/kafkatarget/authentication.go similarity index 100% rename from component/loki/source/internal/kafkatarget/authentication.go rename to internal/component/loki/source/internal/kafkatarget/authentication.go diff --git a/component/loki/source/internal/kafkatarget/config.go b/internal/component/loki/source/internal/kafkatarget/config.go similarity index 98% rename from component/loki/source/internal/kafkatarget/config.go rename to internal/component/loki/source/internal/kafkatarget/config.go index 4fb81923cf..1001bae451 100644 --- a/component/loki/source/internal/kafkatarget/config.go +++ b/internal/component/loki/source/internal/kafkatarget/config.go @@ -2,7 +2,7 @@ package kafkatarget import ( "github.com/IBM/sarama" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/dskit/flagext" promconfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/loki/source/internal/kafkatarget/consumer.go b/internal/component/loki/source/internal/kafkatarget/consumer.go similarity index 98% rename from component/loki/source/internal/kafkatarget/consumer.go rename to internal/component/loki/source/internal/kafkatarget/consumer.go index a7662f5618..f22c8e2b7c 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/dskit/backoff" "github.com/grafana/loki/clients/pkg/promtail/targets/target" diff --git a/component/loki/source/internal/kafkatarget/consumer_test.go b/internal/component/loki/source/internal/kafkatarget/consumer_test.go similarity index 100% rename from component/loki/source/internal/kafkatarget/consumer_test.go rename to internal/component/loki/source/internal/kafkatarget/consumer_test.go diff --git a/component/loki/source/internal/kafkatarget/formatter.go b/internal/component/loki/source/internal/kafkatarget/formatter.go similarity index 100% rename from component/loki/source/internal/kafkatarget/formatter.go rename to internal/component/loki/source/internal/kafkatarget/formatter.go diff --git a/component/loki/source/internal/kafkatarget/kafkatarget.go b/internal/component/loki/source/internal/kafkatarget/kafkatarget.go similarity index 97% rename from component/loki/source/internal/kafkatarget/kafkatarget.go rename to internal/component/loki/source/internal/kafkatarget/kafkatarget.go index a2091e0a77..b0c90c0a6b 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/flow/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/component/loki/source/internal/kafkatarget/kafkatarget_test.go b/internal/component/loki/source/internal/kafkatarget/kafkatarget_test.go similarity index 99% rename from component/loki/source/internal/kafkatarget/kafkatarget_test.go rename to internal/component/loki/source/internal/kafkatarget/kafkatarget_test.go index 338ce4244e..6d90d94ab0 100644 --- a/component/loki/source/internal/kafkatarget/kafkatarget_test.go +++ b/internal/component/loki/source/internal/kafkatarget/kafkatarget_test.go @@ -11,7 +11,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/IBM/sarama" "github.com/prometheus/common/model" diff --git a/component/loki/source/internal/kafkatarget/oauth_provider.go b/internal/component/loki/source/internal/kafkatarget/oauth_provider.go similarity index 100% rename from component/loki/source/internal/kafkatarget/oauth_provider.go rename to internal/component/loki/source/internal/kafkatarget/oauth_provider.go diff --git a/component/loki/source/internal/kafkatarget/parser.go b/internal/component/loki/source/internal/kafkatarget/parser.go similarity index 92% rename from component/loki/source/internal/kafkatarget/parser.go rename to internal/component/loki/source/internal/kafkatarget/parser.go index 325d9582cd..f4b7baed83 100644 --- a/component/loki/source/internal/kafkatarget/parser.go +++ b/internal/component/loki/source/internal/kafkatarget/parser.go @@ -2,7 +2,7 @@ package kafkatarget import ( "github.com/IBM/sarama" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/relabel" diff --git a/component/loki/source/internal/kafkatarget/target_syncer.go b/internal/component/loki/source/internal/kafkatarget/target_syncer.go similarity index 98% rename from component/loki/source/internal/kafkatarget/target_syncer.go rename to internal/component/loki/source/internal/kafkatarget/target_syncer.go index b684b17634..dd58766f9f 100644 --- a/component/loki/source/internal/kafkatarget/target_syncer.go +++ b/internal/component/loki/source/internal/kafkatarget/target_syncer.go @@ -13,14 +13,14 @@ import ( "github.com/IBM/sarama" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" promconfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/grafana/loki/clients/pkg/promtail/targets/target" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" ) var TopicPollInterval = 30 * time.Second diff --git a/component/loki/source/internal/kafkatarget/target_syncer_test.go b/internal/component/loki/source/internal/kafkatarget/target_syncer_test.go similarity index 99% rename from component/loki/source/internal/kafkatarget/target_syncer_test.go rename to internal/component/loki/source/internal/kafkatarget/target_syncer_test.go index 1e1a417cab..4c11f46d8c 100644 --- a/component/loki/source/internal/kafkatarget/target_syncer_test.go +++ b/internal/component/loki/source/internal/kafkatarget/target_syncer_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/grafana/dskit/flagext" "github.com/prometheus/common/config" diff --git a/component/loki/source/internal/kafkatarget/testdata/example.com-key.pem b/internal/component/loki/source/internal/kafkatarget/testdata/example.com-key.pem similarity index 100% rename from component/loki/source/internal/kafkatarget/testdata/example.com-key.pem rename to internal/component/loki/source/internal/kafkatarget/testdata/example.com-key.pem diff --git a/component/loki/source/internal/kafkatarget/testdata/example.com.ca.pem b/internal/component/loki/source/internal/kafkatarget/testdata/example.com.ca.pem similarity index 100% rename from component/loki/source/internal/kafkatarget/testdata/example.com.ca.pem rename to internal/component/loki/source/internal/kafkatarget/testdata/example.com.ca.pem diff --git a/component/loki/source/internal/kafkatarget/testdata/example.com.pem b/internal/component/loki/source/internal/kafkatarget/testdata/example.com.pem similarity index 100% rename from component/loki/source/internal/kafkatarget/testdata/example.com.pem rename to internal/component/loki/source/internal/kafkatarget/testdata/example.com.pem diff --git a/component/loki/source/internal/kafkatarget/topics.go b/internal/component/loki/source/internal/kafkatarget/topics.go similarity index 100% rename from component/loki/source/internal/kafkatarget/topics.go rename to internal/component/loki/source/internal/kafkatarget/topics.go diff --git a/component/loki/source/internal/kafkatarget/topics_test.go b/internal/component/loki/source/internal/kafkatarget/topics_test.go similarity index 100% rename from component/loki/source/internal/kafkatarget/topics_test.go rename to internal/component/loki/source/internal/kafkatarget/topics_test.go diff --git a/component/loki/source/journal/internal/target/journaltarget.go b/internal/component/loki/source/journal/internal/target/journaltarget.go similarity index 98% rename from component/loki/source/journal/internal/target/journaltarget.go rename to internal/component/loki/source/journal/internal/target/journaltarget.go index 2e553f4bee..88377ba426 100644 --- a/component/loki/source/journal/internal/target/journaltarget.go +++ b/internal/component/loki/source/journal/internal/target/journaltarget.go @@ -13,12 +13,12 @@ import ( "syscall" "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" "github.com/coreos/go-systemd/sdjournal" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" jsoniter "github.com/json-iterator/go" "github.com/pkg/errors" "github.com/prometheus/common/model" diff --git a/component/loki/source/journal/internal/target/journaltarget_test.go b/internal/component/loki/source/journal/internal/target/journaltarget_test.go similarity index 98% rename from component/loki/source/journal/internal/target/journaltarget_test.go rename to internal/component/loki/source/journal/internal/target/journaltarget_test.go index 7c44ab490c..e8bd2653e3 100644 --- a/component/loki/source/journal/internal/target/journaltarget_test.go +++ b/internal/component/loki/source/journal/internal/target/journaltarget_test.go @@ -14,11 +14,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/coreos/go-systemd/sdjournal" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki/positions" + "github.com/grafana/agent/internal/component/common/loki/positions" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/prometheus/prometheus/model/relabel" diff --git a/component/loki/source/journal/internal/target/metrics.go b/internal/component/loki/source/journal/internal/target/metrics.go similarity index 100% rename from component/loki/source/journal/internal/target/metrics.go rename to internal/component/loki/source/journal/internal/target/metrics.go diff --git a/component/loki/source/journal/journal.go b/internal/component/loki/source/journal/journal.go similarity index 90% rename from component/loki/source/journal/journal.go rename to internal/component/loki/source/journal/journal.go index 59fa6ae097..7bdb5b3127 100644 --- a/component/loki/source/journal/journal.go +++ b/internal/component/loki/source/journal/journal.go @@ -9,15 +9,15 @@ import ( "sync" "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/journal/internal/target" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/journal/internal/target" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/prometheus/common/model" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" ) func init() { diff --git a/component/loki/source/journal/journal_stub.go b/internal/component/loki/source/journal/journal_stub.go similarity index 91% rename from component/loki/source/journal/journal_stub.go rename to internal/component/loki/source/journal/journal_stub.go index 3c91692ed7..a18ec9f420 100644 --- a/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/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/loki/source/journal/journal_test.go b/internal/component/loki/source/journal/journal_test.go similarity index 88% rename from component/loki/source/journal/journal_test.go rename to internal/component/loki/source/journal/journal_test.go index 9a53341167..525d982998 100644 --- a/component/loki/source/journal/journal_test.go +++ b/internal/component/loki/source/journal/journal_test.go @@ -9,9 +9,9 @@ import ( "time" "github.com/coreos/go-systemd/v22/journal" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" ) diff --git a/component/loki/source/journal/types.go b/internal/component/loki/source/journal/types.go similarity index 85% rename from component/loki/source/journal/types.go rename to internal/component/loki/source/journal/types.go index 1933c95718..7ba03adab0 100644 --- a/component/loki/source/journal/types.go +++ b/internal/component/loki/source/journal/types.go @@ -3,8 +3,8 @@ package journal import ( "time" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" ) // Arguments are the arguments for the component. diff --git a/component/loki/source/kafka/kafka.go b/internal/component/loki/source/kafka/kafka.go similarity index 94% rename from component/loki/source/kafka/kafka.go rename to internal/component/loki/source/kafka/kafka.go index ac2bf7d2f0..067eb87142 100644 --- a/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/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - kt "github.com/grafana/agent/component/loki/source/internal/kafkatarget" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + kt "github.com/grafana/agent/internal/component/loki/source/internal/kafkatarget" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/dskit/flagext" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/model" diff --git a/component/loki/source/kafka/kafka_test.go b/internal/component/loki/source/kafka/kafka_test.go similarity index 100% rename from component/loki/source/kafka/kafka_test.go rename to internal/component/loki/source/kafka/kafka_test.go diff --git a/component/loki/source/kubernetes/kubernetes.go b/internal/component/loki/source/kubernetes/kubernetes.go similarity index 93% rename from component/loki/source/kubernetes/kubernetes.go rename to internal/component/loki/source/kubernetes/kubernetes.go index e9b5819b58..f9c4d3fa5b 100644 --- a/component/loki/source/kubernetes/kubernetes.go +++ b/internal/component/loki/source/kubernetes/kubernetes.go @@ -11,15 +11,15 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - commonk8s "github.com/grafana/agent/component/common/kubernetes" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/loki/source/kubernetes/kubetail" + "github.com/grafana/agent/internal/component" + commonk8s "github.com/grafana/agent/internal/component/common/kubernetes" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/loki/source/kubernetes/kubetail" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" "k8s.io/client-go/kubernetes" ) diff --git a/component/loki/source/kubernetes/kubernetes_test.go b/internal/component/loki/source/kubernetes/kubernetes_test.go similarity index 100% rename from component/loki/source/kubernetes/kubernetes_test.go rename to internal/component/loki/source/kubernetes/kubernetes_test.go diff --git a/component/loki/source/kubernetes/kubetail/container_utils.go b/internal/component/loki/source/kubernetes/kubetail/container_utils.go similarity index 100% rename from component/loki/source/kubernetes/kubetail/container_utils.go rename to internal/component/loki/source/kubernetes/kubetail/container_utils.go diff --git a/component/loki/source/kubernetes/kubetail/kubetail.go b/internal/component/loki/source/kubernetes/kubetail/kubetail.go similarity index 95% rename from component/loki/source/kubernetes/kubetail/kubetail.go rename to internal/component/loki/source/kubernetes/kubetail/kubetail.go index 7f4c1984bb..10c5d64ee0 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/runner" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/runner" "k8s.io/client-go/kubernetes" ) diff --git a/component/loki/source/kubernetes/kubetail/tail_utils.go b/internal/component/loki/source/kubernetes/kubetail/tail_utils.go similarity index 100% rename from component/loki/source/kubernetes/kubetail/tail_utils.go rename to internal/component/loki/source/kubernetes/kubetail/tail_utils.go diff --git a/component/loki/source/kubernetes/kubetail/tail_utils_test.go b/internal/component/loki/source/kubernetes/kubetail/tail_utils_test.go similarity index 100% rename from component/loki/source/kubernetes/kubetail/tail_utils_test.go rename to internal/component/loki/source/kubernetes/kubetail/tail_utils_test.go diff --git a/component/loki/source/kubernetes/kubetail/tailer.go b/internal/component/loki/source/kubernetes/kubetail/tailer.go similarity index 98% rename from component/loki/source/kubernetes/kubetail/tailer.go rename to internal/component/loki/source/kubernetes/kubetail/tailer.go index 6ea2a2d9b3..4e30ab511a 100644 --- a/component/loki/source/kubernetes/kubetail/tailer.go +++ b/internal/component/loki/source/kubernetes/kubetail/tailer.go @@ -10,9 +10,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/runner" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/runner" "github.com/grafana/dskit/backoff" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" diff --git a/component/loki/source/kubernetes/kubetail/tailer_test.go b/internal/component/loki/source/kubernetes/kubetail/tailer_test.go similarity index 100% rename from component/loki/source/kubernetes/kubetail/tailer_test.go rename to internal/component/loki/source/kubernetes/kubetail/tailer_test.go diff --git a/component/loki/source/kubernetes/kubetail/target.go b/internal/component/loki/source/kubernetes/kubetail/target.go similarity index 100% rename from component/loki/source/kubernetes/kubetail/target.go rename to internal/component/loki/source/kubernetes/kubetail/target.go diff --git a/component/loki/source/kubernetes_events/event_controller.go b/internal/component/loki/source/kubernetes_events/event_controller.go similarity index 97% rename from component/loki/source/kubernetes_events/event_controller.go rename to internal/component/loki/source/kubernetes_events/event_controller.go index 0f45c3dc62..d3416178a7 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/runner" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/runner" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" corev1 "k8s.io/api/core/v1" diff --git a/component/loki/source/kubernetes_events/kubernetes_events.go b/internal/component/loki/source/kubernetes_events/kubernetes_events.go similarity index 94% rename from component/loki/source/kubernetes_events/kubernetes_events.go rename to internal/component/loki/source/kubernetes_events/kubernetes_events.go index e06247f05b..8c52be0507 100644 --- a/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/agent/component" - "github.com/grafana/agent/component/common/kubernetes" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/kubernetes" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/runner" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/runner" "github.com/oklog/run" "k8s.io/client-go/rest" ) diff --git a/component/loki/source/podlogs/controller.go b/internal/component/loki/source/podlogs/controller.go similarity index 96% rename from component/loki/source/podlogs/controller.go rename to internal/component/loki/source/podlogs/controller.go index 5aa86d0391..bf71b40c8f 100644 --- a/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" - monitoringv1alpha2 "github.com/grafana/agent/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2" - "github.com/grafana/agent/pkg/flow/logging/level" + monitoringv1alpha2 "github.com/grafana/agent/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2" + "github.com/grafana/agent/internal/flow/logging/level" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" diff --git a/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go similarity index 100% rename from component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go rename to internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/doc.go diff --git a/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/group.go b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/group.go similarity index 100% rename from component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/group.go rename to internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/group.go diff --git a/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go similarity index 100% rename from component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go rename to internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/types.go diff --git a/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/zz_generated.deepcopy.go b/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/zz_generated.deepcopy.go similarity index 100% rename from component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/zz_generated.deepcopy.go rename to internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2/zz_generated.deepcopy.go diff --git a/component/loki/source/podlogs/podlogs.go b/internal/component/loki/source/podlogs/podlogs.go similarity index 93% rename from component/loki/source/podlogs/podlogs.go rename to internal/component/loki/source/podlogs/podlogs.go index 39f0d1b755..c7f28202d1 100644 --- a/component/loki/source/podlogs/podlogs.go +++ b/internal/component/loki/source/podlogs/podlogs.go @@ -10,16 +10,16 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - commonk8s "github.com/grafana/agent/component/common/kubernetes" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/positions" - "github.com/grafana/agent/component/loki/source/kubernetes" - "github.com/grafana/agent/component/loki/source/kubernetes/kubetail" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + commonk8s "github.com/grafana/agent/internal/component/common/kubernetes" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/positions" + "github.com/grafana/agent/internal/component/loki/source/kubernetes" + "github.com/grafana/agent/internal/component/loki/source/kubernetes/kubetail" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" "github.com/oklog/run" kubeclient "k8s.io/client-go/kubernetes" "k8s.io/client-go/rest" diff --git a/component/loki/source/podlogs/podlogs_test.go b/internal/component/loki/source/podlogs/podlogs_test.go similarity index 100% rename from component/loki/source/podlogs/podlogs_test.go rename to internal/component/loki/source/podlogs/podlogs_test.go diff --git a/component/loki/source/podlogs/reconciler.go b/internal/component/loki/source/podlogs/reconciler.go similarity index 97% rename from component/loki/source/podlogs/reconciler.go rename to internal/component/loki/source/podlogs/reconciler.go index 66baba5e86..0ece93eec1 100644 --- a/component/loki/source/podlogs/reconciler.go +++ b/internal/component/loki/source/podlogs/reconciler.go @@ -9,10 +9,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component/loki/source/kubernetes/kubetail" - monitoringv1alpha2 "github.com/grafana/agent/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/component/loki/source/kubernetes/kubetail" + monitoringv1alpha2 "github.com/grafana/agent/internal/component/loki/source/podlogs/internal/apis/monitoring/v1alpha2" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" "github.com/grafana/ckit/shard" "github.com/prometheus/common/model" promlabels "github.com/prometheus/prometheus/model/labels" diff --git a/component/loki/source/podlogs/relabel.go b/internal/component/loki/source/podlogs/relabel.go similarity index 100% rename from component/loki/source/podlogs/relabel.go rename to internal/component/loki/source/podlogs/relabel.go diff --git a/component/loki/source/syslog/internal/syslogtarget/metrics.go b/internal/component/loki/source/syslog/internal/syslogtarget/metrics.go similarity index 100% rename from component/loki/source/syslog/internal/syslogtarget/metrics.go rename to internal/component/loki/source/syslog/internal/syslogtarget/metrics.go diff --git a/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go b/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go similarity index 98% rename from component/loki/source/syslog/internal/syslogtarget/syslogtarget.go rename to internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go index 5e50f548a8..087b59796a 100644 --- a/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go +++ b/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget.go @@ -12,14 +12,14 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/influxdata/go-syslog/v3" "github.com/influxdata/go-syslog/v3/rfc5424" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/relabel" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/clients/pkg/promtail/targets/target" diff --git a/component/loki/source/syslog/internal/syslogtarget/syslogtarget_test.go b/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget_test.go similarity index 99% rename from component/loki/source/syslog/internal/syslogtarget/syslogtarget_test.go rename to internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget_test.go index 64eda40836..5754fb9693 100644 --- a/component/loki/source/syslog/internal/syslogtarget/syslogtarget_test.go +++ b/internal/component/loki/source/syslog/internal/syslogtarget/syslogtarget_test.go @@ -15,7 +15,7 @@ import ( "time" "unicode/utf8" - "github.com/grafana/agent/component/common/loki/client/fake" + "github.com/grafana/agent/internal/component/common/loki/client/fake" "github.com/go-kit/log" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" diff --git a/component/loki/source/syslog/internal/syslogtarget/transport.go b/internal/component/loki/source/syslog/internal/syslogtarget/transport.go similarity index 99% rename from component/loki/source/syslog/internal/syslogtarget/transport.go rename to internal/component/loki/source/syslog/internal/syslogtarget/transport.go index 3348f27b15..d7360ecef4 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/influxdata/go-syslog/v3" "github.com/prometheus/common/config" "github.com/prometheus/prometheus/model/labels" diff --git a/component/loki/source/syslog/syslog.go b/internal/component/loki/source/syslog/syslog.go similarity index 92% rename from component/loki/source/syslog/syslog.go rename to internal/component/loki/source/syslog/syslog.go index 3920fbca43..f207c68dde 100644 --- a/component/loki/source/syslog/syslog.go +++ b/internal/component/loki/source/syslog/syslog.go @@ -5,12 +5,12 @@ import ( "reflect" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - st "github.com/grafana/agent/component/loki/source/syslog/internal/syslogtarget" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + st "github.com/grafana/agent/internal/component/loki/source/syslog/internal/syslogtarget" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/prometheus/model/relabel" ) diff --git a/component/loki/source/syslog/syslog_test.go b/internal/component/loki/source/syslog/syslog_test.go similarity index 96% rename from component/loki/source/syslog/syslog_test.go rename to internal/component/loki/source/syslog/syslog_test.go index beec490dad..481cd5a5c2 100644 --- a/component/loki/source/syslog/syslog_test.go +++ b/internal/component/loki/source/syslog/syslog_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/util" "github.com/grafana/regexp" "github.com/phayes/freeport" "github.com/prometheus/client_golang/prometheus" diff --git a/component/loki/source/syslog/types.go b/internal/component/loki/source/syslog/types.go similarity index 93% rename from component/loki/source/syslog/types.go rename to internal/component/loki/source/syslog/types.go index d8b11a932c..461404f241 100644 --- a/component/loki/source/syslog/types.go +++ b/internal/component/loki/source/syslog/types.go @@ -4,8 +4,8 @@ import ( "fmt" "time" - "github.com/grafana/agent/component/common/config" - st "github.com/grafana/agent/component/loki/source/syslog/internal/syslogtarget" + "github.com/grafana/agent/internal/component/common/config" + st "github.com/grafana/agent/internal/component/loki/source/syslog/internal/syslogtarget" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/prometheus/common/model" ) diff --git a/component/loki/source/windowsevent/arguments.go b/internal/component/loki/source/windowsevent/arguments.go similarity index 96% rename from component/loki/source/windowsevent/arguments.go rename to internal/component/loki/source/windowsevent/arguments.go index 029b37fd7d..8c26ed1e1e 100644 --- a/component/loki/source/windowsevent/arguments.go +++ b/internal/component/loki/source/windowsevent/arguments.go @@ -7,7 +7,7 @@ package windowsevent import ( "time" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" ) // Arguments holds values which are used to configure the loki.source.windowsevent diff --git a/component/loki/source/windowsevent/bookmark.go b/internal/component/loki/source/windowsevent/bookmark.go similarity index 100% rename from component/loki/source/windowsevent/bookmark.go rename to internal/component/loki/source/windowsevent/bookmark.go diff --git a/component/loki/source/windowsevent/component_stub.go b/internal/component/loki/source/windowsevent/component_stub.go similarity index 89% rename from component/loki/source/windowsevent/component_stub.go rename to internal/component/loki/source/windowsevent/component_stub.go index 6fdafa1e57..bc7eba8ccb 100644 --- a/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/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/loki/source/windowsevent/component_test.go b/internal/component/loki/source/windowsevent/component_test.go similarity index 92% rename from component/loki/source/windowsevent/component_test.go rename to internal/component/loki/source/windowsevent/component_test.go index e1318ecf2b..49488e0313 100644 --- a/component/loki/source/windowsevent/component_test.go +++ b/internal/component/loki/source/windowsevent/component_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" diff --git a/component/loki/source/windowsevent/component_windows.go b/internal/component/loki/source/windowsevent/component_windows.go similarity index 95% rename from component/loki/source/windowsevent/component_windows.go rename to internal/component/loki/source/windowsevent/component_windows.go index f2cb299b59..58a4a62234 100644 --- a/component/loki/source/windowsevent/component_windows.go +++ b/internal/component/loki/source/windowsevent/component_windows.go @@ -6,9 +6,9 @@ import ( "path" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/utils" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/utils" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" diff --git a/component/loki/source/windowsevent/format.go b/internal/component/loki/source/windowsevent/format.go similarity index 100% rename from component/loki/source/windowsevent/format.go rename to internal/component/loki/source/windowsevent/format.go diff --git a/component/loki/source/windowsevent/target.go b/internal/component/loki/source/windowsevent/target.go similarity index 100% rename from component/loki/source/windowsevent/target.go rename to internal/component/loki/source/windowsevent/target.go diff --git a/component/loki/write/types.go b/internal/component/loki/write/types.go similarity index 95% rename from component/loki/write/types.go rename to internal/component/loki/write/types.go index dc240c675e..766f521d6b 100644 --- a/component/loki/write/types.go +++ b/internal/component/loki/write/types.go @@ -5,11 +5,11 @@ import ( "net/url" "time" - "github.com/grafana/agent/component/common/loki/client" - "github.com/grafana/agent/component/common/loki/utils" + "github.com/grafana/agent/internal/component/common/loki/client" + "github.com/grafana/agent/internal/component/common/loki/utils" "github.com/alecthomas/units" - types "github.com/grafana/agent/component/common/config" + types "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/flagext" lokiflagext "github.com/grafana/loki/pkg/util/flagext" diff --git a/component/loki/write/write.go b/internal/component/loki/write/write.go similarity index 95% rename from component/loki/write/write.go rename to internal/component/loki/write/write.go index e2c035ac51..1d057bafc8 100644 --- a/component/loki/write/write.go +++ b/internal/component/loki/write/write.go @@ -7,12 +7,12 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/client" - "github.com/grafana/agent/component/common/loki/limit" - "github.com/grafana/agent/component/common/loki/wal" "github.com/grafana/agent/internal/agentseed" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/client" + "github.com/grafana/agent/internal/component/common/loki/limit" + "github.com/grafana/agent/internal/component/common/loki/wal" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/loki/write/write_test.go b/internal/component/loki/write/write_test.go similarity index 97% rename from component/loki/write/write_test.go rename to internal/component/loki/write/write_test.go index 87e09a5a35..f0a797ead8 100644 --- a/component/loki/write/write_test.go +++ b/internal/component/loki/write/write_test.go @@ -10,12 +10,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/loki/wal" - "github.com/grafana/agent/component/discovery" - lsf "github.com/grafana/agent/component/loki/source/file" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki/wal" + "github.com/grafana/agent/internal/component/discovery" + lsf "github.com/grafana/agent/internal/component/loki/source/file" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/prometheus/common/model" "github.com/stretchr/testify/require" diff --git a/component/metadata/metadata.go b/internal/component/metadata/metadata.go similarity index 93% rename from component/metadata/metadata.go rename to internal/component/metadata/metadata.go index 8ff2587ae8..b566bd9139 100644 --- a/component/metadata/metadata.go +++ b/internal/component/metadata/metadata.go @@ -4,12 +4,12 @@ import ( "fmt" "reflect" - "github.com/grafana/agent/component" - _ "github.com/grafana/agent/component/all" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/pyroscope" + "github.com/grafana/agent/internal/component" + _ "github.com/grafana/agent/internal/component/all" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/pyroscope" "github.com/prometheus/prometheus/storage" ) diff --git a/component/metadata/metadata_test.go b/internal/component/metadata/metadata_test.go similarity index 100% rename from component/metadata/metadata_test.go rename to internal/component/metadata/metadata_test.go diff --git a/component/mimir/rules/kubernetes/debug.go b/internal/component/mimir/rules/kubernetes/debug.go similarity index 100% rename from component/mimir/rules/kubernetes/debug.go rename to internal/component/mimir/rules/kubernetes/debug.go diff --git a/component/mimir/rules/kubernetes/diff.go b/internal/component/mimir/rules/kubernetes/diff.go similarity index 100% rename from component/mimir/rules/kubernetes/diff.go rename to internal/component/mimir/rules/kubernetes/diff.go diff --git a/component/mimir/rules/kubernetes/diff_test.go b/internal/component/mimir/rules/kubernetes/diff_test.go similarity index 100% rename from component/mimir/rules/kubernetes/diff_test.go rename to internal/component/mimir/rules/kubernetes/diff_test.go diff --git a/component/mimir/rules/kubernetes/events.go b/internal/component/mimir/rules/kubernetes/events.go similarity index 99% rename from component/mimir/rules/kubernetes/events.go rename to internal/component/mimir/rules/kubernetes/events.go index 02e8cf2c03..ed3ace0523 100644 --- a/component/mimir/rules/kubernetes/events.go +++ b/internal/component/mimir/rules/kubernetes/events.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/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/component/mimir/rules/kubernetes/events_test.go b/internal/component/mimir/rules/kubernetes/events_test.go similarity index 98% rename from component/mimir/rules/kubernetes/events_test.go rename to internal/component/mimir/rules/kubernetes/events_test.go index bf89c64911..621f3383ef 100644 --- a/component/mimir/rules/kubernetes/events_test.go +++ b/internal/component/mimir/rules/kubernetes/events_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - mimirClient "github.com/grafana/agent/pkg/mimir/client" + mimirClient "github.com/grafana/agent/internal/mimir/client" v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" promListers "github.com/prometheus-operator/prometheus-operator/pkg/client/listers/monitoring/v1" "github.com/prometheus/prometheus/model/rulefmt" diff --git a/component/mimir/rules/kubernetes/health.go b/internal/component/mimir/rules/kubernetes/health.go similarity index 92% rename from component/mimir/rules/kubernetes/health.go rename to internal/component/mimir/rules/kubernetes/health.go index b48ffb4a54..101bfd1d0a 100644 --- a/component/mimir/rules/kubernetes/health.go +++ b/internal/component/mimir/rules/kubernetes/health.go @@ -3,7 +3,7 @@ package rules import ( "time" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" ) func (c *Component) reportUnhealthy(err error) { diff --git a/component/mimir/rules/kubernetes/rules.go b/internal/component/mimir/rules/kubernetes/rules.go similarity index 98% rename from component/mimir/rules/kubernetes/rules.go rename to internal/component/mimir/rules/kubernetes/rules.go index af75040168..db75be3dee 100644 --- a/component/mimir/rules/kubernetes/rules.go +++ b/internal/component/mimir/rules/kubernetes/rules.go @@ -7,10 +7,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - mimirClient "github.com/grafana/agent/pkg/mimir/client" + "github.com/grafana/agent/internal/flow/logging/level" + mimirClient "github.com/grafana/agent/internal/mimir/client" "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/component/mimir/rules/kubernetes/rules_test.go b/internal/component/mimir/rules/kubernetes/rules_test.go similarity index 100% rename from component/mimir/rules/kubernetes/rules_test.go rename to internal/component/mimir/rules/kubernetes/rules_test.go diff --git a/component/mimir/rules/kubernetes/types.go b/internal/component/mimir/rules/kubernetes/types.go similarity index 96% rename from component/mimir/rules/kubernetes/types.go rename to internal/component/mimir/rules/kubernetes/types.go index 390a4f6a41..d59265f9c6 100644 --- a/component/mimir/rules/kubernetes/types.go +++ b/internal/component/mimir/rules/kubernetes/types.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component/common/config" ) type Arguments struct { diff --git a/component/module/file/file.go b/internal/component/module/file/file.go similarity index 96% rename from component/module/file/file.go rename to internal/component/module/file/file.go index 886432a26c..7c0ec3dd11 100644 --- a/component/module/file/file.go +++ b/internal/component/module/file/file.go @@ -6,9 +6,9 @@ import ( "go.uber.org/atomic" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/local/file" - "github.com/grafana/agent/component/module" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/local/file" + "github.com/grafana/agent/internal/component/module" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" ) diff --git a/component/module/git/git.go b/internal/component/module/git/git.go similarity index 97% rename from component/module/git/git.go rename to internal/component/module/git/git.go index 83ac2d68eb..b1a363b4da 100644 --- a/component/module/git/git.go +++ b/internal/component/module/git/git.go @@ -10,11 +10,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/module" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/module" "github.com/grafana/agent/internal/featuregate" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/vcs" - "github.com/grafana/agent/pkg/flow/logging/level" ) func init() { diff --git a/component/module/http/http.go b/internal/component/module/http/http.go similarity index 96% rename from component/module/http/http.go rename to internal/component/module/http/http.go index 21c3f46b25..af33860f60 100644 --- a/component/module/http/http.go +++ b/internal/component/module/http/http.go @@ -6,9 +6,9 @@ import ( "go.uber.org/atomic" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/module" - remote_http "github.com/grafana/agent/component/remote/http" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/module" + remote_http "github.com/grafana/agent/internal/component/remote/http" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" ) diff --git a/component/module/module.go b/internal/component/module/module.go similarity index 96% rename from component/module/module.go rename to internal/component/module/module.go index 7995fdbca5..1357d7c026 100644 --- a/component/module/module.go +++ b/internal/component/module/module.go @@ -7,8 +7,8 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/logging/level" ) // ModuleComponent holds the common properties for module components. diff --git a/component/module/string/string.go b/internal/component/module/string/string.go similarity index 94% rename from component/module/string/string.go rename to internal/component/module/string/string.go index dda4bc69ff..e631c2646b 100644 --- a/component/module/string/string.go +++ b/internal/component/module/string/string.go @@ -3,8 +3,8 @@ package string import ( "context" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/module" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/module" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" ) diff --git a/component/otelcol/auth/auth.go b/internal/component/otelcol/auth/auth.go similarity index 94% rename from component/otelcol/auth/auth.go rename to internal/component/otelcol/auth/auth.go index 269c34e6d3..f824a92acd 100644 --- a/component/otelcol/auth/auth.go +++ b/internal/component/otelcol/auth/auth.go @@ -9,11 +9,11 @@ import ( "context" "os" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol/internal/lazycollector" - "github.com/grafana/agent/component/otelcol/internal/scheduler" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol/internal/lazycollector" + "github.com/grafana/agent/internal/component/otelcol/internal/scheduler" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/grafana/river" "github.com/prometheus/client_golang/prometheus" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/auth/auth_test.go b/internal/component/otelcol/auth/auth_test.go similarity index 89% rename from component/otelcol/auth/auth_test.go rename to internal/component/otelcol/auth/auth_test.go index 535b838151..9bc8af90fe 100644 --- a/component/otelcol/auth/auth_test.go +++ b/internal/component/otelcol/auth/auth_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/auth" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/auth" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/auth/basic/basic.go b/internal/component/otelcol/auth/basic/basic.go similarity index 94% rename from component/otelcol/auth/basic/basic.go rename to internal/component/otelcol/auth/basic/basic.go index 9cbe06a24e..6cdc41bca8 100644 --- a/component/otelcol/auth/basic/basic.go +++ b/internal/component/otelcol/auth/basic/basic.go @@ -2,8 +2,8 @@ package basic import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol/auth" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol/auth" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/basicauthextension" diff --git a/component/otelcol/auth/basic/basic_test.go b/internal/component/otelcol/auth/basic/basic_test.go similarity index 91% rename from component/otelcol/auth/basic/basic_test.go rename to internal/component/otelcol/auth/basic/basic_test.go index 9d4ecbe8d4..3754210db4 100644 --- a/component/otelcol/auth/basic/basic_test.go +++ b/internal/component/otelcol/auth/basic/basic_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/auth" - "github.com/grafana/agent/component/otelcol/auth/basic" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/auth/basic" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/component/otelcol/auth/bearer/bearer.go b/internal/component/otelcol/auth/bearer/bearer.go similarity index 94% rename from component/otelcol/auth/bearer/bearer.go rename to internal/component/otelcol/auth/bearer/bearer.go index b5452f6bfb..865c17f2d9 100644 --- a/component/otelcol/auth/bearer/bearer.go +++ b/internal/component/otelcol/auth/bearer/bearer.go @@ -2,8 +2,8 @@ package bearer import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol/auth" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol/auth" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/bearertokenauthextension" diff --git a/component/otelcol/auth/bearer/bearer_test.go b/internal/component/otelcol/auth/bearer/bearer_test.go similarity index 93% rename from component/otelcol/auth/bearer/bearer_test.go rename to internal/component/otelcol/auth/bearer/bearer_test.go index 9f24fe05fb..e40a9a7398 100644 --- a/component/otelcol/auth/bearer/bearer_test.go +++ b/internal/component/otelcol/auth/bearer/bearer_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/auth" - "github.com/grafana/agent/component/otelcol/auth/bearer" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/auth/bearer" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/component/otelcol/auth/headers/headers.go b/internal/component/otelcol/auth/headers/headers.go similarity index 97% rename from component/otelcol/auth/headers/headers.go rename to internal/component/otelcol/auth/headers/headers.go index 3d536bc7c0..bf5883690d 100644 --- a/component/otelcol/auth/headers/headers.go +++ b/internal/component/otelcol/auth/headers/headers.go @@ -6,8 +6,8 @@ import ( "fmt" "strings" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol/auth" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol/auth" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river" "github.com/grafana/river/rivertypes" diff --git a/component/otelcol/auth/headers/headers_test.go b/internal/component/otelcol/auth/headers/headers_test.go similarity index 95% rename from component/otelcol/auth/headers/headers_test.go rename to internal/component/otelcol/auth/headers/headers_test.go index c29ec681e0..8796dfe3a2 100644 --- a/component/otelcol/auth/headers/headers_test.go +++ b/internal/component/otelcol/auth/headers/headers_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/auth" - "github.com/grafana/agent/component/otelcol/auth/headers" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/auth/headers" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/headerssetterextension" "github.com/stretchr/testify/assert" diff --git a/component/otelcol/auth/oauth2/oauth2.go b/internal/component/otelcol/auth/oauth2/oauth2.go similarity index 93% rename from component/otelcol/auth/oauth2/oauth2.go rename to internal/component/otelcol/auth/oauth2/oauth2.go index e37136b1e0..95f88c5072 100644 --- a/component/otelcol/auth/oauth2/oauth2.go +++ b/internal/component/otelcol/auth/oauth2/oauth2.go @@ -4,9 +4,9 @@ import ( "net/url" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/auth" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/auth" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/oauth2clientauthextension" diff --git a/component/otelcol/auth/oauth2/oauth2_test.go b/internal/component/otelcol/auth/oauth2/oauth2_test.go similarity index 95% rename from component/otelcol/auth/oauth2/oauth2_test.go rename to internal/component/otelcol/auth/oauth2/oauth2_test.go index b8f67a0c1d..ed704ed3c6 100644 --- a/component/otelcol/auth/oauth2/oauth2_test.go +++ b/internal/component/otelcol/auth/oauth2/oauth2_test.go @@ -8,10 +8,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/auth" - "github.com/grafana/agent/component/otelcol/auth/oauth2" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/auth/oauth2" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/stretchr/testify/require" extauth "go.opentelemetry.io/collector/extension/auth" diff --git a/component/otelcol/auth/sigv4/sigv4.go b/internal/component/otelcol/auth/sigv4/sigv4.go similarity index 95% rename from component/otelcol/auth/sigv4/sigv4.go rename to internal/component/otelcol/auth/sigv4/sigv4.go index a9289fe9b4..431b059aa6 100644 --- a/component/otelcol/auth/sigv4/sigv4.go +++ b/internal/component/otelcol/auth/sigv4/sigv4.go @@ -1,8 +1,8 @@ package sigv4 import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol/auth" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol/auth" "github.com/grafana/agent/internal/featuregate" "github.com/open-telemetry/opentelemetry-collector-contrib/extension/sigv4authextension" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/auth/sigv4/sigv4_test.go b/internal/component/otelcol/auth/sigv4/sigv4_test.go similarity index 96% rename from component/otelcol/auth/sigv4/sigv4_test.go rename to internal/component/otelcol/auth/sigv4/sigv4_test.go index 727cefb63f..401ce0f63f 100644 --- a/component/otelcol/auth/sigv4/sigv4_test.go +++ b/internal/component/otelcol/auth/sigv4/sigv4_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/auth" - "github.com/grafana/agent/component/otelcol/auth/sigv4" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/auth/sigv4" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/component/otelcol/config_attraction.go b/internal/component/otelcol/config_attraction.go similarity index 100% rename from component/otelcol/config_attraction.go rename to internal/component/otelcol/config_attraction.go diff --git a/component/otelcol/config_attraction_test.go b/internal/component/otelcol/config_attraction_test.go similarity index 95% rename from component/otelcol/config_attraction_test.go rename to internal/component/otelcol/config_attraction_test.go index 4c1d617420..54d740b8b7 100644 --- a/component/otelcol/config_attraction_test.go +++ b/internal/component/otelcol/config_attraction_test.go @@ -3,7 +3,7 @@ package otelcol_test import ( "testing" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" "github.com/stretchr/testify/require" ) diff --git a/component/otelcol/config_compression.go b/internal/component/otelcol/config_compression.go similarity index 100% rename from component/otelcol/config_compression.go rename to internal/component/otelcol/config_compression.go diff --git a/component/otelcol/config_debug_metrics.go b/internal/component/otelcol/config_debug_metrics.go similarity index 100% rename from component/otelcol/config_debug_metrics.go rename to internal/component/otelcol/config_debug_metrics.go diff --git a/component/otelcol/config_filter.go b/internal/component/otelcol/config_filter.go similarity index 100% rename from component/otelcol/config_filter.go rename to internal/component/otelcol/config_filter.go diff --git a/component/otelcol/config_filter_test.go b/internal/component/otelcol/config_filter_test.go similarity index 99% rename from component/otelcol/config_filter_test.go rename to internal/component/otelcol/config_filter_test.go index 39a1fae4c9..918fe96cbd 100644 --- a/component/otelcol/config_filter_test.go +++ b/internal/component/otelcol/config_filter_test.go @@ -5,7 +5,7 @@ import ( "k8s.io/utils/ptr" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" "github.com/grafana/river" "github.com/stretchr/testify/require" diff --git a/component/otelcol/config_grpc.go b/internal/component/otelcol/config_grpc.go similarity index 99% rename from component/otelcol/config_grpc.go rename to internal/component/otelcol/config_grpc.go index 1badf98384..36c5279f18 100644 --- a/component/otelcol/config_grpc.go +++ b/internal/component/otelcol/config_grpc.go @@ -4,7 +4,7 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/auth" otelcomponent "go.opentelemetry.io/collector/component" otelconfigauth "go.opentelemetry.io/collector/config/configauth" otelconfiggrpc "go.opentelemetry.io/collector/config/configgrpc" diff --git a/component/otelcol/config_http.go b/internal/component/otelcol/config_http.go similarity index 98% rename from component/otelcol/config_http.go rename to internal/component/otelcol/config_http.go index 856b237203..f94da5cd84 100644 --- a/component/otelcol/config_http.go +++ b/internal/component/otelcol/config_http.go @@ -4,7 +4,7 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/auth" otelcomponent "go.opentelemetry.io/collector/component" otelconfigauth "go.opentelemetry.io/collector/config/configauth" otelconfighttp "go.opentelemetry.io/collector/config/confighttp" diff --git a/component/otelcol/config_k8s.go b/internal/component/otelcol/config_k8s.go similarity index 100% rename from component/otelcol/config_k8s.go rename to internal/component/otelcol/config_k8s.go diff --git a/component/otelcol/config_queue.go b/internal/component/otelcol/config_queue.go similarity index 100% rename from component/otelcol/config_queue.go rename to internal/component/otelcol/config_queue.go diff --git a/component/otelcol/config_retry.go b/internal/component/otelcol/config_retry.go similarity index 100% rename from component/otelcol/config_retry.go rename to internal/component/otelcol/config_retry.go diff --git a/component/otelcol/config_scrape.go b/internal/component/otelcol/config_scrape.go similarity index 100% rename from component/otelcol/config_scrape.go rename to internal/component/otelcol/config_scrape.go diff --git a/component/otelcol/config_timeout.go b/internal/component/otelcol/config_timeout.go similarity index 100% rename from component/otelcol/config_timeout.go rename to internal/component/otelcol/config_timeout.go diff --git a/component/otelcol/config_tls.go b/internal/component/otelcol/config_tls.go similarity index 100% rename from component/otelcol/config_tls.go rename to internal/component/otelcol/config_tls.go diff --git a/component/otelcol/connector/connector.go b/internal/component/otelcol/connector/connector.go similarity index 91% rename from component/otelcol/connector/connector.go rename to internal/component/otelcol/connector/connector.go index 0ae647e184..546465641a 100644 --- a/component/otelcol/connector/connector.go +++ b/internal/component/otelcol/connector/connector.go @@ -7,14 +7,14 @@ import ( "errors" "os" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fanoutconsumer" - "github.com/grafana/agent/component/otelcol/internal/lazycollector" - "github.com/grafana/agent/component/otelcol/internal/lazyconsumer" - "github.com/grafana/agent/component/otelcol/internal/scheduler" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fanoutconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/lazycollector" + "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/scheduler" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/prometheus/client_golang/prometheus" otelcomponent "go.opentelemetry.io/collector/component" otelconnector "go.opentelemetry.io/collector/connector" diff --git a/component/otelcol/connector/host_info/config.go b/internal/component/otelcol/connector/host_info/config.go similarity index 100% rename from component/otelcol/connector/host_info/config.go rename to internal/component/otelcol/connector/host_info/config.go diff --git a/component/otelcol/connector/host_info/config_test.go b/internal/component/otelcol/connector/host_info/config_test.go similarity index 100% rename from component/otelcol/connector/host_info/config_test.go rename to internal/component/otelcol/connector/host_info/config_test.go diff --git a/component/otelcol/connector/host_info/connector.go b/internal/component/otelcol/connector/host_info/connector.go similarity index 100% rename from component/otelcol/connector/host_info/connector.go rename to internal/component/otelcol/connector/host_info/connector.go diff --git a/component/otelcol/connector/host_info/connector_test.go b/internal/component/otelcol/connector/host_info/connector_test.go similarity index 100% rename from component/otelcol/connector/host_info/connector_test.go rename to internal/component/otelcol/connector/host_info/connector_test.go diff --git a/component/otelcol/connector/host_info/factory.go b/internal/component/otelcol/connector/host_info/factory.go similarity index 100% rename from component/otelcol/connector/host_info/factory.go rename to internal/component/otelcol/connector/host_info/factory.go diff --git a/component/otelcol/connector/host_info/factory_test.go b/internal/component/otelcol/connector/host_info/factory_test.go similarity index 100% rename from component/otelcol/connector/host_info/factory_test.go rename to internal/component/otelcol/connector/host_info/factory_test.go diff --git a/component/otelcol/connector/host_info/host_info.go b/internal/component/otelcol/connector/host_info/host_info.go similarity index 94% rename from component/otelcol/connector/host_info/host_info.go rename to internal/component/otelcol/connector/host_info/host_info.go index d20d0e30dc..9fbb4dcee6 100644 --- a/component/otelcol/connector/host_info/host_info.go +++ b/internal/component/otelcol/connector/host_info/host_info.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/connector" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/connector" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/connector/host_info/host_info_test.go b/internal/component/otelcol/connector/host_info/host_info_test.go similarity index 100% rename from component/otelcol/connector/host_info/host_info_test.go rename to internal/component/otelcol/connector/host_info/host_info_test.go diff --git a/component/otelcol/connector/host_info/host_metrics.go b/internal/component/otelcol/connector/host_info/host_metrics.go similarity index 100% rename from component/otelcol/connector/host_info/host_metrics.go rename to internal/component/otelcol/connector/host_info/host_metrics.go diff --git a/component/otelcol/connector/host_info/host_metrics_test.go b/internal/component/otelcol/connector/host_info/host_metrics_test.go similarity index 100% rename from component/otelcol/connector/host_info/host_metrics_test.go rename to internal/component/otelcol/connector/host_info/host_metrics_test.go diff --git a/component/otelcol/connector/servicegraph/servicegraph.go b/internal/component/otelcol/connector/servicegraph/servicegraph.go similarity index 97% rename from component/otelcol/connector/servicegraph/servicegraph.go rename to internal/component/otelcol/connector/servicegraph/servicegraph.go index f7365f480f..a637a94a73 100644 --- a/component/otelcol/connector/servicegraph/servicegraph.go +++ b/internal/component/otelcol/connector/servicegraph/servicegraph.go @@ -4,9 +4,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/connector" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/connector" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/servicegraphconnector" diff --git a/component/otelcol/connector/servicegraph/servicegraph_test.go b/internal/component/otelcol/connector/servicegraph/servicegraph_test.go similarity index 97% rename from component/otelcol/connector/servicegraph/servicegraph_test.go rename to internal/component/otelcol/connector/servicegraph/servicegraph_test.go index 952ac8fc06..f437c5ce45 100644 --- a/component/otelcol/connector/servicegraph/servicegraph_test.go +++ b/internal/component/otelcol/connector/servicegraph/servicegraph_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/connector/servicegraph" + "github.com/grafana/agent/internal/component/otelcol/connector/servicegraph" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/servicegraphprocessor" "github.com/stretchr/testify/require" diff --git a/component/otelcol/connector/spanlogs/consumer.go b/internal/component/otelcol/connector/spanlogs/consumer.go similarity index 100% rename from component/otelcol/connector/spanlogs/consumer.go rename to internal/component/otelcol/connector/spanlogs/consumer.go diff --git a/component/otelcol/connector/spanlogs/spanlogs.go b/internal/component/otelcol/connector/spanlogs/spanlogs.go similarity index 91% rename from component/otelcol/connector/spanlogs/spanlogs.go rename to internal/component/otelcol/connector/spanlogs/spanlogs.go index 92d14817f6..a72a36eb2e 100644 --- a/component/otelcol/connector/spanlogs/spanlogs.go +++ b/internal/component/otelcol/connector/spanlogs/spanlogs.go @@ -5,12 +5,12 @@ import ( "context" "fmt" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fanoutconsumer" - "github.com/grafana/agent/component/otelcol/internal/lazyconsumer" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fanoutconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/river" ) diff --git a/component/otelcol/connector/spanlogs/spanlogs_test.go b/internal/component/otelcol/connector/spanlogs/spanlogs_test.go similarity index 98% rename from component/otelcol/connector/spanlogs/spanlogs_test.go rename to internal/component/otelcol/connector/spanlogs/spanlogs_test.go index 2bf910a400..8caf182d8b 100644 --- a/component/otelcol/connector/spanlogs/spanlogs_test.go +++ b/internal/component/otelcol/connector/spanlogs/spanlogs_test.go @@ -4,11 +4,11 @@ import ( "context" "testing" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/connector/spanlogs" - "github.com/grafana/agent/component/otelcol/processor/processortest" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/connector/spanlogs" + "github.com/grafana/agent/internal/component/otelcol/processor/processortest" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/otelcol/connector/spanmetrics/spanmetrics.go b/internal/component/otelcol/connector/spanmetrics/spanmetrics.go similarity index 97% rename from component/otelcol/connector/spanmetrics/spanmetrics.go rename to internal/component/otelcol/connector/spanmetrics/spanmetrics.go index f21cf193e3..237cba2229 100644 --- a/component/otelcol/connector/spanmetrics/spanmetrics.go +++ b/internal/component/otelcol/connector/spanmetrics/spanmetrics.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/connector" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/connector" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector" diff --git a/component/otelcol/connector/spanmetrics/spanmetrics_test.go b/internal/component/otelcol/connector/spanmetrics/spanmetrics_test.go similarity index 98% rename from component/otelcol/connector/spanmetrics/spanmetrics_test.go rename to internal/component/otelcol/connector/spanmetrics/spanmetrics_test.go index 7a3a3f8915..1672172f76 100644 --- a/component/otelcol/connector/spanmetrics/spanmetrics_test.go +++ b/internal/component/otelcol/connector/spanmetrics/spanmetrics_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/connector/spanmetrics" - "github.com/grafana/agent/component/otelcol/processor/processortest" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/connector/spanmetrics" + "github.com/grafana/agent/internal/component/otelcol/processor/processortest" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector" "github.com/stretchr/testify/require" diff --git a/component/otelcol/connector/spanmetrics/types.go b/internal/component/otelcol/connector/spanmetrics/types.go similarity index 100% rename from component/otelcol/connector/spanmetrics/types.go rename to internal/component/otelcol/connector/spanmetrics/types.go diff --git a/component/otelcol/consumer.go b/internal/component/otelcol/consumer.go similarity index 100% rename from component/otelcol/consumer.go rename to internal/component/otelcol/consumer.go diff --git a/component/otelcol/exporter/exporter.go b/internal/component/otelcol/exporter/exporter.go similarity index 93% rename from component/otelcol/exporter/exporter.go rename to internal/component/otelcol/exporter/exporter.go index 01893c7aa2..2524070aff 100644 --- a/component/otelcol/exporter/exporter.go +++ b/internal/component/otelcol/exporter/exporter.go @@ -7,14 +7,14 @@ import ( "errors" "os" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/lazycollector" - "github.com/grafana/agent/component/otelcol/internal/lazyconsumer" - "github.com/grafana/agent/component/otelcol/internal/scheduler" - "github.com/grafana/agent/component/otelcol/internal/views" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/lazycollector" + "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/scheduler" + "github.com/grafana/agent/internal/component/otelcol/internal/views" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/prometheus/client_golang/prometheus" otelcomponent "go.opentelemetry.io/collector/component" otelexporter "go.opentelemetry.io/collector/exporter" diff --git a/component/otelcol/exporter/exporter_test.go b/internal/component/otelcol/exporter/exporter_test.go similarity index 95% rename from component/otelcol/exporter/exporter_test.go rename to internal/component/otelcol/exporter/exporter_test.go index 7ef2924451..8c9489af71 100644 --- a/component/otelcol/exporter/exporter_test.go +++ b/internal/component/otelcol/exporter/exporter_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" otelconsumer "go.opentelemetry.io/collector/consumer" diff --git a/component/otelcol/exporter/loadbalancing/loadbalancing.go b/internal/component/otelcol/exporter/loadbalancing/loadbalancing.go similarity index 97% rename from component/otelcol/exporter/loadbalancing/loadbalancing.go rename to internal/component/otelcol/exporter/loadbalancing/loadbalancing.go index 9dddaa86b6..5bf2ac3337 100644 --- a/component/otelcol/exporter/loadbalancing/loadbalancing.go +++ b/internal/component/otelcol/exporter/loadbalancing/loadbalancing.go @@ -6,10 +6,10 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/auth" - "github.com/grafana/agent/component/otelcol/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/auth" + "github.com/grafana/agent/internal/component/otelcol/exporter" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" diff --git a/component/otelcol/exporter/loadbalancing/loadbalancing_test.go b/internal/component/otelcol/exporter/loadbalancing/loadbalancing_test.go similarity index 98% rename from component/otelcol/exporter/loadbalancing/loadbalancing_test.go rename to internal/component/otelcol/exporter/loadbalancing/loadbalancing_test.go index abc37bc170..445efff92b 100644 --- a/component/otelcol/exporter/loadbalancing/loadbalancing_test.go +++ b/internal/component/otelcol/exporter/loadbalancing/loadbalancing_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/loadbalancing" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/loadbalancing" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" "github.com/stretchr/testify/require" diff --git a/component/otelcol/exporter/logging/logging.go b/internal/component/otelcol/exporter/logging/logging.go similarity index 93% rename from component/otelcol/exporter/logging/logging.go rename to internal/component/otelcol/exporter/logging/logging.go index d33013af3d..71dac49faf 100644 --- a/component/otelcol/exporter/logging/logging.go +++ b/internal/component/otelcol/exporter/logging/logging.go @@ -2,9 +2,9 @@ package logging import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter" "github.com/grafana/agent/internal/featuregate" otelcomponent "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" diff --git a/component/otelcol/exporter/loki/internal/convert/convert.go b/internal/component/otelcol/exporter/loki/internal/convert/convert.go similarity index 96% rename from component/otelcol/exporter/loki/internal/convert/convert.go rename to internal/component/otelcol/exporter/loki/internal/convert/convert.go index 99d4e2b086..63446b8f3e 100644 --- a/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/agent/component/common/loki" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/flow/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/component/otelcol/exporter/loki/internal/convert/convert_test.go b/internal/component/otelcol/exporter/loki/internal/convert/convert_test.go similarity index 97% rename from component/otelcol/exporter/loki/internal/convert/convert_test.go rename to internal/component/otelcol/exporter/loki/internal/convert/convert_test.go index 4a63f7a3d5..016b8929fe 100644 --- a/component/otelcol/exporter/loki/internal/convert/convert_test.go +++ b/internal/component/otelcol/exporter/loki/internal/convert/convert_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/otelcol/exporter/loki/internal/convert" - "github.com/grafana/agent/component/otelcol/processor/processortest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/otelcol/exporter/loki/internal/convert" + "github.com/grafana/agent/internal/component/otelcol/processor/processortest" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/push" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/component/otelcol/exporter/loki/internal/convert/metrics.go b/internal/component/otelcol/exporter/loki/internal/convert/metrics.go similarity index 100% rename from component/otelcol/exporter/loki/internal/convert/metrics.go rename to internal/component/otelcol/exporter/loki/internal/convert/metrics.go diff --git a/component/otelcol/exporter/loki/loki.go b/internal/component/otelcol/exporter/loki/loki.go similarity index 84% rename from component/otelcol/exporter/loki/loki.go rename to internal/component/otelcol/exporter/loki/loki.go index 499cb1b53e..058173760c 100644 --- a/component/otelcol/exporter/loki/loki.go +++ b/internal/component/otelcol/exporter/loki/loki.go @@ -5,11 +5,11 @@ import ( "context" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/loki/internal/convert" - "github.com/grafana/agent/component/otelcol/internal/lazyconsumer" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/loki/internal/convert" + "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/otelcol/exporter/otlp/otlp.go b/internal/component/otelcol/exporter/otlp/otlp.go similarity index 95% rename from component/otelcol/exporter/otlp/otlp.go rename to internal/component/otelcol/exporter/otlp/otlp.go index 3ad918e0d5..b228e7bd68 100644 --- a/component/otelcol/exporter/otlp/otlp.go +++ b/internal/component/otelcol/exporter/otlp/otlp.go @@ -4,9 +4,9 @@ package otlp import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter" "github.com/grafana/agent/internal/featuregate" otelcomponent "go.opentelemetry.io/collector/component" otelpexporterhelper "go.opentelemetry.io/collector/exporter/exporterhelper" diff --git a/component/otelcol/exporter/otlp/otlp_test.go b/internal/component/otelcol/exporter/otlp/otlp_test.go similarity index 94% rename from component/otelcol/exporter/otlp/otlp_test.go rename to internal/component/otelcol/exporter/otlp/otlp_test.go index 13bd8e5688..86c531e2e0 100644 --- a/component/otelcol/exporter/otlp/otlp_test.go +++ b/internal/component/otelcol/exporter/otlp/otlp_test.go @@ -7,11 +7,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/otlp" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/otlp" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/river" "github.com/stretchr/testify/require" diff --git a/component/otelcol/exporter/otlphttp/otlphttp.go b/internal/component/otelcol/exporter/otlphttp/otlphttp.go similarity index 96% rename from component/otelcol/exporter/otlphttp/otlphttp.go rename to internal/component/otelcol/exporter/otlphttp/otlphttp.go index 787ab41fff..246d9df846 100644 --- a/component/otelcol/exporter/otlphttp/otlphttp.go +++ b/internal/component/otelcol/exporter/otlphttp/otlphttp.go @@ -5,9 +5,9 @@ import ( "errors" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter" "github.com/grafana/agent/internal/featuregate" otelcomponent "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter/otlphttpexporter" diff --git a/component/otelcol/exporter/otlphttp/otlphttp_test.go b/internal/component/otelcol/exporter/otlphttp/otlphttp_test.go similarity index 93% rename from component/otelcol/exporter/otlphttp/otlphttp_test.go rename to internal/component/otelcol/exporter/otlphttp/otlphttp_test.go index 6a2449db62..664bae4e46 100644 --- a/component/otelcol/exporter/otlphttp/otlphttp_test.go +++ b/internal/component/otelcol/exporter/otlphttp/otlphttp_test.go @@ -8,11 +8,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/otlphttp" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/otlphttp" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/river" "github.com/stretchr/testify/require" diff --git a/component/otelcol/exporter/prometheus/internal/convert/cache.go b/internal/component/otelcol/exporter/prometheus/internal/convert/cache.go similarity index 100% rename from component/otelcol/exporter/prometheus/internal/convert/cache.go rename to internal/component/otelcol/exporter/prometheus/internal/convert/cache.go diff --git a/component/otelcol/exporter/prometheus/internal/convert/convert.go b/internal/component/otelcol/exporter/prometheus/internal/convert/convert.go similarity index 99% rename from component/otelcol/exporter/prometheus/internal/convert/convert.go rename to internal/component/otelcol/exporter/prometheus/internal/convert/convert.go index fc0f2287de..a8f4d4a91c 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/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/component/otelcol/exporter/prometheus/internal/convert/convert_test.go b/internal/component/otelcol/exporter/prometheus/internal/convert/convert_test.go similarity index 99% rename from component/otelcol/exporter/prometheus/internal/convert/convert_test.go rename to internal/component/otelcol/exporter/prometheus/internal/convert/convert_test.go index 928e3fc2f8..37d001b9d5 100644 --- a/component/otelcol/exporter/prometheus/internal/convert/convert_test.go +++ b/internal/component/otelcol/exporter/prometheus/internal/convert/convert_test.go @@ -5,9 +5,9 @@ import ( "encoding/json" "testing" - "github.com/grafana/agent/component/otelcol/exporter/prometheus/internal/convert" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/pkg/util/testappender" + "github.com/grafana/agent/internal/component/otelcol/exporter/prometheus/internal/convert" + "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/internal/util/testappender" "github.com/prometheus/prometheus/storage" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/pmetric" diff --git a/component/otelcol/exporter/prometheus/internal/convert/histograms.go b/internal/component/otelcol/exporter/prometheus/internal/convert/histograms.go similarity index 100% rename from component/otelcol/exporter/prometheus/internal/convert/histograms.go rename to internal/component/otelcol/exporter/prometheus/internal/convert/histograms.go diff --git a/component/otelcol/exporter/prometheus/prometheus.go b/internal/component/otelcol/exporter/prometheus/prometheus.go similarity index 92% rename from component/otelcol/exporter/prometheus/prometheus.go rename to internal/component/otelcol/exporter/prometheus/prometheus.go index 6a529f5fe3..630f341af6 100644 --- a/component/otelcol/exporter/prometheus/prometheus.go +++ b/internal/component/otelcol/exporter/prometheus/prometheus.go @@ -8,13 +8,13 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/prometheus/internal/convert" - "github.com/grafana/agent/component/otelcol/internal/lazyconsumer" - "github.com/grafana/agent/component/prometheus" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/prometheus/internal/convert" + "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" + "github.com/grafana/agent/internal/component/prometheus" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/service/labelstore" "github.com/prometheus/prometheus/storage" ) diff --git a/component/otelcol/exporter/prometheus/prometheus_test.go b/internal/component/otelcol/exporter/prometheus/prometheus_test.go similarity index 96% rename from component/otelcol/exporter/prometheus/prometheus_test.go rename to internal/component/otelcol/exporter/prometheus/prometheus_test.go index 7e642ff9b5..430c6965d5 100644 --- a/component/otelcol/exporter/prometheus/prometheus_test.go +++ b/internal/component/otelcol/exporter/prometheus/prometheus_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/exporter/prometheus" + "github.com/grafana/agent/internal/component/otelcol/exporter/prometheus" "github.com/grafana/river" "github.com/prometheus/prometheus/storage" "github.com/stretchr/testify/require" diff --git a/component/otelcol/extension/extension.go b/internal/component/otelcol/extension/extension.go similarity index 93% rename from component/otelcol/extension/extension.go rename to internal/component/otelcol/extension/extension.go index be0b62705b..8bdafad806 100644 --- a/component/otelcol/extension/extension.go +++ b/internal/component/otelcol/extension/extension.go @@ -9,11 +9,11 @@ import ( "context" "os" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol/internal/lazycollector" - "github.com/grafana/agent/component/otelcol/internal/scheduler" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol/internal/lazycollector" + "github.com/grafana/agent/internal/component/otelcol/internal/scheduler" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/prometheus/client_golang/prometheus" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/extension/extension_test.go b/internal/component/otelcol/extension/extension_test.go similarity index 89% rename from component/otelcol/extension/extension_test.go rename to internal/component/otelcol/extension/extension_test.go index 19412b2cec..fb83244343 100644 --- a/component/otelcol/extension/extension_test.go +++ b/internal/component/otelcol/extension/extension_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/extension" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/extension" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/README.md b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/README.md similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/README.md rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/README.md diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/config_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension.go similarity index 95% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension.go index dacfa13157..84b8ca8a9f 100644 --- a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension.go +++ b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension.go @@ -24,8 +24,8 @@ import ( otelextension "go.opentelemetry.io/collector/extension" "go.uber.org/zap" - "github.com/grafana/agent/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal" - "github.com/grafana/agent/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store" + "github.com/grafana/agent/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal" + "github.com/grafana/agent/internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store" ) var _ otelextension.Extension = (*jrsExtension)(nil) diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/extension_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/factory_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/grpc_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/http_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/internal_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/internal_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/internal_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/internal_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_cache_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_store.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_store.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_store.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/internal/remote_strategy_store.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/config.yaml b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/config.yaml similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/config.yaml rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/config.yaml diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/strategy.json b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/strategy.json similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/strategy.json rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling/testdata/strategy.json diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/README.md b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/README.md similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/README.md rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/README.md diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/constants.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/constants.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/constants.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/constants.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store_test.go similarity index 100% rename from component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/internal/strategy_store/strategy_store_test.go diff --git a/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go b/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go similarity index 93% rename from component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go index e5e19a7289..c23477fc38 100644 --- a/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go +++ b/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling.go @@ -4,10 +4,10 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/extension" - "github.com/grafana/agent/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/extension" + "github.com/grafana/agent/internal/component/otelcol/extension/jaeger_remote_sampling/internal/jaegerremotesampling" "github.com/grafana/agent/internal/featuregate" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go b/internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go similarity index 96% rename from component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go rename to internal/component/otelcol/extension/jaeger_remote_sampling/jaeger_remote_sampling_test.go index d9aaf69a39..f9ff03ec27 100644 --- a/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,10 +10,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/extension/jaeger_remote_sampling" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/extension/jaeger_remote_sampling" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/phayes/freeport" "github.com/stretchr/testify/require" diff --git a/component/otelcol/internal/fakeconsumer/fake.go b/internal/component/otelcol/internal/fakeconsumer/fake.go similarity index 97% rename from component/otelcol/internal/fakeconsumer/fake.go rename to internal/component/otelcol/internal/fakeconsumer/fake.go index c962c3c2ff..e90f508e65 100644 --- a/component/otelcol/internal/fakeconsumer/fake.go +++ b/internal/component/otelcol/internal/fakeconsumer/fake.go @@ -3,7 +3,7 @@ package fakeconsumer import ( "context" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" otelconsumer "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog" "go.opentelemetry.io/collector/pdata/pmetric" diff --git a/component/otelcol/internal/fanoutconsumer/logs.go b/internal/component/otelcol/internal/fanoutconsumer/logs.go similarity index 97% rename from component/otelcol/internal/fanoutconsumer/logs.go rename to internal/component/otelcol/internal/fanoutconsumer/logs.go index a8ee4df45b..1b6dc18945 100644 --- a/component/otelcol/internal/fanoutconsumer/logs.go +++ b/internal/component/otelcol/internal/fanoutconsumer/logs.go @@ -9,7 +9,7 @@ package fanoutconsumer import ( "context" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" otelconsumer "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/plog" "go.uber.org/multierr" diff --git a/component/otelcol/internal/fanoutconsumer/metrics.go b/internal/component/otelcol/internal/fanoutconsumer/metrics.go similarity index 97% rename from component/otelcol/internal/fanoutconsumer/metrics.go rename to internal/component/otelcol/internal/fanoutconsumer/metrics.go index e3a1c47275..4ace8e35a4 100644 --- a/component/otelcol/internal/fanoutconsumer/metrics.go +++ b/internal/component/otelcol/internal/fanoutconsumer/metrics.go @@ -9,7 +9,7 @@ package fanoutconsumer import ( "context" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" otelconsumer "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/pmetric" "go.uber.org/multierr" diff --git a/component/otelcol/internal/fanoutconsumer/traces.go b/internal/component/otelcol/internal/fanoutconsumer/traces.go similarity index 97% rename from component/otelcol/internal/fanoutconsumer/traces.go rename to internal/component/otelcol/internal/fanoutconsumer/traces.go index 0da3e40ac3..51403b6a04 100644 --- a/component/otelcol/internal/fanoutconsumer/traces.go +++ b/internal/component/otelcol/internal/fanoutconsumer/traces.go @@ -9,7 +9,7 @@ package fanoutconsumer import ( "context" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" otelconsumer "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/ptrace" "go.uber.org/multierr" diff --git a/component/otelcol/internal/lazycollector/lazycollector.go b/internal/component/otelcol/internal/lazycollector/lazycollector.go similarity index 100% rename from component/otelcol/internal/lazycollector/lazycollector.go rename to internal/component/otelcol/internal/lazycollector/lazycollector.go diff --git a/component/otelcol/internal/lazyconsumer/lazyconsumer.go b/internal/component/otelcol/internal/lazyconsumer/lazyconsumer.go similarity index 100% rename from component/otelcol/internal/lazyconsumer/lazyconsumer.go rename to internal/component/otelcol/internal/lazyconsumer/lazyconsumer.go diff --git a/component/otelcol/internal/scheduler/host.go b/internal/component/otelcol/internal/scheduler/host.go similarity index 97% rename from component/otelcol/internal/scheduler/host.go rename to internal/component/otelcol/internal/scheduler/host.go index e1754b7f7f..34bf664c63 100644 --- a/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/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/internal/scheduler/scheduler.go b/internal/component/otelcol/internal/scheduler/scheduler.go similarity index 97% rename from component/otelcol/internal/scheduler/scheduler.go rename to internal/component/otelcol/internal/scheduler/scheduler.go index 30052fb446..5e553dd35a 100644 --- a/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/agent/component" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/logging/level" otelcomponent "go.opentelemetry.io/collector/component" "go.uber.org/multierr" ) diff --git a/component/otelcol/internal/scheduler/scheduler_test.go b/internal/component/otelcol/internal/scheduler/scheduler_test.go similarity index 95% rename from component/otelcol/internal/scheduler/scheduler_test.go rename to internal/component/otelcol/internal/scheduler/scheduler_test.go index ab45c599ec..3d3e0de56e 100644 --- a/component/otelcol/internal/scheduler/scheduler_test.go +++ b/internal/component/otelcol/internal/scheduler/scheduler_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/internal/scheduler" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/internal/scheduler" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" ) diff --git a/component/otelcol/internal/views/views.go b/internal/component/otelcol/internal/views/views.go similarity index 100% rename from component/otelcol/internal/views/views.go rename to internal/component/otelcol/internal/views/views.go diff --git a/component/otelcol/processor/attributes/attributes.go b/internal/component/otelcol/processor/attributes/attributes.go similarity index 94% rename from component/otelcol/processor/attributes/attributes.go rename to internal/component/otelcol/processor/attributes/attributes.go index 67055c5f25..fb7139c388 100644 --- a/component/otelcol/processor/attributes/attributes.go +++ b/internal/component/otelcol/processor/attributes/attributes.go @@ -4,9 +4,9 @@ package attributes import ( "fmt" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" diff --git a/component/otelcol/processor/attributes/attributes_test.go b/internal/component/otelcol/processor/attributes/attributes_test.go similarity index 99% rename from component/otelcol/processor/attributes/attributes_test.go rename to internal/component/otelcol/processor/attributes/attributes_test.go index 174c0aedbd..1e58776cd1 100644 --- a/component/otelcol/processor/attributes/attributes_test.go +++ b/internal/component/otelcol/processor/attributes/attributes_test.go @@ -6,11 +6,11 @@ import ( "net" "testing" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/attributes" - "github.com/grafana/agent/component/otelcol/processor/processortest" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/attributes" + "github.com/grafana/agent/internal/component/otelcol/processor/processortest" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/attributesprocessor" diff --git a/component/otelcol/processor/batch/batch.go b/internal/component/otelcol/processor/batch/batch.go similarity index 94% rename from component/otelcol/processor/batch/batch.go rename to internal/component/otelcol/processor/batch/batch.go index 0cb3d1c4aa..1d79cca1f0 100644 --- a/component/otelcol/processor/batch/batch.go +++ b/internal/component/otelcol/processor/batch/batch.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/processor/batch/batch_test.go b/internal/component/otelcol/processor/batch/batch_test.go similarity index 93% rename from component/otelcol/processor/batch/batch_test.go rename to internal/component/otelcol/processor/batch/batch_test.go index d411dbd68a..28e76085f5 100644 --- a/component/otelcol/processor/batch/batch_test.go +++ b/internal/component/otelcol/processor/batch/batch_test.go @@ -5,12 +5,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/component/otelcol/processor/batch" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/component/otelcol/processor/batch" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/river" "github.com/stretchr/testify/require" diff --git a/component/otelcol/processor/discovery/discovery.go b/internal/component/otelcol/processor/discovery/discovery.go similarity index 90% rename from component/otelcol/processor/discovery/discovery.go rename to internal/component/otelcol/processor/discovery/discovery.go index d5eb812491..08073fa58b 100644 --- a/component/otelcol/processor/discovery/discovery.go +++ b/internal/component/otelcol/processor/discovery/discovery.go @@ -6,14 +6,14 @@ import ( "fmt" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fanoutconsumer" - "github.com/grafana/agent/component/otelcol/internal/lazyconsumer" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fanoutconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - promsdconsumer "github.com/grafana/agent/pkg/traces/promsdprocessor/consumer" + "github.com/grafana/agent/internal/flow/logging/level" + promsdconsumer "github.com/grafana/agent/internal/static/traces/promsdprocessor/consumer" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/discovery/discovery_test.go b/internal/component/otelcol/processor/discovery/discovery_test.go similarity index 96% rename from component/otelcol/processor/discovery/discovery_test.go rename to internal/component/otelcol/processor/discovery/discovery_test.go index aa909a45db..5c7788d247 100644 --- a/component/otelcol/processor/discovery/discovery_test.go +++ b/internal/component/otelcol/processor/discovery/discovery_test.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" - "github.com/grafana/agent/component/otelcol/processor/discovery" - "github.com/grafana/agent/component/otelcol/processor/processortest" - "github.com/grafana/agent/pkg/flow/componenttest" - promsdconsumer "github.com/grafana/agent/pkg/traces/promsdprocessor/consumer" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/processor/discovery" + "github.com/grafana/agent/internal/component/otelcol/processor/processortest" + "github.com/grafana/agent/internal/flow/componenttest" + promsdconsumer "github.com/grafana/agent/internal/static/traces/promsdprocessor/consumer" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/stretchr/testify/require" semconv "go.opentelemetry.io/collector/semconv/v1.5.0" diff --git a/component/otelcol/processor/filter/filter.go b/internal/component/otelcol/processor/filter/filter.go similarity index 94% rename from component/otelcol/processor/filter/filter.go rename to internal/component/otelcol/processor/filter/filter.go index a50a5cc860..ef0915d364 100644 --- a/component/otelcol/processor/filter/filter.go +++ b/internal/component/otelcol/processor/filter/filter.go @@ -1,9 +1,9 @@ package filter import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" diff --git a/component/otelcol/processor/filter/filter_test.go b/internal/component/otelcol/processor/filter/filter_test.go similarity index 98% rename from component/otelcol/processor/filter/filter_test.go rename to internal/component/otelcol/processor/filter/filter_test.go index bf8adc2c2f..a86d2d3fcd 100644 --- a/component/otelcol/processor/filter/filter_test.go +++ b/internal/component/otelcol/processor/filter/filter_test.go @@ -3,7 +3,7 @@ package filter_test import ( "testing" - "github.com/grafana/agent/component/otelcol/processor/filter" + "github.com/grafana/agent/internal/component/otelcol/processor/filter" "github.com/grafana/river" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor" diff --git a/component/otelcol/processor/filter/types.go b/internal/component/otelcol/processor/filter/types.go similarity index 100% rename from component/otelcol/processor/filter/types.go rename to internal/component/otelcol/processor/filter/types.go diff --git a/component/otelcol/processor/k8sattributes/k8sattributes.go b/internal/component/otelcol/processor/k8sattributes/k8sattributes.go similarity index 94% rename from component/otelcol/processor/k8sattributes/k8sattributes.go rename to internal/component/otelcol/processor/k8sattributes/k8sattributes.go index d187e0f864..6dd081bc31 100644 --- a/component/otelcol/processor/k8sattributes/k8sattributes.go +++ b/internal/component/otelcol/processor/k8sattributes/k8sattributes.go @@ -2,9 +2,9 @@ package k8sattributes import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" diff --git a/component/otelcol/processor/k8sattributes/k8sattributes_test.go b/internal/component/otelcol/processor/k8sattributes/k8sattributes_test.go similarity index 99% rename from component/otelcol/processor/k8sattributes/k8sattributes_test.go rename to internal/component/otelcol/processor/k8sattributes/k8sattributes_test.go index 44e4cae31b..94a844c595 100644 --- a/component/otelcol/processor/k8sattributes/k8sattributes_test.go +++ b/internal/component/otelcol/processor/k8sattributes/k8sattributes_test.go @@ -3,7 +3,7 @@ package k8sattributes_test import ( "testing" - "github.com/grafana/agent/component/otelcol/processor/k8sattributes" + "github.com/grafana/agent/internal/component/otelcol/processor/k8sattributes" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" "github.com/stretchr/testify/require" diff --git a/component/otelcol/processor/k8sattributes/types.go b/internal/component/otelcol/processor/k8sattributes/types.go similarity index 100% rename from component/otelcol/processor/k8sattributes/types.go rename to internal/component/otelcol/processor/k8sattributes/types.go diff --git a/component/otelcol/processor/memorylimiter/memorylimiter.go b/internal/component/otelcol/processor/memorylimiter/memorylimiter.go similarity index 95% rename from component/otelcol/processor/memorylimiter/memorylimiter.go rename to internal/component/otelcol/processor/memorylimiter/memorylimiter.go index 2253e57cd9..ee6cc47492 100644 --- a/component/otelcol/processor/memorylimiter/memorylimiter.go +++ b/internal/component/otelcol/processor/memorylimiter/memorylimiter.go @@ -6,9 +6,9 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/processor/memorylimiter/memorylimiter_test.go b/internal/component/otelcol/processor/memorylimiter/memorylimiter_test.go similarity index 88% rename from component/otelcol/processor/memorylimiter/memorylimiter_test.go rename to internal/component/otelcol/processor/memorylimiter/memorylimiter_test.go index 952b0da7e2..a5efd41467 100644 --- a/component/otelcol/processor/memorylimiter/memorylimiter_test.go +++ b/internal/component/otelcol/processor/memorylimiter/memorylimiter_test.go @@ -5,12 +5,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/component/otelcol/processor/memorylimiter" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/component/otelcol/processor/memorylimiter" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/river" "github.com/stretchr/testify/require" diff --git a/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go similarity index 94% rename from component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go rename to internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go index 2c381e04b7..2854e9be15 100644 --- a/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go +++ b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler.go @@ -2,9 +2,9 @@ package probabilistic_sampler import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor" diff --git a/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go similarity index 93% rename from component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go rename to internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go index ac591ea79d..a1dc28eaf8 100644 --- a/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go +++ b/internal/component/otelcol/processor/probabilistic_sampler/probabilistic_sampler_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - probabilisticsampler "github.com/grafana/agent/component/otelcol/processor/probabilistic_sampler" - "github.com/grafana/agent/component/otelcol/processor/processortest" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + probabilisticsampler "github.com/grafana/agent/internal/component/otelcol/processor/probabilistic_sampler" + "github.com/grafana/agent/internal/component/otelcol/processor/processortest" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor" "github.com/stretchr/testify/require" diff --git a/component/otelcol/processor/processor.go b/internal/component/otelcol/processor/processor.go similarity index 92% rename from component/otelcol/processor/processor.go rename to internal/component/otelcol/processor/processor.go index 5bb4ebb1f0..43d626ba5e 100644 --- a/component/otelcol/processor/processor.go +++ b/internal/component/otelcol/processor/processor.go @@ -7,14 +7,14 @@ import ( "errors" "os" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fanoutconsumer" - "github.com/grafana/agent/component/otelcol/internal/lazycollector" - "github.com/grafana/agent/component/otelcol/internal/lazyconsumer" - "github.com/grafana/agent/component/otelcol/internal/scheduler" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fanoutconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/lazycollector" + "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/scheduler" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/prometheus/client_golang/prometheus" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/processor/processor_test.go b/internal/component/otelcol/processor/processor_test.go similarity index 94% rename from component/otelcol/processor/processor_test.go rename to internal/component/otelcol/processor/processor_test.go index bebec5b274..3beb97bc88 100644 --- a/component/otelcol/processor/processor_test.go +++ b/internal/component/otelcol/processor/processor_test.go @@ -6,12 +6,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/component/otelcol/processor" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/component/otelcol/processor" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" otelconsumer "go.opentelemetry.io/collector/consumer" diff --git a/component/otelcol/processor/processortest/compare_signals.go b/internal/component/otelcol/processor/processortest/compare_signals.go similarity index 100% rename from component/otelcol/processor/processortest/compare_signals.go rename to internal/component/otelcol/processor/processortest/compare_signals.go diff --git a/component/otelcol/processor/processortest/compare_signals_test.go b/internal/component/otelcol/processor/processortest/compare_signals_test.go similarity index 100% rename from component/otelcol/processor/processortest/compare_signals_test.go rename to internal/component/otelcol/processor/processortest/compare_signals_test.go diff --git a/component/otelcol/processor/processortest/processortest.go b/internal/component/otelcol/processor/processortest/processortest.go similarity index 96% rename from component/otelcol/processor/processortest/processortest.go rename to internal/component/otelcol/processor/processortest/processortest.go index e9a99ec650..40b8eba4b1 100644 --- a/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/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/dskit/backoff" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/pdata/plog" diff --git a/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go similarity index 96% rename from component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go index 9b715eac4a..6037c05696 100644 --- a/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2/config.go @@ -1,7 +1,7 @@ package ec2 import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go similarity index 97% rename from component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go index 1532bd3765..d5c82182a9 100644 --- a/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs/config.go @@ -1,7 +1,7 @@ package ecs import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go similarity index 90% rename from component/otelcol/processor/resourcedetection/internal/aws/eks/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go index 6290180b30..a0b2ca60c4 100644 --- a/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/eks/config.go @@ -1,7 +1,7 @@ package eks import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go similarity index 94% rename from component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go index dd670372ce..72bee032ef 100644 --- a/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk/config.go @@ -1,7 +1,7 @@ package elasticbeanstalk import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go b/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go similarity index 95% rename from component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go index 19a4cc7b4e..1e7d95b620 100644 --- a/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda/config.go @@ -1,7 +1,7 @@ package lambda import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go b/internal/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go similarity index 90% rename from component/otelcol/processor/resourcedetection/internal/azure/aks/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go index 4501c4e33a..b23e0fdba6 100644 --- a/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/azure/aks/config.go @@ -1,7 +1,7 @@ package aks import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/azure/config.go b/internal/component/otelcol/processor/resourcedetection/internal/azure/config.go similarity index 96% rename from component/otelcol/processor/resourcedetection/internal/azure/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/azure/config.go index 05e612d1d2..375863d347 100644 --- a/component/otelcol/processor/resourcedetection/internal/azure/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/azure/config.go @@ -1,7 +1,7 @@ package azure import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/consul/config.go b/internal/component/otelcol/processor/resourcedetection/internal/consul/config.go similarity index 96% rename from component/otelcol/processor/resourcedetection/internal/consul/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/consul/config.go index 4cc2e9b5be..af51b19e06 100644 --- a/component/otelcol/processor/resourcedetection/internal/consul/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/consul/config.go @@ -1,7 +1,7 @@ package consul import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" "github.com/grafana/river/rivertypes" "go.opentelemetry.io/collector/config/configopaque" diff --git a/component/otelcol/processor/resourcedetection/internal/docker/config.go b/internal/component/otelcol/processor/resourcedetection/internal/docker/config.go similarity index 90% rename from component/otelcol/processor/resourcedetection/internal/docker/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/docker/config.go index f8c1bdc39b..f67c79c39e 100644 --- a/component/otelcol/processor/resourcedetection/internal/docker/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/docker/config.go @@ -1,7 +1,7 @@ package docker import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/gcp/config.go b/internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go similarity index 97% rename from component/otelcol/processor/resourcedetection/internal/gcp/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go index 76395828a9..d97848bc16 100644 --- a/component/otelcol/processor/resourcedetection/internal/gcp/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/gcp/config.go @@ -1,7 +1,7 @@ package gcp import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/heroku/config.go b/internal/component/otelcol/processor/resourcedetection/internal/heroku/config.go similarity index 95% rename from component/otelcol/processor/resourcedetection/internal/heroku/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/heroku/config.go index 6e7681269a..d009bac91e 100644 --- a/component/otelcol/processor/resourcedetection/internal/heroku/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/heroku/config.go @@ -1,7 +1,7 @@ package heroku import ( - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/k8snode/config.go b/internal/component/otelcol/processor/resourcedetection/internal/k8snode/config.go similarity index 93% rename from component/otelcol/processor/resourcedetection/internal/k8snode/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/k8snode/config.go index 8d47362eec..62303f94c5 100644 --- a/component/otelcol/processor/resourcedetection/internal/k8snode/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/k8snode/config.go @@ -1,8 +1,8 @@ package k8snode import ( - "github.com/grafana/agent/component/otelcol" - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + "github.com/grafana/agent/internal/component/otelcol" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/openshift/config.go b/internal/component/otelcol/processor/resourcedetection/internal/openshift/config.go similarity index 92% rename from component/otelcol/processor/resourcedetection/internal/openshift/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/openshift/config.go index 362cd9bff4..94c594edf2 100644 --- a/component/otelcol/processor/resourcedetection/internal/openshift/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/openshift/config.go @@ -1,8 +1,8 @@ package openshift import ( - "github.com/grafana/agent/component/otelcol" - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + "github.com/grafana/agent/internal/component/otelcol" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go b/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go similarity index 100% rename from component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go rename to internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config/resource_attribute_config.go diff --git a/component/otelcol/processor/resourcedetection/internal/system/config.go b/internal/component/otelcol/processor/resourcedetection/internal/system/config.go similarity index 96% rename from component/otelcol/processor/resourcedetection/internal/system/config.go rename to internal/component/otelcol/processor/resourcedetection/internal/system/config.go index 82e25cb45e..c661cf6e83 100644 --- a/component/otelcol/processor/resourcedetection/internal/system/config.go +++ b/internal/component/otelcol/processor/resourcedetection/internal/system/config.go @@ -3,7 +3,7 @@ package system import ( "fmt" - rac "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" + rac "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/resource_attribute_config" "github.com/grafana/river" ) diff --git a/component/otelcol/processor/resourcedetection/resourcedetection.go b/internal/component/otelcol/processor/resourcedetection/resourcedetection.go similarity index 82% rename from component/otelcol/processor/resourcedetection/resourcedetection.go rename to internal/component/otelcol/processor/resourcedetection/resourcedetection.go index 6878f45b87..de32c1c6ae 100644 --- a/component/otelcol/processor/resourcedetection/resourcedetection.go +++ b/internal/component/otelcol/processor/resourcedetection/resourcedetection.go @@ -4,24 +4,24 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/ec2" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/ecs" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/eks" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/lambda" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/azure" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/azure/aks" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/consul" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/docker" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/gcp" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/heroku" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/k8snode" - kubernetes_node "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/k8snode" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/openshift" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/system" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/eks" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/azure" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/azure/aks" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/consul" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/docker" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/gcp" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/heroku" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/k8snode" + kubernetes_node "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/k8snode" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/openshift" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/system" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river" "github.com/mitchellh/mapstructure" diff --git a/component/otelcol/processor/resourcedetection/resourcedetection_test.go b/internal/component/otelcol/processor/resourcedetection/resourcedetection_test.go similarity index 97% rename from component/otelcol/processor/resourcedetection/resourcedetection_test.go rename to internal/component/otelcol/processor/resourcedetection/resourcedetection_test.go index 6fbbf0280e..437c2cf6ba 100644 --- a/component/otelcol/processor/resourcedetection/resourcedetection_test.go +++ b/internal/component/otelcol/processor/resourcedetection/resourcedetection_test.go @@ -4,21 +4,21 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/ec2" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/ecs" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/eks" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/aws/lambda" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/azure" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/azure/aks" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/consul" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/docker" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/gcp" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/heroku" - kubernetes_node "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/k8snode" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/openshift" - "github.com/grafana/agent/component/otelcol/processor/resourcedetection/internal/system" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/ec2" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/ecs" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/eks" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/elasticbeanstalk" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/aws/lambda" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/azure" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/azure/aks" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/consul" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/docker" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/gcp" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/heroku" + kubernetes_node "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/k8snode" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/openshift" + "github.com/grafana/agent/internal/component/otelcol/processor/resourcedetection/internal/system" "github.com/grafana/river" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/resourcedetectionprocessor" diff --git a/component/otelcol/processor/span/span.go b/internal/component/otelcol/processor/span/span.go similarity index 97% rename from component/otelcol/processor/span/span.go rename to internal/component/otelcol/processor/span/span.go index 87aa9962a5..70fa5979f4 100644 --- a/component/otelcol/processor/span/span.go +++ b/internal/component/otelcol/processor/span/span.go @@ -4,9 +4,9 @@ package span import ( "fmt" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" diff --git a/component/otelcol/processor/span/span_test.go b/internal/component/otelcol/processor/span/span_test.go similarity index 98% rename from component/otelcol/processor/span/span_test.go rename to internal/component/otelcol/processor/span/span_test.go index 6771a2f6cc..7d4cd9c557 100644 --- a/component/otelcol/processor/span/span_test.go +++ b/internal/component/otelcol/processor/span/span_test.go @@ -4,10 +4,10 @@ import ( "context" "testing" - "github.com/grafana/agent/component/otelcol/processor/processortest" - "github.com/grafana/agent/component/otelcol/processor/span" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol/processor/processortest" + "github.com/grafana/agent/internal/component/otelcol/processor/span" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" diff --git a/component/otelcol/processor/tail_sampling/tail_sampling.go b/internal/component/otelcol/processor/tail_sampling/tail_sampling.go similarity index 94% rename from component/otelcol/processor/tail_sampling/tail_sampling.go rename to internal/component/otelcol/processor/tail_sampling/tail_sampling.go index a3e3551933..81e1cc929a 100644 --- a/component/otelcol/processor/tail_sampling/tail_sampling.go +++ b/internal/component/otelcol/processor/tail_sampling/tail_sampling.go @@ -5,9 +5,9 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" tsp "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/processor/tail_sampling/tail_sampling_test.go b/internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go similarity index 97% rename from component/otelcol/processor/tail_sampling/tail_sampling_test.go rename to internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go index 89912137a8..37a9c1b27d 100644 --- a/component/otelcol/processor/tail_sampling/tail_sampling_test.go +++ b/internal/component/otelcol/processor/tail_sampling/tail_sampling_test.go @@ -7,11 +7,11 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/river" "github.com/stretchr/testify/require" diff --git a/component/otelcol/processor/tail_sampling/types.go b/internal/component/otelcol/processor/tail_sampling/types.go similarity index 100% rename from component/otelcol/processor/tail_sampling/types.go rename to internal/component/otelcol/processor/tail_sampling/types.go diff --git a/component/otelcol/processor/transform/transform.go b/internal/component/otelcol/processor/transform/transform.go similarity index 96% rename from component/otelcol/processor/transform/transform.go rename to internal/component/otelcol/processor/transform/transform.go index 4807cc5a79..708ce7cdc4 100644 --- a/component/otelcol/processor/transform/transform.go +++ b/internal/component/otelcol/processor/transform/transform.go @@ -5,9 +5,9 @@ import ( "fmt" "strings" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor" "github.com/grafana/agent/internal/featuregate" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/ottl" diff --git a/component/otelcol/processor/transform/transform_test.go b/internal/component/otelcol/processor/transform/transform_test.go similarity index 99% rename from component/otelcol/processor/transform/transform_test.go rename to internal/component/otelcol/processor/transform/transform_test.go index 8dac32ce21..4c40f2d3a5 100644 --- a/component/otelcol/processor/transform/transform_test.go +++ b/internal/component/otelcol/processor/transform/transform_test.go @@ -3,7 +3,7 @@ package transform_test import ( "testing" - "github.com/grafana/agent/component/otelcol/processor/transform" + "github.com/grafana/agent/internal/component/otelcol/processor/transform" "github.com/grafana/river" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/transformprocessor" diff --git a/component/otelcol/receiver/jaeger/jaeger.go b/internal/component/otelcol/receiver/jaeger/jaeger.go similarity index 97% rename from component/otelcol/receiver/jaeger/jaeger.go rename to internal/component/otelcol/receiver/jaeger/jaeger.go index a836d8b0de..27632e040e 100644 --- a/component/otelcol/receiver/jaeger/jaeger.go +++ b/internal/component/otelcol/receiver/jaeger/jaeger.go @@ -5,9 +5,9 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver" "github.com/grafana/agent/internal/featuregate" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/receiver/jaeger/jaeger_test.go b/internal/component/otelcol/receiver/jaeger/jaeger_test.go similarity index 94% rename from component/otelcol/receiver/jaeger/jaeger_test.go rename to internal/component/otelcol/receiver/jaeger/jaeger_test.go index 84885b9038..c2c7fb9b67 100644 --- a/component/otelcol/receiver/jaeger/jaeger_test.go +++ b/internal/component/otelcol/receiver/jaeger/jaeger_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/jaeger" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/jaeger" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/phayes/freeport" "github.com/stretchr/testify/require" diff --git a/component/otelcol/receiver/kafka/kafka.go b/internal/component/otelcol/receiver/kafka/kafka.go similarity index 98% rename from component/otelcol/receiver/kafka/kafka.go rename to internal/component/otelcol/receiver/kafka/kafka.go index 701a40b88d..dd798f1cee 100644 --- a/component/otelcol/receiver/kafka/kafka.go +++ b/internal/component/otelcol/receiver/kafka/kafka.go @@ -4,9 +4,9 @@ package kafka import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/mitchellh/mapstructure" diff --git a/component/otelcol/receiver/kafka/kafka_test.go b/internal/component/otelcol/receiver/kafka/kafka_test.go similarity index 98% rename from component/otelcol/receiver/kafka/kafka_test.go rename to internal/component/otelcol/receiver/kafka/kafka_test.go index 66b8317f6a..c03c8a63ef 100644 --- a/component/otelcol/receiver/kafka/kafka_test.go +++ b/internal/component/otelcol/receiver/kafka/kafka_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/kafka" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/kafka" "github.com/grafana/river" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" diff --git a/component/otelcol/receiver/loki/loki.go b/internal/component/otelcol/receiver/loki/loki.go similarity index 93% rename from component/otelcol/receiver/loki/loki.go rename to internal/component/otelcol/receiver/loki/loki.go index 99f84b2755..f45d428c66 100644 --- a/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/agent/component" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fanoutconsumer" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fanoutconsumer" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/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/component/otelcol/receiver/loki/loki_test.go b/internal/component/otelcol/receiver/loki/loki_test.go similarity index 91% rename from component/otelcol/receiver/loki/loki_test.go rename to internal/component/otelcol/receiver/loki/loki_test.go index ba6ff81f9f..f69df27272 100644 --- a/component/otelcol/receiver/loki/loki_test.go +++ b/internal/component/otelcol/receiver/loki/loki_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - lokiapi "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + lokiapi "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/grafana/river" "github.com/prometheus/common/model" diff --git a/component/otelcol/receiver/opencensus/opencensus.go b/internal/component/otelcol/receiver/opencensus/opencensus.go similarity index 93% rename from component/otelcol/receiver/opencensus/opencensus.go rename to internal/component/otelcol/receiver/opencensus/opencensus.go index 7abae228d2..2ebeb412d8 100644 --- a/component/otelcol/receiver/opencensus/opencensus.go +++ b/internal/component/otelcol/receiver/opencensus/opencensus.go @@ -3,9 +3,9 @@ package opencensus import ( "github.com/alecthomas/units" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver" "github.com/grafana/agent/internal/featuregate" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/receiver/opencensus/opencensus_test.go b/internal/component/otelcol/receiver/opencensus/opencensus_test.go similarity index 93% rename from component/otelcol/receiver/opencensus/opencensus_test.go rename to internal/component/otelcol/receiver/opencensus/opencensus_test.go index 9c8143cb6d..8cc95042a2 100644 --- a/component/otelcol/receiver/opencensus/opencensus_test.go +++ b/internal/component/otelcol/receiver/opencensus/opencensus_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/opencensus" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/opencensus" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver" "github.com/phayes/freeport" diff --git a/component/otelcol/receiver/otlp/otlp.go b/internal/component/otelcol/receiver/otlp/otlp.go similarity index 96% rename from component/otelcol/receiver/otlp/otlp.go rename to internal/component/otelcol/receiver/otlp/otlp.go index 26602b0b64..8e59fab2be 100644 --- a/component/otelcol/receiver/otlp/otlp.go +++ b/internal/component/otelcol/receiver/otlp/otlp.go @@ -6,9 +6,9 @@ import ( net_url "net/url" "github.com/alecthomas/units" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver" "github.com/grafana/agent/internal/featuregate" otelcomponent "go.opentelemetry.io/collector/component" otelextension "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/receiver/otlp/otlp_test.go b/internal/component/otelcol/receiver/otlp/otlp_test.go similarity index 93% rename from component/otelcol/receiver/otlp/otlp_test.go rename to internal/component/otelcol/receiver/otlp/otlp_test.go index 96bfcce9e6..5b148d539d 100644 --- a/component/otelcol/receiver/otlp/otlp_test.go +++ b/internal/component/otelcol/receiver/otlp/otlp_test.go @@ -8,12 +8,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/component/otelcol/receiver/otlp" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/component/otelcol/receiver/otlp" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/river" "github.com/phayes/freeport" diff --git a/component/otelcol/receiver/otlp/testdata/payload.json b/internal/component/otelcol/receiver/otlp/testdata/payload.json similarity index 100% rename from component/otelcol/receiver/otlp/testdata/payload.json rename to internal/component/otelcol/receiver/otlp/testdata/payload.json diff --git a/component/otelcol/receiver/prometheus/internal/appendable.go b/internal/component/otelcol/receiver/prometheus/internal/appendable.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/appendable.go rename to internal/component/otelcol/receiver/prometheus/internal/appendable.go diff --git a/component/otelcol/receiver/prometheus/internal/doc.go b/internal/component/otelcol/receiver/prometheus/internal/doc.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/doc.go rename to internal/component/otelcol/receiver/prometheus/internal/doc.go diff --git a/component/otelcol/receiver/prometheus/internal/logger.go b/internal/component/otelcol/receiver/prometheus/internal/logger.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/logger.go rename to internal/component/otelcol/receiver/prometheus/internal/logger.go diff --git a/component/otelcol/receiver/prometheus/internal/logger_test.go b/internal/component/otelcol/receiver/prometheus/internal/logger_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/logger_test.go rename to internal/component/otelcol/receiver/prometheus/internal/logger_test.go diff --git a/component/otelcol/receiver/prometheus/internal/metadata.go b/internal/component/otelcol/receiver/prometheus/internal/metadata.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/metadata.go rename to internal/component/otelcol/receiver/prometheus/internal/metadata.go diff --git a/component/otelcol/receiver/prometheus/internal/metricfamily.go b/internal/component/otelcol/receiver/prometheus/internal/metricfamily.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/metricfamily.go rename to internal/component/otelcol/receiver/prometheus/internal/metricfamily.go diff --git a/component/otelcol/receiver/prometheus/internal/metricfamily_test.go b/internal/component/otelcol/receiver/prometheus/internal/metricfamily_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/metricfamily_test.go rename to internal/component/otelcol/receiver/prometheus/internal/metricfamily_test.go diff --git a/component/otelcol/receiver/prometheus/internal/metrics_adjuster.go b/internal/component/otelcol/receiver/prometheus/internal/metrics_adjuster.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/metrics_adjuster.go rename to internal/component/otelcol/receiver/prometheus/internal/metrics_adjuster.go diff --git a/component/otelcol/receiver/prometheus/internal/metrics_adjuster_test.go b/internal/component/otelcol/receiver/prometheus/internal/metrics_adjuster_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/metrics_adjuster_test.go rename to internal/component/otelcol/receiver/prometheus/internal/metrics_adjuster_test.go diff --git a/component/otelcol/receiver/prometheus/internal/metricsutil_test.go b/internal/component/otelcol/receiver/prometheus/internal/metricsutil_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/metricsutil_test.go rename to internal/component/otelcol/receiver/prometheus/internal/metricsutil_test.go diff --git a/component/otelcol/receiver/prometheus/internal/prom_to_otlp.go b/internal/component/otelcol/receiver/prometheus/internal/prom_to_otlp.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/prom_to_otlp.go rename to internal/component/otelcol/receiver/prometheus/internal/prom_to_otlp.go diff --git a/component/otelcol/receiver/prometheus/internal/prom_to_otlp_test.go b/internal/component/otelcol/receiver/prometheus/internal/prom_to_otlp_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/prom_to_otlp_test.go rename to internal/component/otelcol/receiver/prometheus/internal/prom_to_otlp_test.go diff --git a/component/otelcol/receiver/prometheus/internal/staleness_end_to_end_test.go b/internal/component/otelcol/receiver/prometheus/internal/staleness_end_to_end_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/staleness_end_to_end_test.go rename to internal/component/otelcol/receiver/prometheus/internal/staleness_end_to_end_test.go diff --git a/component/otelcol/receiver/prometheus/internal/starttimemetricadjuster.go b/internal/component/otelcol/receiver/prometheus/internal/starttimemetricadjuster.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/starttimemetricadjuster.go rename to internal/component/otelcol/receiver/prometheus/internal/starttimemetricadjuster.go diff --git a/component/otelcol/receiver/prometheus/internal/starttimemetricadjuster_test.go b/internal/component/otelcol/receiver/prometheus/internal/starttimemetricadjuster_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/starttimemetricadjuster_test.go rename to internal/component/otelcol/receiver/prometheus/internal/starttimemetricadjuster_test.go diff --git a/component/otelcol/receiver/prometheus/internal/transaction.go b/internal/component/otelcol/receiver/prometheus/internal/transaction.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/transaction.go rename to internal/component/otelcol/receiver/prometheus/internal/transaction.go diff --git a/component/otelcol/receiver/prometheus/internal/transaction_test.go b/internal/component/otelcol/receiver/prometheus/internal/transaction_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/transaction_test.go rename to internal/component/otelcol/receiver/prometheus/internal/transaction_test.go diff --git a/component/otelcol/receiver/prometheus/internal/util.go b/internal/component/otelcol/receiver/prometheus/internal/util.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/util.go rename to internal/component/otelcol/receiver/prometheus/internal/util.go diff --git a/component/otelcol/receiver/prometheus/internal/util_test.go b/internal/component/otelcol/receiver/prometheus/internal/util_test.go similarity index 100% rename from component/otelcol/receiver/prometheus/internal/util_test.go rename to internal/component/otelcol/receiver/prometheus/internal/util_test.go diff --git a/component/otelcol/receiver/prometheus/prometheus.go b/internal/component/otelcol/receiver/prometheus/prometheus.go similarity index 92% rename from component/otelcol/receiver/prometheus/prometheus.go rename to internal/component/otelcol/receiver/prometheus/prometheus.go index 25bd25830b..ba03333788 100644 --- a/component/otelcol/receiver/prometheus/prometheus.go +++ b/internal/component/otelcol/receiver/prometheus/prometheus.go @@ -9,13 +9,13 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fanoutconsumer" - "github.com/grafana/agent/component/otelcol/receiver/prometheus/internal" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fanoutconsumer" + "github.com/grafana/agent/internal/component/otelcol/receiver/prometheus/internal" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/storage" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/receiver/prometheus/prometheus_test.go b/internal/component/otelcol/receiver/prometheus/prometheus_test.go similarity index 92% rename from component/otelcol/receiver/prometheus/prometheus_test.go rename to internal/component/otelcol/receiver/prometheus/prometheus_test.go index 3877bad7c9..92263b1aa5 100644 --- a/component/otelcol/receiver/prometheus/prometheus_test.go +++ b/internal/component/otelcol/receiver/prometheus/prometheus_test.go @@ -5,12 +5,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/component/otelcol/receiver/prometheus" - flowprometheus "github.com/grafana/agent/component/prometheus" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/component/otelcol/receiver/prometheus" + flowprometheus "github.com/grafana/agent/internal/component/prometheus" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/exemplar" diff --git a/component/otelcol/receiver/receiver.go b/internal/component/otelcol/receiver/receiver.go similarity index 91% rename from component/otelcol/receiver/receiver.go rename to internal/component/otelcol/receiver/receiver.go index 0c3943fb8c..55cfebc604 100644 --- a/component/otelcol/receiver/receiver.go +++ b/internal/component/otelcol/receiver/receiver.go @@ -7,14 +7,14 @@ import ( "errors" "os" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fanoutconsumer" - "github.com/grafana/agent/component/otelcol/internal/lazycollector" - "github.com/grafana/agent/component/otelcol/internal/scheduler" - "github.com/grafana/agent/component/otelcol/internal/views" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fanoutconsumer" + "github.com/grafana/agent/internal/component/otelcol/internal/lazycollector" + "github.com/grafana/agent/internal/component/otelcol/internal/scheduler" + "github.com/grafana/agent/internal/component/otelcol/internal/views" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/prometheus/client_golang/prometheus" otelcomponent "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/extension" diff --git a/component/otelcol/receiver/receiver_test.go b/internal/component/otelcol/receiver/receiver_test.go similarity index 91% rename from component/otelcol/receiver/receiver_test.go rename to internal/component/otelcol/receiver/receiver_test.go index f1836e0edf..2e6164a3f1 100644 --- a/component/otelcol/receiver/receiver_test.go +++ b/internal/component/otelcol/receiver/receiver_test.go @@ -5,12 +5,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/internal/fakeconsumer" - "github.com/grafana/agent/component/otelcol/receiver" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/internal/fakeconsumer" + "github.com/grafana/agent/internal/component/otelcol/receiver" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" otelcomponent "go.opentelemetry.io/collector/component" otelconsumer "go.opentelemetry.io/collector/consumer" diff --git a/component/otelcol/receiver/vcenter/vcenter.go b/internal/component/otelcol/receiver/vcenter/vcenter.go similarity index 99% rename from component/otelcol/receiver/vcenter/vcenter.go rename to internal/component/otelcol/receiver/vcenter/vcenter.go index 206159f2f3..a44105a305 100644 --- a/component/otelcol/receiver/vcenter/vcenter.go +++ b/internal/component/otelcol/receiver/vcenter/vcenter.go @@ -5,9 +5,9 @@ import ( "fmt" "net/url" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/mitchellh/mapstructure" diff --git a/component/otelcol/receiver/vcenter/vcenter_test.go b/internal/component/otelcol/receiver/vcenter/vcenter_test.go similarity index 98% rename from component/otelcol/receiver/vcenter/vcenter_test.go rename to internal/component/otelcol/receiver/vcenter/vcenter_test.go index 8fc30cff0e..2104eb65b2 100644 --- a/component/otelcol/receiver/vcenter/vcenter_test.go +++ b/internal/component/otelcol/receiver/vcenter/vcenter_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/vcenter" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/vcenter" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/vcenterreceiver" "github.com/stretchr/testify/require" diff --git a/component/otelcol/receiver/zipkin/zipkin.go b/internal/component/otelcol/receiver/zipkin/zipkin.go similarity index 93% rename from component/otelcol/receiver/zipkin/zipkin.go rename to internal/component/otelcol/receiver/zipkin/zipkin.go index e51d9f4d9d..46c6d74b9c 100644 --- a/component/otelcol/receiver/zipkin/zipkin.go +++ b/internal/component/otelcol/receiver/zipkin/zipkin.go @@ -2,9 +2,9 @@ package zipkin import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver" "github.com/grafana/agent/internal/featuregate" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/component/otelcol/receiver/zipkin/zipkin_test.go b/internal/component/otelcol/receiver/zipkin/zipkin_test.go similarity index 93% rename from component/otelcol/receiver/zipkin/zipkin_test.go rename to internal/component/otelcol/receiver/zipkin/zipkin_test.go index 5815cb134b..4377bb5e33 100644 --- a/component/otelcol/receiver/zipkin/zipkin_test.go +++ b/internal/component/otelcol/receiver/zipkin/zipkin_test.go @@ -5,10 +5,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/zipkin" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/zipkin" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver" "github.com/phayes/freeport" diff --git a/component/prometheus/exporter/apache/apache.go b/internal/component/prometheus/exporter/apache/apache.go similarity index 85% rename from component/prometheus/exporter/apache/apache.go rename to internal/component/prometheus/exporter/apache/apache.go index 05da5ee6d0..5d0d419e92 100644 --- a/component/prometheus/exporter/apache/apache.go +++ b/internal/component/prometheus/exporter/apache/apache.go @@ -1,11 +1,11 @@ package apache import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/apache_http" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/apache_http" ) func init() { diff --git a/component/prometheus/exporter/azure/azure.go b/internal/component/prometheus/exporter/azure/azure.go similarity index 93% rename from component/prometheus/exporter/azure/azure.go rename to internal/component/prometheus/exporter/azure/azure.go index 068e0ac245..391e9c5932 100644 --- a/component/prometheus/exporter/azure/azure.go +++ b/internal/component/prometheus/exporter/azure/azure.go @@ -1,11 +1,11 @@ package azure import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/azure_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/azure_exporter" ) func init() { diff --git a/component/prometheus/exporter/blackbox/blackbox.go b/internal/component/prometheus/exporter/blackbox/blackbox.go similarity index 91% rename from component/prometheus/exporter/blackbox/blackbox.go rename to internal/component/prometheus/exporter/blackbox/blackbox.go index 61ad097b17..a429818b61 100644 --- a/component/prometheus/exporter/blackbox/blackbox.go +++ b/internal/component/prometheus/exporter/blackbox/blackbox.go @@ -8,13 +8,13 @@ import ( blackbox_config "github.com/prometheus/blackbox_exporter/config" "gopkg.in/yaml.v2" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/blackbox_exporter" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" + "github.com/grafana/agent/internal/util" "github.com/grafana/river/rivertypes" ) diff --git a/component/prometheus/exporter/blackbox/blackbox_test.go b/internal/component/prometheus/exporter/blackbox/blackbox_test.go similarity index 98% rename from component/prometheus/exporter/blackbox/blackbox_test.go rename to internal/component/prometheus/exporter/blackbox/blackbox_test.go index 3016935ee0..d9d78bd5a1 100644 --- a/component/prometheus/exporter/blackbox/blackbox_test.go +++ b/internal/component/prometheus/exporter/blackbox/blackbox_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/river" blackbox_config "github.com/prometheus/blackbox_exporter/config" "github.com/prometheus/common/model" diff --git a/component/prometheus/exporter/cadvisor/cadvisor.go b/internal/component/prometheus/exporter/cadvisor/cadvisor.go similarity index 95% rename from component/prometheus/exporter/cadvisor/cadvisor.go rename to internal/component/prometheus/exporter/cadvisor/cadvisor.go index 6857e7bc3f..ce6d1f1ca8 100644 --- a/component/prometheus/exporter/cadvisor/cadvisor.go +++ b/internal/component/prometheus/exporter/cadvisor/cadvisor.go @@ -3,11 +3,11 @@ package cadvisor import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/cadvisor" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/cadvisor" ) func init() { diff --git a/component/prometheus/exporter/cadvisor/cadvisor_test.go b/internal/component/prometheus/exporter/cadvisor/cadvisor_test.go similarity index 98% rename from component/prometheus/exporter/cadvisor/cadvisor_test.go rename to internal/component/prometheus/exporter/cadvisor/cadvisor_test.go index 788ffb9094..7195140524 100644 --- a/component/prometheus/exporter/cadvisor/cadvisor_test.go +++ b/internal/component/prometheus/exporter/cadvisor/cadvisor_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/integrations/cadvisor" + "github.com/grafana/agent/internal/static/integrations/cadvisor" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/prometheus/exporter/cloudwatch/cloudwatch.go b/internal/component/prometheus/exporter/cloudwatch/cloudwatch.go similarity index 81% rename from component/prometheus/exporter/cloudwatch/cloudwatch.go rename to internal/component/prometheus/exporter/cloudwatch/cloudwatch.go index 5b41870d0c..a7ec9a96af 100644 --- a/component/prometheus/exporter/cloudwatch/cloudwatch.go +++ b/internal/component/prometheus/exporter/cloudwatch/cloudwatch.go @@ -3,11 +3,11 @@ package cloudwatch import ( "fmt" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/cloudwatch_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/cloudwatch_exporter" ) func init() { diff --git a/component/prometheus/exporter/cloudwatch/config.go b/internal/component/prometheus/exporter/cloudwatch/config.go similarity index 99% rename from component/prometheus/exporter/cloudwatch/config.go rename to internal/component/prometheus/exporter/cloudwatch/config.go index 3c0493b84a..62a0757b2e 100644 --- a/component/prometheus/exporter/cloudwatch/config.go +++ b/internal/component/prometheus/exporter/cloudwatch/config.go @@ -5,7 +5,7 @@ import ( "encoding/hex" "time" - "github.com/grafana/agent/pkg/integrations/cloudwatch_exporter" + "github.com/grafana/agent/internal/static/integrations/cloudwatch_exporter" "github.com/grafana/river" yaceConf "github.com/nerdswords/yet-another-cloudwatch-exporter/pkg/config" yaceModel "github.com/nerdswords/yet-another-cloudwatch-exporter/pkg/model" diff --git a/component/prometheus/exporter/cloudwatch/config_test.go b/internal/component/prometheus/exporter/cloudwatch/config_test.go similarity index 100% rename from component/prometheus/exporter/cloudwatch/config_test.go rename to internal/component/prometheus/exporter/cloudwatch/config_test.go diff --git a/component/prometheus/exporter/consul/consul.go b/internal/component/prometheus/exporter/consul/consul.go similarity index 91% rename from component/prometheus/exporter/consul/consul.go rename to internal/component/prometheus/exporter/consul/consul.go index 89316b2b29..60ce1d6d4b 100644 --- a/component/prometheus/exporter/consul/consul.go +++ b/internal/component/prometheus/exporter/consul/consul.go @@ -3,11 +3,11 @@ package consul import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/consul_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/consul_exporter" ) func init() { diff --git a/component/prometheus/exporter/dnsmasq/dnsmasq.go b/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go similarity index 86% rename from component/prometheus/exporter/dnsmasq/dnsmasq.go rename to internal/component/prometheus/exporter/dnsmasq/dnsmasq.go index aec91b3a77..dc261f5758 100644 --- a/component/prometheus/exporter/dnsmasq/dnsmasq.go +++ b/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go @@ -1,11 +1,11 @@ package dnsmasq import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/dnsmasq_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/dnsmasq_exporter" ) func init() { diff --git a/component/prometheus/exporter/dnsmasq/dnsmasq_test.go b/internal/component/prometheus/exporter/dnsmasq/dnsmasq_test.go similarity index 93% rename from component/prometheus/exporter/dnsmasq/dnsmasq_test.go rename to internal/component/prometheus/exporter/dnsmasq/dnsmasq_test.go index d4e62f474a..dbf6a904f7 100644 --- a/component/prometheus/exporter/dnsmasq/dnsmasq_test.go +++ b/internal/component/prometheus/exporter/dnsmasq/dnsmasq_test.go @@ -3,7 +3,7 @@ package dnsmasq import ( "testing" - "github.com/grafana/agent/pkg/integrations/dnsmasq_exporter" + "github.com/grafana/agent/internal/static/integrations/dnsmasq_exporter" "github.com/grafana/river" "github.com/stretchr/testify/assert" ) diff --git a/component/prometheus/exporter/elasticsearch/elasticsearch.go b/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go similarity index 91% rename from component/prometheus/exporter/elasticsearch/elasticsearch.go rename to internal/component/prometheus/exporter/elasticsearch/elasticsearch.go index 52c373169f..06811eb68c 100644 --- a/component/prometheus/exporter/elasticsearch/elasticsearch.go +++ b/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go @@ -3,12 +3,12 @@ package elasticsearch import ( "time" - "github.com/grafana/agent/component" - commonCfg "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + commonCfg "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/elasticsearch_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" ) func init() { diff --git a/component/prometheus/exporter/elasticsearch/elasticsearch_test.go b/internal/component/prometheus/exporter/elasticsearch/elasticsearch_test.go similarity index 95% rename from component/prometheus/exporter/elasticsearch/elasticsearch_test.go rename to internal/component/prometheus/exporter/elasticsearch/elasticsearch_test.go index 5c71a8ac71..d6b18347ae 100644 --- a/component/prometheus/exporter/elasticsearch/elasticsearch_test.go +++ b/internal/component/prometheus/exporter/elasticsearch/elasticsearch_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - commonCfg "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/pkg/integrations/elasticsearch_exporter" + commonCfg "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" promCfg "github.com/prometheus/common/config" diff --git a/component/prometheus/exporter/exporter.go b/internal/component/prometheus/exporter/exporter.go similarity index 95% rename from component/prometheus/exporter/exporter.go rename to internal/component/prometheus/exporter/exporter.go index 984b5d040a..c184e1c12e 100644 --- a/component/prometheus/exporter/exporter.go +++ b/internal/component/prometheus/exporter/exporter.go @@ -9,11 +9,11 @@ import ( "strings" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/integrations" - http_service "github.com/grafana/agent/service/http" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/flow/logging/level" + http_service "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/static/integrations" "github.com/prometheus/common/model" ) diff --git a/component/prometheus/exporter/gcp/gcp.go b/internal/component/prometheus/exporter/gcp/gcp.go similarity index 89% rename from component/prometheus/exporter/gcp/gcp.go rename to internal/component/prometheus/exporter/gcp/gcp.go index a2fa40f4be..d9dbbf16ad 100644 --- a/component/prometheus/exporter/gcp/gcp.go +++ b/internal/component/prometheus/exporter/gcp/gcp.go @@ -3,11 +3,11 @@ package gcp import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/gcp_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/gcp_exporter" ) func init() { diff --git a/component/prometheus/exporter/gcp/gcp_test.go b/internal/component/prometheus/exporter/gcp/gcp_test.go similarity index 100% rename from component/prometheus/exporter/gcp/gcp_test.go rename to internal/component/prometheus/exporter/gcp/gcp_test.go diff --git a/component/prometheus/exporter/github/github.go b/internal/component/prometheus/exporter/github/github.go similarity index 87% rename from component/prometheus/exporter/github/github.go rename to internal/component/prometheus/exporter/github/github.go index c25143c564..9519637733 100644 --- a/component/prometheus/exporter/github/github.go +++ b/internal/component/prometheus/exporter/github/github.go @@ -1,11 +1,11 @@ package github import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/github_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/github_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/github/github_test.go b/internal/component/prometheus/exporter/github/github_test.go similarity index 100% rename from component/prometheus/exporter/github/github_test.go rename to internal/component/prometheus/exporter/github/github_test.go diff --git a/component/prometheus/exporter/kafka/kafka.go b/internal/component/prometheus/exporter/kafka/kafka.go similarity index 93% rename from component/prometheus/exporter/kafka/kafka.go rename to internal/component/prometheus/exporter/kafka/kafka.go index 1e50a3885a..fcd12fe85f 100644 --- a/component/prometheus/exporter/kafka/kafka.go +++ b/internal/component/prometheus/exporter/kafka/kafka.go @@ -4,12 +4,12 @@ import ( "fmt" "github.com/IBM/sarama" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/kafka_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/kafka_exporter" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/kafka/kafka_test.go b/internal/component/prometheus/exporter/kafka/kafka_test.go similarity index 96% rename from component/prometheus/exporter/kafka/kafka_test.go rename to internal/component/prometheus/exporter/kafka/kafka_test.go index 7529677dbe..1bf0a88726 100644 --- a/component/prometheus/exporter/kafka/kafka_test.go +++ b/internal/component/prometheus/exporter/kafka/kafka_test.go @@ -3,8 +3,8 @@ package kafka import ( "testing" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/pkg/integrations/kafka_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/static/integrations/kafka_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/prometheus/exporter/memcached/memcached.go b/internal/component/prometheus/exporter/memcached/memcached.go similarity index 85% rename from component/prometheus/exporter/memcached/memcached.go rename to internal/component/prometheus/exporter/memcached/memcached.go index 8a200c3a23..516d05b24e 100644 --- a/component/prometheus/exporter/memcached/memcached.go +++ b/internal/component/prometheus/exporter/memcached/memcached.go @@ -3,12 +3,12 @@ package memcached import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/memcached_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/memcached_exporter" ) func init() { diff --git a/component/prometheus/exporter/memcached/memcached_test.go b/internal/component/prometheus/exporter/memcached/memcached_test.go similarity index 93% rename from component/prometheus/exporter/memcached/memcached_test.go rename to internal/component/prometheus/exporter/memcached/memcached_test.go index 0ba29c3b97..e3b4a3ae5a 100644 --- a/component/prometheus/exporter/memcached/memcached_test.go +++ b/internal/component/prometheus/exporter/memcached/memcached_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/pkg/integrations/memcached_exporter" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/static/integrations/memcached_exporter" "github.com/grafana/river" "github.com/stretchr/testify/assert" ) diff --git a/component/prometheus/exporter/mongodb/mongodb.go b/internal/component/prometheus/exporter/mongodb/mongodb.go similarity index 84% rename from component/prometheus/exporter/mongodb/mongodb.go rename to internal/component/prometheus/exporter/mongodb/mongodb.go index fae0df05b3..46685c422a 100644 --- a/component/prometheus/exporter/mongodb/mongodb.go +++ b/internal/component/prometheus/exporter/mongodb/mongodb.go @@ -1,11 +1,11 @@ package mongodb import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/mongodb_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/mongodb_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/mongodb/mongodb_test.go b/internal/component/prometheus/exporter/mongodb/mongodb_test.go similarity index 94% rename from component/prometheus/exporter/mongodb/mongodb_test.go rename to internal/component/prometheus/exporter/mongodb/mongodb_test.go index 515032ae46..b33590c84e 100644 --- a/component/prometheus/exporter/mongodb/mongodb_test.go +++ b/internal/component/prometheus/exporter/mongodb/mongodb_test.go @@ -3,7 +3,7 @@ package mongodb import ( "testing" - "github.com/grafana/agent/pkg/integrations/mongodb_exporter" + "github.com/grafana/agent/internal/static/integrations/mongodb_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/prometheus/exporter/mssql/mssql.go b/internal/component/prometheus/exporter/mssql/mssql.go similarity index 89% rename from component/prometheus/exporter/mssql/mssql.go rename to internal/component/prometheus/exporter/mssql/mssql.go index 8ecffa0c8f..368e844294 100644 --- a/component/prometheus/exporter/mssql/mssql.go +++ b/internal/component/prometheus/exporter/mssql/mssql.go @@ -6,12 +6,12 @@ import ( "time" "github.com/burningalchemist/sql_exporter/config" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/mssql" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/mssql" + "github.com/grafana/agent/internal/util" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" "gopkg.in/yaml.v2" diff --git a/component/prometheus/exporter/mssql/mssql_test.go b/internal/component/prometheus/exporter/mssql/mssql_test.go similarity index 99% rename from component/prometheus/exporter/mssql/mssql_test.go rename to internal/component/prometheus/exporter/mssql/mssql_test.go index 4fad4a8197..0eb59a8b39 100644 --- a/component/prometheus/exporter/mssql/mssql_test.go +++ b/internal/component/prometheus/exporter/mssql/mssql_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/burningalchemist/sql_exporter/config" - "github.com/grafana/agent/pkg/integrations/mssql" + "github.com/grafana/agent/internal/static/integrations/mssql" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/component/prometheus/exporter/mysql/mysql.go b/internal/component/prometheus/exporter/mysql/mysql.go similarity index 96% rename from component/prometheus/exporter/mysql/mysql.go rename to internal/component/prometheus/exporter/mysql/mysql.go index 4ffd0b5804..7eba014902 100644 --- a/component/prometheus/exporter/mysql/mysql.go +++ b/internal/component/prometheus/exporter/mysql/mysql.go @@ -2,11 +2,11 @@ package mysql import ( "github.com/go-sql-driver/mysql" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/mysqld_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/mysqld_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/mysql/mysql_test.go b/internal/component/prometheus/exporter/mysql/mysql_test.go similarity index 98% rename from component/prometheus/exporter/mysql/mysql_test.go rename to internal/component/prometheus/exporter/mysql/mysql_test.go index 3bb2aed1f2..45a69d8286 100644 --- a/component/prometheus/exporter/mysql/mysql_test.go +++ b/internal/component/prometheus/exporter/mysql/mysql_test.go @@ -3,7 +3,7 @@ package mysql import ( "testing" - "github.com/grafana/agent/pkg/integrations/mysqld_exporter" + "github.com/grafana/agent/internal/static/integrations/mysqld_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" "github.com/stretchr/testify/require" diff --git a/component/prometheus/exporter/oracledb/oracledb.go b/internal/component/prometheus/exporter/oracledb/oracledb.go similarity index 90% rename from component/prometheus/exporter/oracledb/oracledb.go rename to internal/component/prometheus/exporter/oracledb/oracledb.go index a099369761..008549bf72 100644 --- a/component/prometheus/exporter/oracledb/oracledb.go +++ b/internal/component/prometheus/exporter/oracledb/oracledb.go @@ -5,11 +5,11 @@ import ( "fmt" "net/url" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/oracledb_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/oracledb_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/oracledb/oracledb_test.go b/internal/component/prometheus/exporter/oracledb/oracledb_test.go similarity index 97% rename from component/prometheus/exporter/oracledb/oracledb_test.go rename to internal/component/prometheus/exporter/oracledb/oracledb_test.go index 7fc85c3761..d339151dac 100644 --- a/component/prometheus/exporter/oracledb/oracledb_test.go +++ b/internal/component/prometheus/exporter/oracledb/oracledb_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/grafana/agent/pkg/integrations/oracledb_exporter" + "github.com/grafana/agent/internal/static/integrations/oracledb_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/component/prometheus/exporter/postgres/postgres.go b/internal/component/prometheus/exporter/postgres/postgres.go similarity index 93% rename from component/prometheus/exporter/postgres/postgres.go rename to internal/component/prometheus/exporter/postgres/postgres.go index d714e0c150..d67eeafb61 100644 --- a/component/prometheus/exporter/postgres/postgres.go +++ b/internal/component/prometheus/exporter/postgres/postgres.go @@ -4,11 +4,11 @@ import ( "fmt" "strings" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/postgres_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/postgres_exporter" "github.com/grafana/river/rivertypes" "github.com/lib/pq" config_util "github.com/prometheus/common/config" diff --git a/component/prometheus/exporter/postgres/postgres_test.go b/internal/component/prometheus/exporter/postgres/postgres_test.go similarity index 97% rename from component/prometheus/exporter/postgres/postgres_test.go rename to internal/component/prometheus/exporter/postgres/postgres_test.go index 99bed18985..b4a84f6c4f 100644 --- a/component/prometheus/exporter/postgres/postgres_test.go +++ b/internal/component/prometheus/exporter/postgres/postgres_test.go @@ -3,7 +3,7 @@ package postgres import ( "testing" - "github.com/grafana/agent/pkg/integrations/postgres_exporter" + "github.com/grafana/agent/internal/static/integrations/postgres_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/component/prometheus/exporter/process/process.go b/internal/component/prometheus/exporter/process/process.go similarity index 90% rename from component/prometheus/exporter/process/process.go rename to internal/component/prometheus/exporter/process/process.go index 32a87a9b1c..187aee4a76 100644 --- a/component/prometheus/exporter/process/process.go +++ b/internal/component/prometheus/exporter/process/process.go @@ -1,11 +1,11 @@ package process import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/process_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/process_exporter" exporter_config "github.com/ncabatoff/process-exporter/config" ) diff --git a/component/prometheus/exporter/process/process_test.go b/internal/component/prometheus/exporter/process/process_test.go similarity index 100% rename from component/prometheus/exporter/process/process_test.go rename to internal/component/prometheus/exporter/process/process_test.go diff --git a/component/prometheus/exporter/redis/redis.go b/internal/component/prometheus/exporter/redis/redis.go similarity index 96% rename from component/prometheus/exporter/redis/redis.go rename to internal/component/prometheus/exporter/redis/redis.go index 1ce1d24779..8085f4dda0 100644 --- a/component/prometheus/exporter/redis/redis.go +++ b/internal/component/prometheus/exporter/redis/redis.go @@ -5,11 +5,11 @@ import ( "strings" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/redis_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/redis_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/redis/redis_test.go b/internal/component/prometheus/exporter/redis/redis_test.go similarity index 98% rename from component/prometheus/exporter/redis/redis_test.go rename to internal/component/prometheus/exporter/redis/redis_test.go index e69cd22f6d..35503de473 100644 --- a/component/prometheus/exporter/redis/redis_test.go +++ b/internal/component/prometheus/exporter/redis/redis_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/integrations/redis_exporter" + "github.com/grafana/agent/internal/static/integrations/redis_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/prometheus/exporter/self/self.go b/internal/component/prometheus/exporter/self/self.go similarity index 82% rename from component/prometheus/exporter/self/self.go rename to internal/component/prometheus/exporter/self/self.go index aedf0de204..3d0af166df 100644 --- a/component/prometheus/exporter/self/self.go +++ b/internal/component/prometheus/exporter/self/self.go @@ -1,11 +1,11 @@ package self import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/agent" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/agent" ) func init() { diff --git a/component/prometheus/exporter/snmp/snmp.go b/internal/component/prometheus/exporter/snmp/snmp.go similarity index 93% rename from component/prometheus/exporter/snmp/snmp.go rename to internal/component/prometheus/exporter/snmp/snmp.go index 67f2226274..0a455eea72 100644 --- a/component/prometheus/exporter/snmp/snmp.go +++ b/internal/component/prometheus/exporter/snmp/snmp.go @@ -5,12 +5,12 @@ import ( "fmt" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/snmp_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/snmp_exporter" "github.com/grafana/river/rivertypes" snmp_config "github.com/prometheus/snmp_exporter/config" "gopkg.in/yaml.v2" diff --git a/component/prometheus/exporter/snmp/snmp_test.go b/internal/component/prometheus/exporter/snmp/snmp_test.go similarity index 98% rename from component/prometheus/exporter/snmp/snmp_test.go rename to internal/component/prometheus/exporter/snmp/snmp_test.go index fa1773cb58..6d5a0e97d7 100644 --- a/component/prometheus/exporter/snmp/snmp_test.go +++ b/internal/component/prometheus/exporter/snmp/snmp_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/river" "github.com/prometheus/common/model" diff --git a/component/prometheus/exporter/snowflake/snowflake.go b/internal/component/prometheus/exporter/snowflake/snowflake.go similarity index 86% rename from component/prometheus/exporter/snowflake/snowflake.go rename to internal/component/prometheus/exporter/snowflake/snowflake.go index bf8759ccc5..bb93d9df1c 100644 --- a/component/prometheus/exporter/snowflake/snowflake.go +++ b/internal/component/prometheus/exporter/snowflake/snowflake.go @@ -1,11 +1,11 @@ package snowflake import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/snowflake_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/snowflake_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/snowflake/snowflake_test.go b/internal/component/prometheus/exporter/snowflake/snowflake_test.go similarity index 94% rename from component/prometheus/exporter/snowflake/snowflake_test.go rename to internal/component/prometheus/exporter/snowflake/snowflake_test.go index 01e1a8f5ff..83ecf189ca 100644 --- a/component/prometheus/exporter/snowflake/snowflake_test.go +++ b/internal/component/prometheus/exporter/snowflake/snowflake_test.go @@ -3,7 +3,7 @@ package snowflake import ( "testing" - "github.com/grafana/agent/pkg/integrations/snowflake_exporter" + "github.com/grafana/agent/internal/static/integrations/snowflake_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/component/prometheus/exporter/squid/squid.go b/internal/component/prometheus/exporter/squid/squid.go similarity index 86% rename from component/prometheus/exporter/squid/squid.go rename to internal/component/prometheus/exporter/squid/squid.go index 7da483ec87..6ef589005e 100644 --- a/component/prometheus/exporter/squid/squid.go +++ b/internal/component/prometheus/exporter/squid/squid.go @@ -3,11 +3,11 @@ package squid import ( "net" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/squid_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/squid_exporter" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/squid/squid_test.go b/internal/component/prometheus/exporter/squid/squid_test.go similarity index 97% rename from component/prometheus/exporter/squid/squid_test.go rename to internal/component/prometheus/exporter/squid/squid_test.go index ba63684ee8..78dc2af2bf 100644 --- a/component/prometheus/exporter/squid/squid_test.go +++ b/internal/component/prometheus/exporter/squid/squid_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - "github.com/grafana/agent/pkg/integrations/squid_exporter" + "github.com/grafana/agent/internal/static/integrations/squid_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/config" diff --git a/component/prometheus/exporter/statsd/config.go b/internal/component/prometheus/exporter/statsd/config.go similarity index 95% rename from component/prometheus/exporter/statsd/config.go rename to internal/component/prometheus/exporter/statsd/config.go index cace3899d7..2b3f11e0bd 100644 --- a/component/prometheus/exporter/statsd/config.go +++ b/internal/component/prometheus/exporter/statsd/config.go @@ -5,7 +5,7 @@ import ( "os" "time" - "github.com/grafana/agent/pkg/integrations/statsd_exporter" + "github.com/grafana/agent/internal/static/integrations/statsd_exporter" "gopkg.in/yaml.v3" ) @@ -35,7 +35,7 @@ type Arguments struct { // DefaultConfig holds non-zero default options for the Config when it is // unmarshaled from YAML. // -// Some defaults are populated from init functions in the github.com/grafana/agent/pkg/integrations/statsd_exporter package. +// Some defaults are populated from init functions in the github.com/grafana/agent/internal/static/integrations/statsd_exporter package. var DefaultConfig = Arguments{ ListenUDP: statsd_exporter.DefaultConfig.ListenUDP, @@ -56,7 +56,7 @@ var DefaultConfig = Arguments{ RelayPacketLength: statsd_exporter.DefaultConfig.RelayPacketLength, } -// Convert gives a config suitable for use with github.com/grafana/agent/pkg/integrations/statsd_exporter. +// Convert gives a config suitable for use with github.com/grafana/agent/internal/static/integrations/statsd_exporter. func (c *Arguments) Convert() (*statsd_exporter.Config, error) { var ( mappingConfig any diff --git a/component/prometheus/exporter/statsd/statsd.go b/internal/component/prometheus/exporter/statsd/statsd.go similarity index 79% rename from component/prometheus/exporter/statsd/statsd.go rename to internal/component/prometheus/exporter/statsd/statsd.go index 27b2b3f9c6..fe09c168ec 100644 --- a/component/prometheus/exporter/statsd/statsd.go +++ b/internal/component/prometheus/exporter/statsd/statsd.go @@ -1,10 +1,10 @@ package statsd import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" ) func init() { diff --git a/component/prometheus/exporter/statsd/statsd_test.go b/internal/component/prometheus/exporter/statsd/statsd_test.go similarity index 100% rename from component/prometheus/exporter/statsd/statsd_test.go rename to internal/component/prometheus/exporter/statsd/statsd_test.go diff --git a/component/prometheus/exporter/statsd/testdata/mapTest.yaml b/internal/component/prometheus/exporter/statsd/testdata/mapTest.yaml similarity index 100% rename from component/prometheus/exporter/statsd/testdata/mapTest.yaml rename to internal/component/prometheus/exporter/statsd/testdata/mapTest.yaml diff --git a/component/prometheus/exporter/unix/config.go b/internal/component/prometheus/exporter/unix/config.go similarity index 98% rename from component/prometheus/exporter/unix/config.go rename to internal/component/prometheus/exporter/unix/config.go index 4bc6af4832..96de4a5c6b 100644 --- a/component/prometheus/exporter/unix/config.go +++ b/internal/component/prometheus/exporter/unix/config.go @@ -3,14 +3,14 @@ package unix import ( "time" - node_integration "github.com/grafana/agent/pkg/integrations/node_exporter" + node_integration "github.com/grafana/agent/internal/static/integrations/node_exporter" "github.com/grafana/dskit/flagext" ) // DefaultArguments holds non-zero default options for Arguments when it is // unmarshaled from YAML. // -// Some defaults are populated from init functions in the github.com/grafana/agent/pkg/integrations/node_exporter package. +// Some defaults are populated from init functions in the github.com/grafana/agent/internal/static/integrations/node_exporter package. var DefaultArguments = Arguments{ ProcFSPath: node_integration.DefaultConfig.ProcFSPath, RootFSPath: node_integration.DefaultConfig.RootFSPath, @@ -101,7 +101,7 @@ type Arguments struct { VMStat VMStatConfig `river:"vmstat,block,optional"` } -// Convert gives a config suitable for use with github.com/grafana/agent/pkg/integrations/node_exporter. +// Convert gives a config suitable for use with github.com/grafana/agent/internal/static/integrations/node_exporter. func (a *Arguments) Convert() *node_integration.Config { return &node_integration.Config{ IncludeExporterMetrics: a.IncludeExporterMetrics, diff --git a/component/prometheus/exporter/unix/unix.go b/internal/component/prometheus/exporter/unix/unix.go similarity index 77% rename from component/prometheus/exporter/unix/unix.go rename to internal/component/prometheus/exporter/unix/unix.go index 1d0baf4518..8bf988b08a 100644 --- a/component/prometheus/exporter/unix/unix.go +++ b/internal/component/prometheus/exporter/unix/unix.go @@ -1,10 +1,10 @@ package unix import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" ) func init() { diff --git a/component/prometheus/exporter/vsphere/vsphere.go b/internal/component/prometheus/exporter/vsphere/vsphere.go similarity index 89% rename from component/prometheus/exporter/vsphere/vsphere.go rename to internal/component/prometheus/exporter/vsphere/vsphere.go index e71a35f2df..aeb35d1dd8 100644 --- a/component/prometheus/exporter/vsphere/vsphere.go +++ b/internal/component/prometheus/exporter/vsphere/vsphere.go @@ -3,11 +3,11 @@ package vsphere import ( "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/vmware_exporter" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/vmware_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/component/prometheus/exporter/vsphere/vsphere_test.go b/internal/component/prometheus/exporter/vsphere/vsphere_test.go similarity index 95% rename from component/prometheus/exporter/vsphere/vsphere_test.go rename to internal/component/prometheus/exporter/vsphere/vsphere_test.go index 8616dfe341..edf5ebfa89 100644 --- a/component/prometheus/exporter/vsphere/vsphere_test.go +++ b/internal/component/prometheus/exporter/vsphere/vsphere_test.go @@ -3,7 +3,7 @@ package vsphere import ( "testing" - "github.com/grafana/agent/pkg/integrations/vmware_exporter" + "github.com/grafana/agent/internal/static/integrations/vmware_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/component/prometheus/exporter/windows/config.go b/internal/component/prometheus/exporter/windows/config.go similarity index 98% rename from component/prometheus/exporter/windows/config.go rename to internal/component/prometheus/exporter/windows/config.go index 44568833c1..185f6213ac 100644 --- a/component/prometheus/exporter/windows/config.go +++ b/internal/component/prometheus/exporter/windows/config.go @@ -3,7 +3,7 @@ package windows import ( "strings" - windows_integration "github.com/grafana/agent/pkg/integrations/windows_exporter" + windows_integration "github.com/grafana/agent/internal/static/integrations/windows_exporter" ) // Arguments is used for controlling for this exporter. diff --git a/component/prometheus/exporter/windows/config_default_windows_test.go b/internal/component/prometheus/exporter/windows/config_default_windows_test.go similarity index 100% rename from component/prometheus/exporter/windows/config_default_windows_test.go rename to internal/component/prometheus/exporter/windows/config_default_windows_test.go diff --git a/component/prometheus/exporter/windows/config_windows.go b/internal/component/prometheus/exporter/windows/config_windows.go similarity index 96% rename from component/prometheus/exporter/windows/config_windows.go rename to internal/component/prometheus/exporter/windows/config_windows.go index 42270f9e24..773e3f5bfc 100644 --- a/component/prometheus/exporter/windows/config_windows.go +++ b/internal/component/prometheus/exporter/windows/config_windows.go @@ -3,7 +3,7 @@ package windows import ( "strings" - windows_integration "github.com/grafana/agent/pkg/integrations/windows_exporter" + windows_integration "github.com/grafana/agent/internal/static/integrations/windows_exporter" col "github.com/prometheus-community/windows_exporter/pkg/collector" ) diff --git a/component/prometheus/exporter/windows/windows.go b/internal/component/prometheus/exporter/windows/windows.go similarity index 77% rename from component/prometheus/exporter/windows/windows.go rename to internal/component/prometheus/exporter/windows/windows.go index 61b8d9ab6c..0b7f151b75 100644 --- a/component/prometheus/exporter/windows/windows.go +++ b/internal/component/prometheus/exporter/windows/windows.go @@ -1,10 +1,10 @@ package windows import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" ) func init() { diff --git a/component/prometheus/exporter/windows/windows_test.go b/internal/component/prometheus/exporter/windows/windows_test.go similarity index 100% rename from component/prometheus/exporter/windows/windows_test.go rename to internal/component/prometheus/exporter/windows/windows_test.go diff --git a/component/prometheus/fanout.go b/internal/component/prometheus/fanout.go similarity index 99% rename from component/prometheus/fanout.go rename to internal/component/prometheus/fanout.go index d5533d820f..e25e37141f 100644 --- a/component/prometheus/fanout.go +++ b/internal/component/prometheus/fanout.go @@ -5,7 +5,7 @@ import ( "sync" "time" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/service/labelstore" "github.com/hashicorp/go-multierror" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/exemplar" diff --git a/component/prometheus/fanout_test.go b/internal/component/prometheus/fanout_test.go similarity index 93% rename from component/prometheus/fanout_test.go rename to internal/component/prometheus/fanout_test.go index 14a4636cc3..8b89201604 100644 --- a/component/prometheus/fanout_test.go +++ b/internal/component/prometheus/fanout_test.go @@ -3,7 +3,7 @@ package prometheus import ( "testing" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/service/labelstore" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/storage" diff --git a/component/prometheus/interceptor.go b/internal/component/prometheus/interceptor.go similarity index 99% rename from component/prometheus/interceptor.go rename to internal/component/prometheus/interceptor.go index ff33ac8026..d8e515ec5d 100644 --- a/component/prometheus/interceptor.go +++ b/internal/component/prometheus/interceptor.go @@ -3,7 +3,7 @@ package prometheus import ( "context" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/service/labelstore" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/component/prometheus/operator/common/component.go b/internal/component/prometheus/operator/common/component.go similarity index 93% rename from component/prometheus/operator/common/component.go rename to internal/component/prometheus/operator/common/component.go index 52f495fb18..7df6d5aa5c 100644 --- a/component/prometheus/operator/common/component.go +++ b/internal/component/prometheus/operator/common/component.go @@ -8,11 +8,11 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/operator" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/operator" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" + "github.com/grafana/agent/internal/service/labelstore" "gopkg.in/yaml.v3" ) diff --git a/component/prometheus/operator/common/crdmanager.go b/internal/component/prometheus/operator/common/crdmanager.go similarity index 97% rename from component/prometheus/operator/common/crdmanager.go rename to internal/component/prometheus/operator/common/crdmanager.go index 85f13719e9..d5f4b9bbb9 100644 --- a/component/prometheus/operator/common/crdmanager.go +++ b/internal/component/prometheus/operator/common/crdmanager.go @@ -10,12 +10,12 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" - "github.com/grafana/agent/service/http" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" + "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/service/labelstore" "github.com/grafana/ckit/shard" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" @@ -28,9 +28,9 @@ import ( "sigs.k8s.io/controller-runtime/pkg/cache" "sigs.k8s.io/controller-runtime/pkg/client" - "github.com/grafana/agent/component/prometheus/operator" - "github.com/grafana/agent/component/prometheus/operator/configgen" - compscrape "github.com/grafana/agent/component/prometheus/scrape" + "github.com/grafana/agent/internal/component/prometheus/operator" + "github.com/grafana/agent/internal/component/prometheus/operator/configgen" + compscrape "github.com/grafana/agent/internal/component/prometheus/scrape" promopv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "k8s.io/apimachinery/pkg/labels" "k8s.io/apimachinery/pkg/runtime" diff --git a/component/prometheus/operator/common/crdmanager_test.go b/internal/component/prometheus/operator/common/crdmanager_test.go similarity index 95% rename from component/prometheus/operator/common/crdmanager_test.go rename to internal/component/prometheus/operator/common/crdmanager_test.go index c229a2440a..abd6aeffb3 100644 --- a/component/prometheus/operator/common/crdmanager_test.go +++ b/internal/component/prometheus/operator/common/crdmanager_test.go @@ -6,10 +6,10 @@ import ( "golang.org/x/exp/maps" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/operator" - "github.com/grafana/agent/service/cluster" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/operator" + "github.com/grafana/agent/internal/service/cluster" + "github.com/grafana/agent/internal/service/labelstore" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/component/prometheus/operator/common/interfaces.go b/internal/component/prometheus/operator/common/interfaces.go similarity index 100% rename from component/prometheus/operator/common/interfaces.go rename to internal/component/prometheus/operator/common/interfaces.go diff --git a/component/prometheus/operator/configgen/config_gen.go b/internal/component/prometheus/operator/configgen/config_gen.go similarity index 97% rename from component/prometheus/operator/configgen/config_gen.go rename to internal/component/prometheus/operator/configgen/config_gen.go index 5a9e2e2da0..5c215b3b8f 100644 --- a/component/prometheus/operator/configgen/config_gen.go +++ b/internal/component/prometheus/operator/configgen/config_gen.go @@ -5,9 +5,9 @@ package configgen import ( "regexp" - k8sConfig "github.com/grafana/agent/component/common/kubernetes" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/prometheus/operator" + k8sConfig "github.com/grafana/agent/internal/component/common/kubernetes" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/prometheus/operator" promopv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" commonConfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/prometheus/operator/configgen/config_gen_podmonitor.go b/internal/component/prometheus/operator/configgen/config_gen_podmonitor.go similarity index 100% rename from component/prometheus/operator/configgen/config_gen_podmonitor.go rename to internal/component/prometheus/operator/configgen/config_gen_podmonitor.go diff --git a/component/prometheus/operator/configgen/config_gen_podmonitor_test.go b/internal/component/prometheus/operator/configgen/config_gen_podmonitor_test.go similarity index 98% rename from component/prometheus/operator/configgen/config_gen_podmonitor_test.go rename to internal/component/prometheus/operator/configgen/config_gen_podmonitor_test.go index 2fff216589..fca82b1d1d 100644 --- a/component/prometheus/operator/configgen/config_gen_podmonitor_test.go +++ b/internal/component/prometheus/operator/configgen/config_gen_podmonitor_test.go @@ -7,10 +7,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/kubernetes" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/prometheus/operator" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/kubernetes" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/prometheus/operator" + "github.com/grafana/agent/internal/util" promopv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" commonConfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/prometheus/operator/configgen/config_gen_probe.go b/internal/component/prometheus/operator/configgen/config_gen_probe.go similarity index 100% rename from component/prometheus/operator/configgen/config_gen_probe.go rename to internal/component/prometheus/operator/configgen/config_gen_probe.go diff --git a/component/prometheus/operator/configgen/config_gen_probe_test.go b/internal/component/prometheus/operator/configgen/config_gen_probe_test.go similarity index 97% rename from component/prometheus/operator/configgen/config_gen_probe_test.go rename to internal/component/prometheus/operator/configgen/config_gen_probe_test.go index c32a4731e9..25b2910a3f 100644 --- a/component/prometheus/operator/configgen/config_gen_probe_test.go +++ b/internal/component/prometheus/operator/configgen/config_gen_probe_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/kubernetes" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/kubernetes" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/util" promopv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" commonConfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/prometheus/operator/configgen/config_gen_servicemonitor.go b/internal/component/prometheus/operator/configgen/config_gen_servicemonitor.go similarity index 100% rename from component/prometheus/operator/configgen/config_gen_servicemonitor.go rename to internal/component/prometheus/operator/configgen/config_gen_servicemonitor.go diff --git a/component/prometheus/operator/configgen/config_gen_servicemonitor_test.go b/internal/component/prometheus/operator/configgen/config_gen_servicemonitor_test.go similarity index 98% rename from component/prometheus/operator/configgen/config_gen_servicemonitor_test.go rename to internal/component/prometheus/operator/configgen/config_gen_servicemonitor_test.go index 365c19c023..80fb36e87e 100644 --- a/component/prometheus/operator/configgen/config_gen_servicemonitor_test.go +++ b/internal/component/prometheus/operator/configgen/config_gen_servicemonitor_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/kubernetes" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/common/kubernetes" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/util" promopv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" commonConfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/prometheus/operator/configgen/config_gen_test.go b/internal/component/prometheus/operator/configgen/config_gen_test.go similarity index 97% rename from component/prometheus/operator/configgen/config_gen_test.go rename to internal/component/prometheus/operator/configgen/config_gen_test.go index 1ec54d2e62..e399b1ba4b 100644 --- a/component/prometheus/operator/configgen/config_gen_test.go +++ b/internal/component/prometheus/operator/configgen/config_gen_test.go @@ -6,10 +6,10 @@ import ( "testing" "time" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/common/kubernetes" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/prometheus/operator" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/common/kubernetes" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/prometheus/operator" promopv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" promConfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/prometheus/operator/configgen/secrets.go b/internal/component/prometheus/operator/configgen/secrets.go similarity index 100% rename from component/prometheus/operator/configgen/secrets.go rename to internal/component/prometheus/operator/configgen/secrets.go diff --git a/component/prometheus/operator/podmonitors/operator.go b/internal/component/prometheus/operator/podmonitors/operator.go similarity index 69% rename from component/prometheus/operator/podmonitors/operator.go rename to internal/component/prometheus/operator/podmonitors/operator.go index d55e0cbe48..5da23d3b1a 100644 --- a/component/prometheus/operator/podmonitors/operator.go +++ b/internal/component/prometheus/operator/podmonitors/operator.go @@ -1,9 +1,9 @@ package podmonitors import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/operator" - "github.com/grafana/agent/component/prometheus/operator/common" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/operator" + "github.com/grafana/agent/internal/component/prometheus/operator/common" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/prometheus/operator/probes/probes.go b/internal/component/prometheus/operator/probes/probes.go similarity index 68% rename from component/prometheus/operator/probes/probes.go rename to internal/component/prometheus/operator/probes/probes.go index 89bd8702b3..fba2b3e301 100644 --- a/component/prometheus/operator/probes/probes.go +++ b/internal/component/prometheus/operator/probes/probes.go @@ -1,9 +1,9 @@ package probes import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/operator" - "github.com/grafana/agent/component/prometheus/operator/common" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/operator" + "github.com/grafana/agent/internal/component/prometheus/operator/common" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/prometheus/operator/servicemonitors/servicemonitors.go b/internal/component/prometheus/operator/servicemonitors/servicemonitors.go similarity index 69% rename from component/prometheus/operator/servicemonitors/servicemonitors.go rename to internal/component/prometheus/operator/servicemonitors/servicemonitors.go index dd85eed0b9..c6379f65c5 100644 --- a/component/prometheus/operator/servicemonitors/servicemonitors.go +++ b/internal/component/prometheus/operator/servicemonitors/servicemonitors.go @@ -1,9 +1,9 @@ package servicemonitors import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus/operator" - "github.com/grafana/agent/component/prometheus/operator/common" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus/operator" + "github.com/grafana/agent/internal/component/prometheus/operator/common" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/prometheus/operator/types.go b/internal/component/prometheus/operator/types.go similarity index 88% rename from component/prometheus/operator/types.go rename to internal/component/prometheus/operator/types.go index c4273b4a8b..eefd8ab7c8 100644 --- a/component/prometheus/operator/types.go +++ b/internal/component/prometheus/operator/types.go @@ -3,11 +3,11 @@ package operator import ( "time" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/common/kubernetes" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/prometheus/scrape" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/common/kubernetes" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/prometheus/scrape" + "github.com/grafana/agent/internal/service/cluster" "github.com/prometheus/common/model" promconfig "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/storage" diff --git a/component/prometheus/operator/types_test.go b/internal/component/prometheus/operator/types_test.go similarity index 100% rename from component/prometheus/operator/types_test.go rename to internal/component/prometheus/operator/types_test.go diff --git a/component/prometheus/receive_http/receive_http.go b/internal/component/prometheus/receive_http/receive_http.go similarity index 91% rename from component/prometheus/receive_http/receive_http.go rename to internal/component/prometheus/receive_http/receive_http.go index 5b985d675c..1a4b6be4b5 100644 --- a/component/prometheus/receive_http/receive_http.go +++ b/internal/component/prometheus/receive_http/receive_http.go @@ -8,13 +8,13 @@ import ( "sync" "github.com/gorilla/mux" - "github.com/grafana/agent/component" - fnet "github.com/grafana/agent/component/common/net" - agentprom "github.com/grafana/agent/component/prometheus" + "github.com/grafana/agent/internal/component" + fnet "github.com/grafana/agent/internal/component/common/net" + agentprom "github.com/grafana/agent/internal/component/prometheus" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/labelstore" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/storage" "github.com/prometheus/prometheus/storage/remote" diff --git a/component/prometheus/receive_http/receive_http_test.go b/internal/component/prometheus/receive_http/receive_http_test.go similarity index 97% rename from component/prometheus/receive_http/receive_http_test.go rename to internal/component/prometheus/receive_http/receive_http_test.go index a0c4fe7dd6..9d72dae277 100644 --- a/component/prometheus/receive_http/receive_http_test.go +++ b/internal/component/prometheus/receive_http/receive_http_test.go @@ -9,11 +9,11 @@ import ( "time" "github.com/golang/snappy" - "github.com/grafana/agent/component" - fnet "github.com/grafana/agent/component/common/net" - agentprom "github.com/grafana/agent/component/prometheus" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/component" + fnet "github.com/grafana/agent/internal/component/common/net" + agentprom "github.com/grafana/agent/internal/component/prometheus" + "github.com/grafana/agent/internal/service/labelstore" + "github.com/grafana/agent/internal/util" "github.com/phayes/freeport" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/config" diff --git a/component/prometheus/relabel/relabel.go b/internal/component/prometheus/relabel/relabel.go similarity index 97% rename from component/prometheus/relabel/relabel.go rename to internal/component/prometheus/relabel/relabel.go index 01948fbfa5..459de792f2 100644 --- a/component/prometheus/relabel/relabel.go +++ b/internal/component/prometheus/relabel/relabel.go @@ -5,11 +5,11 @@ import ( "fmt" "sync" - "github.com/grafana/agent/component" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/prometheus" + "github.com/grafana/agent/internal/component" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/prometheus" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/service/labelstore" lru "github.com/hashicorp/golang-lru/v2" prometheus_client "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/exemplar" diff --git a/component/prometheus/relabel/relabel_test.go b/internal/component/prometheus/relabel/relabel_test.go similarity index 95% rename from component/prometheus/relabel/relabel_test.go rename to internal/component/prometheus/relabel/relabel_test.go index d029498555..b1e660b79e 100644 --- a/component/prometheus/relabel/relabel_test.go +++ b/internal/component/prometheus/relabel/relabel_test.go @@ -8,12 +8,12 @@ import ( "context" - "github.com/grafana/agent/component" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/prometheus" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/component" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/prometheus" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/service/labelstore" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" prom "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/labels" diff --git a/component/prometheus/remotewrite/cli.go b/internal/component/prometheus/remotewrite/cli.go similarity index 99% rename from component/prometheus/remotewrite/cli.go rename to internal/component/prometheus/remotewrite/cli.go index 54116aa2d0..df6dfee346 100644 --- a/component/prometheus/remotewrite/cli.go +++ b/internal/component/prometheus/remotewrite/cli.go @@ -6,7 +6,7 @@ import ( "path/filepath" "sort" - "github.com/grafana/agent/pkg/agentctl/waltools" + "github.com/grafana/agent/internal/static/agentctl/waltools" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" ) diff --git a/component/prometheus/remotewrite/remote_write.go b/internal/component/prometheus/remotewrite/remote_write.go similarity index 96% rename from component/prometheus/remotewrite/remote_write.go rename to internal/component/prometheus/remotewrite/remote_write.go index 38b2cc6b5e..b5b00b78b8 100644 --- a/component/prometheus/remotewrite/remote_write.go +++ b/internal/component/prometheus/remotewrite/remote_write.go @@ -10,14 +10,14 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus" "github.com/grafana/agent/internal/agentseed" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus" "github.com/grafana/agent/internal/featuregate" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/labelstore" + "github.com/grafana/agent/internal/static/metrics/wal" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/metrics/wal" - "github.com/grafana/agent/service/labelstore" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/component/prometheus/remotewrite/remote_write_test.go b/internal/component/prometheus/remotewrite/remote_write_test.go similarity index 97% rename from component/prometheus/remotewrite/remote_write_test.go rename to internal/component/prometheus/remotewrite/remote_write_test.go index d8fdd069eb..8920f98562 100644 --- a/component/prometheus/remotewrite/remote_write_test.go +++ b/internal/component/prometheus/remotewrite/remote_write_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component/prometheus/remotewrite" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/prometheus/remotewrite" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/prompb" diff --git a/component/prometheus/remotewrite/types.go b/internal/component/prometheus/remotewrite/types.go similarity index 98% rename from component/prometheus/remotewrite/types.go rename to internal/component/prometheus/remotewrite/types.go index 637059aba4..67f550ee88 100644 --- a/component/prometheus/remotewrite/types.go +++ b/internal/component/prometheus/remotewrite/types.go @@ -6,8 +6,8 @@ import ( "sort" "time" - types "github.com/grafana/agent/component/common/config" - flow_relabel "github.com/grafana/agent/component/common/relabel" + types "github.com/grafana/agent/internal/component/common/config" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" "github.com/grafana/river/rivertypes" "github.com/google/uuid" diff --git a/component/prometheus/remotewrite/types_test.go b/internal/component/prometheus/remotewrite/types_test.go similarity index 100% rename from component/prometheus/remotewrite/types_test.go rename to internal/component/prometheus/remotewrite/types_test.go diff --git a/component/prometheus/scrape/scrape.go b/internal/component/prometheus/scrape/scrape.go similarity index 96% rename from component/prometheus/scrape/scrape.go rename to internal/component/prometheus/scrape/scrape.go index 3b5e2af88c..e87dc5e108 100644 --- a/component/prometheus/scrape/scrape.go +++ b/internal/component/prometheus/scrape/scrape.go @@ -8,16 +8,16 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/component" - component_config "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus" + "github.com/grafana/agent/internal/component" + component_config "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus" "github.com/grafana/agent/internal/featuregate" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" + "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/service/labelstore" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" - "github.com/grafana/agent/service/http" - "github.com/grafana/agent/service/labelstore" client_prometheus "github.com/prometheus/client_golang/prometheus" config_util "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/component/prometheus/scrape/scrape_test.go b/internal/component/prometheus/scrape/scrape_test.go similarity index 95% rename from component/prometheus/scrape/scrape_test.go rename to internal/component/prometheus/scrape/scrape_test.go index afc6c7ebd5..5a96d412d1 100644 --- a/component/prometheus/scrape/scrape_test.go +++ b/internal/component/prometheus/scrape/scrape_test.go @@ -8,12 +8,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/prometheus" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service/cluster" - http_service "github.com/grafana/agent/service/http" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/prometheus" + "github.com/grafana/agent/internal/service/cluster" + http_service "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/service/labelstore" + "github.com/grafana/agent/internal/util" "github.com/grafana/ckit/memconn" "github.com/grafana/river" prometheus_client "github.com/prometheus/client_golang/prometheus" diff --git a/component/pyroscope/appender.go b/internal/component/pyroscope/appender.go similarity index 100% rename from component/pyroscope/appender.go rename to internal/component/pyroscope/appender.go diff --git a/component/pyroscope/appender_test.go b/internal/component/pyroscope/appender_test.go similarity index 100% rename from component/pyroscope/appender_test.go rename to internal/component/pyroscope/appender_test.go diff --git a/component/pyroscope/ebpf/args.go b/internal/component/pyroscope/ebpf/args.go similarity index 91% rename from component/pyroscope/ebpf/args.go rename to internal/component/pyroscope/ebpf/args.go index c4c444b917..f2620fedd4 100644 --- a/component/pyroscope/ebpf/args.go +++ b/internal/component/pyroscope/ebpf/args.go @@ -3,8 +3,8 @@ package ebpf import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/pyroscope" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/pyroscope" ) type Arguments struct { diff --git a/component/pyroscope/ebpf/ebpf_linux.go b/internal/component/pyroscope/ebpf/ebpf_linux.go similarity index 97% rename from component/pyroscope/ebpf/ebpf_linux.go rename to internal/component/pyroscope/ebpf/ebpf_linux.go index 8013ec49f5..41f48431f5 100644 --- a/component/pyroscope/ebpf/ebpf_linux.go +++ b/internal/component/pyroscope/ebpf/ebpf_linux.go @@ -10,10 +10,10 @@ import ( "sync" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/pyroscope" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/pyroscope" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/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/component/pyroscope/ebpf/ebpf_linux_test.go b/internal/component/pyroscope/ebpf/ebpf_linux_test.go similarity index 97% rename from component/pyroscope/ebpf/ebpf_linux_test.go rename to internal/component/pyroscope/ebpf/ebpf_linux_test.go index e4f493ea79..1a7db5e31c 100644 --- a/component/pyroscope/ebpf/ebpf_linux_test.go +++ b/internal/component/pyroscope/ebpf/ebpf_linux_test.go @@ -9,9 +9,9 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/util" ebpfspy "github.com/grafana/pyroscope/ebpf" "github.com/grafana/pyroscope/ebpf/pprof" "github.com/grafana/pyroscope/ebpf/sd" diff --git a/component/pyroscope/ebpf/ebpf_placeholder.go b/internal/component/pyroscope/ebpf/ebpf_placeholder.go similarity index 90% rename from component/pyroscope/ebpf/ebpf_placeholder.go rename to internal/component/pyroscope/ebpf/ebpf_placeholder.go index 83938b748f..ad46fa2cc5 100644 --- a/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/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/pyroscope/ebpf/metrics.go b/internal/component/pyroscope/ebpf/metrics.go similarity index 100% rename from component/pyroscope/ebpf/metrics.go rename to internal/component/pyroscope/ebpf/metrics.go diff --git a/component/pyroscope/java/args.go b/internal/component/pyroscope/java/args.go similarity index 90% rename from component/pyroscope/java/args.go rename to internal/component/pyroscope/java/args.go index e1eb781f00..0eba7ff2df 100644 --- a/component/pyroscope/java/args.go +++ b/internal/component/pyroscope/java/args.go @@ -3,8 +3,8 @@ package java import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/pyroscope" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/pyroscope" ) type Arguments struct { diff --git a/component/pyroscope/java/asprof/asprof.go b/internal/component/pyroscope/java/asprof/asprof.go similarity index 100% rename from component/pyroscope/java/asprof/asprof.go rename to internal/component/pyroscope/java/asprof/asprof.go diff --git a/component/pyroscope/java/asprof/asprof_linux_amd64.go b/internal/component/pyroscope/java/asprof/asprof_linux_amd64.go similarity index 100% rename from component/pyroscope/java/asprof/asprof_linux_amd64.go rename to internal/component/pyroscope/java/asprof/asprof_linux_amd64.go diff --git a/component/pyroscope/java/asprof/asprof_linux_arm64.go b/internal/component/pyroscope/java/asprof/asprof_linux_arm64.go similarity index 100% rename from component/pyroscope/java/asprof/asprof_linux_arm64.go rename to internal/component/pyroscope/java/asprof/asprof_linux_arm64.go diff --git a/component/pyroscope/java/asprof/asprof_test.go b/internal/component/pyroscope/java/asprof/asprof_test.go similarity index 100% rename from component/pyroscope/java/asprof/asprof_test.go rename to internal/component/pyroscope/java/asprof/asprof_test.go diff --git a/component/pyroscope/java/asprof/async-profiler-3.0-linux-arm64.tar.gz b/internal/component/pyroscope/java/asprof/async-profiler-3.0-linux-arm64.tar.gz similarity index 100% rename from component/pyroscope/java/asprof/async-profiler-3.0-linux-arm64.tar.gz rename to internal/component/pyroscope/java/asprof/async-profiler-3.0-linux-arm64.tar.gz diff --git a/component/pyroscope/java/asprof/async-profiler-3.0-linux-x64.tar.gz b/internal/component/pyroscope/java/asprof/async-profiler-3.0-linux-x64.tar.gz similarity index 100% rename from component/pyroscope/java/asprof/async-profiler-3.0-linux-x64.tar.gz rename to internal/component/pyroscope/java/asprof/async-profiler-3.0-linux-x64.tar.gz diff --git a/component/pyroscope/java/asprof/extract.go b/internal/component/pyroscope/java/asprof/extract.go similarity index 100% rename from component/pyroscope/java/asprof/extract.go rename to internal/component/pyroscope/java/asprof/extract.go diff --git a/component/pyroscope/java/java.go b/internal/component/pyroscope/java/java.go similarity index 92% rename from component/pyroscope/java/java.go rename to internal/component/pyroscope/java/java.go index 5e5c894745..d2832df519 100644 --- a/component/pyroscope/java/java.go +++ b/internal/component/pyroscope/java/java.go @@ -9,11 +9,11 @@ import ( "strconv" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/component/pyroscope/java/asprof" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/component/pyroscope/java/asprof" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) const ( diff --git a/component/pyroscope/java/java_stub.go b/internal/component/pyroscope/java/java_stub.go similarity index 88% rename from component/pyroscope/java/java_stub.go rename to internal/component/pyroscope/java/java_stub.go index e68081b3bb..25daeaf182 100644 --- a/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/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/component/pyroscope/java/loop.go b/internal/component/pyroscope/java/loop.go similarity index 96% rename from component/pyroscope/java/loop.go rename to internal/component/pyroscope/java/loop.go index 918e977515..0e591b9501 100644 --- a/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/agent/component/discovery" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/component/pyroscope/java/asprof" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/component/pyroscope/java/asprof" + "github.com/grafana/agent/internal/flow/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/component/pyroscope/java/target.go b/internal/component/pyroscope/java/target.go similarity index 94% rename from component/pyroscope/java/target.go rename to internal/component/pyroscope/java/target.go index 25a1defebd..52fa2d7a97 100644 --- a/component/pyroscope/java/target.go +++ b/internal/component/pyroscope/java/target.go @@ -3,7 +3,7 @@ package java import ( "fmt" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" ) const ( diff --git a/component/pyroscope/scrape/delta_profiles.go b/internal/component/pyroscope/scrape/delta_profiles.go similarity index 96% rename from component/pyroscope/scrape/delta_profiles.go rename to internal/component/pyroscope/scrape/delta_profiles.go index c545e92e32..96ac80e5ae 100644 --- a/component/pyroscope/scrape/delta_profiles.go +++ b/internal/component/pyroscope/scrape/delta_profiles.go @@ -8,8 +8,8 @@ import ( "io" "sync" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/component/pyroscope/scrape/internal/fastdelta" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/component/pyroscope/scrape/internal/fastdelta" "github.com/klauspost/compress/gzip" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/component/pyroscope/scrape/delta_profiles_test.go b/internal/component/pyroscope/scrape/delta_profiles_test.go similarity index 98% rename from component/pyroscope/scrape/delta_profiles_test.go rename to internal/component/pyroscope/scrape/delta_profiles_test.go index b085e728f0..40d807c87c 100644 --- a/component/pyroscope/scrape/delta_profiles_test.go +++ b/internal/component/pyroscope/scrape/delta_profiles_test.go @@ -9,7 +9,7 @@ import ( googlev1 "github.com/grafana/pyroscope/api/gen/proto/go/google/v1" - "github.com/grafana/agent/component/pyroscope" + "github.com/grafana/agent/internal/component/pyroscope" "github.com/klauspost/compress/gzip" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/component/pyroscope/scrape/internal/fastdelta/Makefile b/internal/component/pyroscope/scrape/internal/fastdelta/Makefile similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/Makefile rename to internal/component/pyroscope/scrape/internal/fastdelta/Makefile diff --git a/component/pyroscope/scrape/internal/fastdelta/delta_map.go b/internal/component/pyroscope/scrape/internal/fastdelta/delta_map.go similarity index 98% rename from component/pyroscope/scrape/internal/fastdelta/delta_map.go rename to internal/component/pyroscope/scrape/internal/fastdelta/delta_map.go index cdaa7df661..9d247bcc8b 100644 --- a/component/pyroscope/scrape/internal/fastdelta/delta_map.go +++ b/internal/component/pyroscope/scrape/internal/fastdelta/delta_map.go @@ -10,7 +10,7 @@ import ( "github.com/spaolacci/murmur3" - "github.com/grafana/agent/component/pyroscope/scrape/internal/pproflite" + "github.com/grafana/agent/internal/component/pyroscope/scrape/internal/pproflite" ) // As of Go 1.19, the Go heap profile has 4 values per sample, with 2 of them diff --git a/component/pyroscope/scrape/internal/fastdelta/fd.go b/internal/component/pyroscope/scrape/internal/fastdelta/fd.go similarity index 99% rename from component/pyroscope/scrape/internal/fastdelta/fd.go rename to internal/component/pyroscope/scrape/internal/fastdelta/fd.go index 9a56f8097b..d956e5f0fa 100644 --- a/component/pyroscope/scrape/internal/fastdelta/fd.go +++ b/internal/component/pyroscope/scrape/internal/fastdelta/fd.go @@ -67,7 +67,7 @@ import ( "github.com/spaolacci/murmur3" - "github.com/grafana/agent/component/pyroscope/scrape/internal/pproflite" + "github.com/grafana/agent/internal/component/pyroscope/scrape/internal/pproflite" ) // ValueType describes the type and unit of a value. diff --git a/component/pyroscope/scrape/internal/fastdelta/fd_test.go b/internal/component/pyroscope/scrape/internal/fastdelta/fd_test.go similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/fd_test.go rename to internal/component/pyroscope/scrape/internal/fastdelta/fd_test.go diff --git a/component/pyroscope/scrape/internal/fastdelta/fuzz_test.go b/internal/component/pyroscope/scrape/internal/fastdelta/fuzz_test.go similarity index 88% rename from component/pyroscope/scrape/internal/fastdelta/fuzz_test.go rename to internal/component/pyroscope/scrape/internal/fastdelta/fuzz_test.go index 16aef52844..eeef83459d 100644 --- a/component/pyroscope/scrape/internal/fastdelta/fuzz_test.go +++ b/internal/component/pyroscope/scrape/internal/fastdelta/fuzz_test.go @@ -11,7 +11,7 @@ import ( "io" "testing" - "github.com/grafana/agent/component/pyroscope/scrape/internal/fastdelta" + "github.com/grafana/agent/internal/component/pyroscope/scrape/internal/fastdelta" ) // FuzzDelta looks for inputs to delta which cause crashes. This is to account diff --git a/component/pyroscope/scrape/internal/fastdelta/hasher.go b/internal/component/pyroscope/scrape/internal/fastdelta/hasher.go similarity index 96% rename from component/pyroscope/scrape/internal/fastdelta/hasher.go rename to internal/component/pyroscope/scrape/internal/fastdelta/hasher.go index ff250e6969..52ede6de9f 100644 --- a/component/pyroscope/scrape/internal/fastdelta/hasher.go +++ b/internal/component/pyroscope/scrape/internal/fastdelta/hasher.go @@ -13,7 +13,7 @@ import ( "github.com/spaolacci/murmur3" - "github.com/grafana/agent/component/pyroscope/scrape/internal/pproflite" + "github.com/grafana/agent/internal/component/pyroscope/scrape/internal/pproflite" ) // Hash is a 128-bit hash representing sample identity diff --git a/component/pyroscope/scrape/internal/fastdelta/location_index.go b/internal/component/pyroscope/scrape/internal/fastdelta/location_index.go similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/location_index.go rename to internal/component/pyroscope/scrape/internal/fastdelta/location_index.go diff --git a/component/pyroscope/scrape/internal/fastdelta/location_index_test.go b/internal/component/pyroscope/scrape/internal/fastdelta/location_index_test.go similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/location_index_test.go rename to internal/component/pyroscope/scrape/internal/fastdelta/location_index_test.go diff --git a/component/pyroscope/scrape/internal/fastdelta/set.go b/internal/component/pyroscope/scrape/internal/fastdelta/set.go similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/set.go rename to internal/component/pyroscope/scrape/internal/fastdelta/set.go diff --git a/component/pyroscope/scrape/internal/fastdelta/string_table.go b/internal/component/pyroscope/scrape/internal/fastdelta/string_table.go similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/string_table.go rename to internal/component/pyroscope/scrape/internal/fastdelta/string_table.go diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/big-heap.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/big-heap.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/big-heap.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/big-heap.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/block.after.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/block.after.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/block.after.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/block.after.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/block.before.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/block.before.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/block.before.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/block.before.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/0f7209b356e13da8388f52dba89dfc4669e45654f23e8446fd5292fa1bb62cf3 b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/0f7209b356e13da8388f52dba89dfc4669e45654f23e8446fd5292fa1bb62cf3 similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/0f7209b356e13da8388f52dba89dfc4669e45654f23e8446fd5292fa1bb62cf3 rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/0f7209b356e13da8388f52dba89dfc4669e45654f23e8446fd5292fa1bb62cf3 diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/6281ce98ad6bb944a23bb21f7597f91ae767be28cf9ebfaaa40e3d1454c12be3 b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/6281ce98ad6bb944a23bb21f7597f91ae767be28cf9ebfaaa40e3d1454c12be3 similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/6281ce98ad6bb944a23bb21f7597f91ae767be28cf9ebfaaa40e3d1454c12be3 rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/6281ce98ad6bb944a23bb21f7597f91ae767be28cf9ebfaaa40e3d1454c12be3 diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/74a0704b407ac210d9de0d409cba6bd17597ba4e67e73fcf7bdffa31438ac64f b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/74a0704b407ac210d9de0d409cba6bd17597ba4e67e73fcf7bdffa31438ac64f similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/74a0704b407ac210d9de0d409cba6bd17597ba4e67e73fcf7bdffa31438ac64f rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/74a0704b407ac210d9de0d409cba6bd17597ba4e67e73fcf7bdffa31438ac64f diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/76b05762f4f652d9c3b8aeaf7c0301e0be9045945811b270c33d4f0a2760eea2 b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/76b05762f4f652d9c3b8aeaf7c0301e0be9045945811b270c33d4f0a2760eea2 similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/76b05762f4f652d9c3b8aeaf7c0301e0be9045945811b270c33d4f0a2760eea2 rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/76b05762f4f652d9c3b8aeaf7c0301e0be9045945811b270c33d4f0a2760eea2 diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/aafd8cbacf61de60d2748f9d49fb622c32f7f885b5a651355a7350b2fbd4bad8 b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/aafd8cbacf61de60d2748f9d49fb622c32f7f885b5a651355a7350b2fbd4bad8 similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/aafd8cbacf61de60d2748f9d49fb622c32f7f885b5a651355a7350b2fbd4bad8 rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/aafd8cbacf61de60d2748f9d49fb622c32f7f885b5a651355a7350b2fbd4bad8 diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/d4fd55d49c674b8963a355107bfd2fb13eb81289831066a0b9f16190c2592c8a b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/d4fd55d49c674b8963a355107bfd2fb13eb81289831066a0b9f16190c2592c8a similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/d4fd55d49c674b8963a355107bfd2fb13eb81289831066a0b9f16190c2592c8a rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/d4fd55d49c674b8963a355107bfd2fb13eb81289831066a0b9f16190c2592c8a diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/eec2ef2090730346d172334a24dee416e17c1511472fb808f3f9b4d68a46e3e5 b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/eec2ef2090730346d172334a24dee416e17c1511472fb808f3f9b4d68a46e3e5 similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/eec2ef2090730346d172334a24dee416e17c1511472fb808f3f9b4d68a46e3e5 rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/eec2ef2090730346d172334a24dee416e17c1511472fb808f3f9b4d68a46e3e5 diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/f06e6fad1d62671c4b62ece89e9d85da6bd270176ce44ec809c52607cdc58680 b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/f06e6fad1d62671c4b62ece89e9d85da6bd270176ce44ec809c52607cdc58680 similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/f06e6fad1d62671c4b62ece89e9d85da6bd270176ce44ec809c52607cdc58680 rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/fuzz/FuzzDelta/f06e6fad1d62671c4b62ece89e9d85da6bd270176ce44ec809c52607cdc58680 diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/heap.after.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/heap.after.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/heap.after.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/heap.after.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/heap.before.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/heap.before.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/heap.before.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/heap.before.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/heap.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/heap.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/heap.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/heap.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.after.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.after.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.after.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.after.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.before.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.before.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.before.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.2.before.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.after.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.after.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.after.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.after.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.before.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.before.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.before.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.3.before.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.after.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.after.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.after.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.after.pprof diff --git a/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.before.pprof b/internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.before.pprof similarity index 100% rename from component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.before.pprof rename to internal/component/pyroscope/scrape/internal/fastdelta/testdata/stress-failure.before.pprof diff --git a/component/pyroscope/scrape/internal/pproflite/decoder.go b/internal/component/pyroscope/scrape/internal/pproflite/decoder.go similarity index 100% rename from component/pyroscope/scrape/internal/pproflite/decoder.go rename to internal/component/pyroscope/scrape/internal/pproflite/decoder.go diff --git a/component/pyroscope/scrape/internal/pproflite/encoder.go b/internal/component/pyroscope/scrape/internal/pproflite/encoder.go similarity index 100% rename from component/pyroscope/scrape/internal/pproflite/encoder.go rename to internal/component/pyroscope/scrape/internal/pproflite/encoder.go diff --git a/component/pyroscope/scrape/internal/pproflite/pproflite.go b/internal/component/pyroscope/scrape/internal/pproflite/pproflite.go similarity index 100% rename from component/pyroscope/scrape/internal/pproflite/pproflite.go rename to internal/component/pyroscope/scrape/internal/pproflite/pproflite.go diff --git a/component/pyroscope/scrape/internal/pproflite/pproflite_test.go b/internal/component/pyroscope/scrape/internal/pproflite/pproflite_test.go similarity index 96% rename from component/pyroscope/scrape/internal/pproflite/pproflite_test.go rename to internal/component/pyroscope/scrape/internal/pproflite/pproflite_test.go index ef0e95b0aa..b240b1dd61 100644 --- a/component/pyroscope/scrape/internal/pproflite/pproflite_test.go +++ b/internal/component/pyroscope/scrape/internal/pproflite/pproflite_test.go @@ -14,7 +14,7 @@ import ( "github.com/google/pprof/profile" "github.com/stretchr/testify/require" - "github.com/grafana/agent/component/pyroscope/scrape/internal/pproflite" + "github.com/grafana/agent/internal/component/pyroscope/scrape/internal/pproflite" ) func TestDecoderEncoder(t *testing.T) { diff --git a/component/pyroscope/scrape/internal/pproflite/testdata/heap.pprof b/internal/component/pyroscope/scrape/internal/pproflite/testdata/heap.pprof similarity index 100% rename from component/pyroscope/scrape/internal/pproflite/testdata/heap.pprof rename to internal/component/pyroscope/scrape/internal/pproflite/testdata/heap.pprof diff --git a/component/pyroscope/scrape/manager.go b/internal/component/pyroscope/scrape/manager.go similarity index 97% rename from component/pyroscope/scrape/manager.go rename to internal/component/pyroscope/scrape/manager.go index 016f66b437..7eddeb31cd 100644 --- a/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/agent/component/pyroscope" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/prometheus/discovery/targetgroup" ) diff --git a/component/pyroscope/scrape/manager_test.go b/internal/component/pyroscope/scrape/manager_test.go similarity index 95% rename from component/pyroscope/scrape/manager_test.go rename to internal/component/pyroscope/scrape/manager_test.go index b7d8110ff0..8b56cf2cbc 100644 --- a/component/pyroscope/scrape/manager_test.go +++ b/internal/component/pyroscope/scrape/manager_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/model/labels" diff --git a/component/pyroscope/scrape/scrape.go b/internal/component/pyroscope/scrape/scrape.go similarity index 96% rename from component/pyroscope/scrape/scrape.go rename to internal/component/pyroscope/scrape/scrape.go index 14d532853a..dbb25884b7 100644 --- a/component/pyroscope/scrape/scrape.go +++ b/internal/component/pyroscope/scrape/scrape.go @@ -7,17 +7,17 @@ import ( "sync" "time" - "github.com/grafana/agent/component/pyroscope" + "github.com/grafana/agent/internal/component/pyroscope" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" - "github.com/grafana/agent/component" - component_config "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/scrape" + "github.com/grafana/agent/internal/component" + component_config "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/scrape" ) const ( diff --git a/component/pyroscope/scrape/scrape_loop.go b/internal/component/pyroscope/scrape/scrape_loop.go similarity index 98% rename from component/pyroscope/scrape/scrape_loop.go rename to internal/component/pyroscope/scrape/scrape_loop.go index 76eb93dd1f..8851249927 100644 --- a/component/pyroscope/scrape/scrape_loop.go +++ b/internal/component/pyroscope/scrape/scrape_loop.go @@ -11,9 +11,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component/pyroscope" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" commonconfig "github.com/prometheus/common/config" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/util/pool" diff --git a/component/pyroscope/scrape/scrape_loop_test.go b/internal/component/pyroscope/scrape/scrape_loop_test.go similarity index 98% rename from component/pyroscope/scrape/scrape_loop_test.go rename to internal/component/pyroscope/scrape/scrape_loop_test.go index 0b5b11bbfd..2b2ea5278d 100644 --- a/component/pyroscope/scrape/scrape_loop_test.go +++ b/internal/component/pyroscope/scrape/scrape_loop_test.go @@ -11,9 +11,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/model/labels" diff --git a/component/pyroscope/scrape/scrape_test.go b/internal/component/pyroscope/scrape/scrape_test.go similarity index 95% rename from component/pyroscope/scrape/scrape_test.go rename to internal/component/pyroscope/scrape/scrape_test.go index e6e07a0aeb..719629ed2f 100644 --- a/component/pyroscope/scrape/scrape_test.go +++ b/internal/component/pyroscope/scrape/scrape_test.go @@ -9,12 +9,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/scrape" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/scrape" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/service/cluster" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/component/pyroscope/scrape/target.go b/internal/component/pyroscope/scrape/target.go similarity index 100% rename from component/pyroscope/scrape/target.go rename to internal/component/pyroscope/scrape/target.go diff --git a/component/pyroscope/scrape/target_test.go b/internal/component/pyroscope/scrape/target_test.go similarity index 100% rename from component/pyroscope/scrape/target_test.go rename to internal/component/pyroscope/scrape/target_test.go diff --git a/component/pyroscope/write/metrics.go b/internal/component/pyroscope/write/metrics.go similarity index 100% rename from component/pyroscope/write/metrics.go rename to internal/component/pyroscope/write/metrics.go diff --git a/component/pyroscope/write/write.go b/internal/component/pyroscope/write/write.go similarity index 97% rename from component/pyroscope/write/write.go rename to internal/component/pyroscope/write/write.go index 032f443353..d50cec9bd1 100644 --- a/component/pyroscope/write/write.go +++ b/internal/component/pyroscope/write/write.go @@ -7,19 +7,19 @@ import ( "time" "connectrpc.com/connect" - "github.com/grafana/agent/component/pyroscope" "github.com/grafana/agent/internal/agentseed" + "github.com/grafana/agent/internal/component/pyroscope" "github.com/grafana/agent/internal/featuregate" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" "github.com/oklog/run" commonconfig "github.com/prometheus/common/config" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "go.uber.org/multierr" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/dskit/backoff" pushv1 "github.com/grafana/pyroscope/api/gen/proto/go/push/v1" "github.com/grafana/pyroscope/api/gen/proto/go/push/v1/pushv1connect" diff --git a/component/pyroscope/write/write_test.go b/internal/component/pyroscope/write/write_test.go similarity index 98% rename from component/pyroscope/write/write_test.go rename to internal/component/pyroscope/write/write_test.go index 10032ac138..1a02834440 100644 --- a/component/pyroscope/write/write_test.go +++ b/internal/component/pyroscope/write/write_test.go @@ -10,9 +10,9 @@ import ( "time" "connectrpc.com/connect" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/pyroscope" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/pyroscope" + "github.com/grafana/agent/internal/util" pushv1 "github.com/grafana/pyroscope/api/gen/proto/go/push/v1" "github.com/grafana/pyroscope/api/gen/proto/go/push/v1/pushv1connect" typesv1 "github.com/grafana/pyroscope/api/gen/proto/go/types/v1" diff --git a/component/registry.go b/internal/component/registry.go similarity index 100% rename from component/registry.go rename to internal/component/registry.go diff --git a/component/registry_test.go b/internal/component/registry_test.go similarity index 100% rename from component/registry_test.go rename to internal/component/registry_test.go diff --git a/component/remote/http/http.go b/internal/component/remote/http/http.go similarity index 97% rename from component/remote/http/http.go rename to internal/component/remote/http/http.go index 771182312b..b4a4d87540 100644 --- a/component/remote/http/http.go +++ b/internal/component/remote/http/http.go @@ -11,11 +11,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - common_config "github.com/grafana/agent/component/common/config" + "github.com/grafana/agent/internal/component" + common_config "github.com/grafana/agent/internal/component/common/config" "github.com/grafana/agent/internal/featuregate" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/flow/logging/level" "github.com/grafana/river/rivertypes" prom_config "github.com/prometheus/common/config" ) diff --git a/component/remote/http/http_test.go b/internal/component/remote/http/http_test.go similarity index 94% rename from component/remote/http/http_test.go rename to internal/component/remote/http/http_test.go index e59d7c6e74..003ee8008c 100644 --- a/component/remote/http/http_test.go +++ b/internal/component/remote/http/http_test.go @@ -10,10 +10,10 @@ import ( "testing" "time" - http_component "github.com/grafana/agent/component/remote/http" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/util" + http_component "github.com/grafana/agent/internal/component/remote/http" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/river" "github.com/grafana/river/rivertypes" diff --git a/component/remote/kubernetes/configmap/configmap.go b/internal/component/remote/kubernetes/configmap/configmap.go similarity index 81% rename from component/remote/kubernetes/configmap/configmap.go rename to internal/component/remote/kubernetes/configmap/configmap.go index 14373db90a..bb45426238 100644 --- a/component/remote/kubernetes/configmap/configmap.go +++ b/internal/component/remote/kubernetes/configmap/configmap.go @@ -1,8 +1,8 @@ package configmap import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/remote/kubernetes" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/remote/kubernetes" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/remote/kubernetes/kubernetes.go b/internal/component/remote/kubernetes/kubernetes.go similarity index 98% rename from component/remote/kubernetes/kubernetes.go rename to internal/component/remote/kubernetes/kubernetes.go index 26a42b187d..9e5de1d537 100644 --- a/component/remote/kubernetes/kubernetes.go +++ b/internal/component/remote/kubernetes/kubernetes.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/common/kubernetes" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/common/kubernetes" "github.com/grafana/river/rivertypes" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/component/remote/kubernetes/kubernetes_test.go b/internal/component/remote/kubernetes/kubernetes_test.go similarity index 100% rename from component/remote/kubernetes/kubernetes_test.go rename to internal/component/remote/kubernetes/kubernetes_test.go diff --git a/component/remote/kubernetes/secret/secret.go b/internal/component/remote/kubernetes/secret/secret.go similarity index 81% rename from component/remote/kubernetes/secret/secret.go rename to internal/component/remote/kubernetes/secret/secret.go index e259db1f9d..f7b3d14758 100644 --- a/component/remote/kubernetes/secret/secret.go +++ b/internal/component/remote/kubernetes/secret/secret.go @@ -1,8 +1,8 @@ package secret import ( - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/remote/kubernetes" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/remote/kubernetes" "github.com/grafana/agent/internal/featuregate" ) diff --git a/component/remote/s3/s3.go b/internal/component/remote/s3/s3.go similarity index 99% rename from component/remote/s3/s3.go rename to internal/component/remote/s3/s3.go index 4314a89d6b..b572bd43d0 100644 --- a/component/remote/s3/s3.go +++ b/internal/component/remote/s3/s3.go @@ -12,7 +12,7 @@ import ( "github.com/aws/aws-sdk-go-v2/aws" aws_config "github.com/aws/aws-sdk-go-v2/config" "github.com/aws/aws-sdk-go-v2/service/s3" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/river/rivertypes" "github.com/prometheus/client_golang/prometheus" diff --git a/component/remote/s3/s3_test.go b/internal/component/remote/s3/s3_test.go similarity index 95% rename from component/remote/s3/s3_test.go rename to internal/component/remote/s3/s3_test.go index ea8d443a73..2672f8da3a 100644 --- a/component/remote/s3/s3_test.go +++ b/internal/component/remote/s3/s3_test.go @@ -8,7 +8,7 @@ import ( "github.com/prometheus/client_golang/prometheus" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/stretchr/testify/require" ) diff --git a/component/remote/s3/types.go b/internal/component/remote/s3/types.go similarity index 100% rename from component/remote/s3/types.go rename to internal/component/remote/s3/types.go diff --git a/component/remote/s3/watcher.go b/internal/component/remote/s3/watcher.go similarity index 100% rename from component/remote/s3/watcher.go rename to internal/component/remote/s3/watcher.go diff --git a/component/remote/vault/auth.go b/internal/component/remote/vault/auth.go similarity index 100% rename from component/remote/vault/auth.go rename to internal/component/remote/vault/auth.go diff --git a/component/remote/vault/client.go b/internal/component/remote/vault/client.go similarity index 100% rename from component/remote/vault/client.go rename to internal/component/remote/vault/client.go diff --git a/component/remote/vault/metrics.go b/internal/component/remote/vault/metrics.go similarity index 100% rename from component/remote/vault/metrics.go rename to internal/component/remote/vault/metrics.go diff --git a/component/remote/vault/refresher.go b/internal/component/remote/vault/refresher.go similarity index 98% rename from component/remote/vault/refresher.go rename to internal/component/remote/vault/refresher.go index ef669410c8..e752e1ccc7 100644 --- a/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/agent/component" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/logging/level" vault "github.com/hashicorp/vault/api" "github.com/prometheus/client_golang/prometheus" ) diff --git a/component/remote/vault/ticker.go b/internal/component/remote/vault/ticker.go similarity index 100% rename from component/remote/vault/ticker.go rename to internal/component/remote/vault/ticker.go diff --git a/component/remote/vault/vault.go b/internal/component/remote/vault/vault.go similarity index 98% rename from component/remote/vault/vault.go rename to internal/component/remote/vault/vault.go index ff5f54f271..af6ab0da0b 100644 --- a/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/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/river/rivertypes" "github.com/oklog/run" diff --git a/component/remote/vault/vault_test.go b/internal/component/remote/vault/vault_test.go similarity index 97% rename from component/remote/vault/vault_test.go rename to internal/component/remote/vault/vault_test.go index 746964bb05..09b3170ddf 100644 --- a/component/remote/vault/vault_test.go +++ b/internal/component/remote/vault/vault_test.go @@ -12,8 +12,8 @@ import ( "github.com/docker/go-connections/nat" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/grafana/river/rivertypes" "github.com/stretchr/testify/require" diff --git a/converter/converter.go b/internal/converter/converter.go similarity index 88% rename from converter/converter.go rename to internal/converter/converter.go index c5584950af..3b9cf459bb 100644 --- a/converter/converter.go +++ b/internal/converter/converter.go @@ -5,10 +5,10 @@ package converter import ( "fmt" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/prometheusconvert" - "github.com/grafana/agent/converter/internal/promtailconvert" - "github.com/grafana/agent/converter/internal/staticconvert" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert" + "github.com/grafana/agent/internal/converter/internal/promtailconvert" + "github.com/grafana/agent/internal/converter/internal/staticconvert" ) // Input represents the type of config file being fed into the converter. diff --git a/converter/diag/diagnostic.go b/internal/converter/diag/diagnostic.go similarity index 100% rename from converter/diag/diagnostic.go rename to internal/converter/diag/diagnostic.go diff --git a/converter/diag/diagnostics.go b/internal/converter/diag/diagnostics.go similarity index 100% rename from converter/diag/diagnostics.go rename to internal/converter/diag/diagnostics.go diff --git a/converter/diag/report.go b/internal/converter/diag/report.go similarity index 100% rename from converter/diag/report.go rename to internal/converter/diag/report.go diff --git a/converter/diag/severity.go b/internal/converter/diag/severity.go similarity index 100% rename from converter/diag/severity.go rename to internal/converter/diag/severity.go diff --git a/converter/internal/common/convert_appendable.go b/internal/converter/internal/common/convert_appendable.go similarity index 100% rename from converter/internal/common/convert_appendable.go rename to internal/converter/internal/common/convert_appendable.go diff --git a/converter/internal/common/convert_logs_receiver.go b/internal/converter/internal/common/convert_logs_receiver.go similarity index 92% rename from converter/internal/common/convert_logs_receiver.go rename to internal/converter/internal/common/convert_logs_receiver.go index ef028e35f0..ad08ecb15f 100644 --- a/converter/internal/common/convert_logs_receiver.go +++ b/internal/converter/internal/common/convert_logs_receiver.go @@ -1,7 +1,7 @@ package common import ( - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/river" "github.com/grafana/river/token" "github.com/grafana/river/token/builder" diff --git a/converter/internal/common/convert_targets.go b/internal/converter/internal/common/convert_targets.go similarity index 98% rename from converter/internal/common/convert_targets.go rename to internal/converter/internal/common/convert_targets.go index 8956cc0e20..bd26fb7667 100644 --- a/converter/internal/common/convert_targets.go +++ b/internal/converter/internal/common/convert_targets.go @@ -1,7 +1,7 @@ package common import ( - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" "github.com/grafana/river" "github.com/grafana/river/token" "github.com/grafana/river/token/builder" diff --git a/converter/internal/common/convert_targets_test.go b/internal/converter/internal/common/convert_targets_test.go similarity index 94% rename from converter/internal/common/convert_targets_test.go rename to internal/converter/internal/common/convert_targets_test.go index 9f50b32e83..5a8b4ef793 100644 --- a/converter/internal/common/convert_targets_test.go +++ b/internal/converter/internal/common/convert_targets_test.go @@ -3,8 +3,8 @@ package common_test import ( "testing" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/river/token/builder" "github.com/stretchr/testify/require" ) diff --git a/converter/internal/common/custom_tokenizer.go b/internal/converter/internal/common/custom_tokenizer.go similarity index 100% rename from converter/internal/common/custom_tokenizer.go rename to internal/converter/internal/common/custom_tokenizer.go diff --git a/converter/internal/common/http_client_config.go b/internal/converter/internal/common/http_client_config.go similarity index 97% rename from converter/internal/common/http_client_config.go rename to internal/converter/internal/common/http_client_config.go index 08b5f974e1..93ff1f50df 100644 --- a/converter/internal/common/http_client_config.go +++ b/internal/converter/internal/common/http_client_config.go @@ -3,8 +3,8 @@ package common import ( "reflect" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/river/rivertypes" prom_config "github.com/prometheus/common/config" ) diff --git a/converter/internal/common/river_utils.go b/internal/converter/internal/common/river_utils.go similarity index 94% rename from converter/internal/common/river_utils.go rename to internal/converter/internal/common/river_utils.go index 40b24520fe..eb87be7308 100644 --- a/converter/internal/common/river_utils.go +++ b/internal/converter/internal/common/river_utils.go @@ -10,10 +10,10 @@ import ( "github.com/grafana/river/printer" "github.com/grafana/river/scanner" - "github.com/grafana/agent/component" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/component" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/river/rivertypes" "github.com/grafana/river/token/builder" ) diff --git a/converter/internal/common/river_utils_test.go b/internal/converter/internal/common/river_utils_test.go similarity index 87% rename from converter/internal/common/river_utils_test.go rename to internal/converter/internal/common/river_utils_test.go index 4b60a167cc..8c130420b9 100644 --- a/converter/internal/common/river_utils_test.go +++ b/internal/converter/internal/common/river_utils_test.go @@ -3,7 +3,7 @@ package common_test import ( "testing" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/converter/internal/common/validate.go b/internal/converter/internal/common/validate.go similarity index 97% rename from converter/internal/common/validate.go rename to internal/converter/internal/common/validate.go index 87167822b0..38d5cd65bc 100644 --- a/converter/internal/common/validate.go +++ b/internal/converter/internal/common/validate.go @@ -5,7 +5,7 @@ import ( "reflect" "strings" - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/river/token/builder" ) diff --git a/converter/internal/common/validate_test.go b/internal/converter/internal/common/validate_test.go similarity index 96% rename from converter/internal/common/validate_test.go rename to internal/converter/internal/common/validate_test.go index 6f6ce0dbc6..64b95e4de9 100644 --- a/converter/internal/common/validate_test.go +++ b/internal/converter/internal/common/validate_test.go @@ -4,8 +4,8 @@ import ( "fmt" "testing" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/stretchr/testify/require" ) diff --git a/converter/internal/common/weaveworks_server.go b/internal/converter/internal/common/weaveworks_server.go similarity index 97% rename from converter/internal/common/weaveworks_server.go rename to internal/converter/internal/common/weaveworks_server.go index 5fa665d77e..b0ed5f038a 100644 --- a/converter/internal/common/weaveworks_server.go +++ b/internal/converter/internal/common/weaveworks_server.go @@ -3,8 +3,8 @@ package common import ( "github.com/grafana/dskit/server" - fnet "github.com/grafana/agent/component/common/net" - "github.com/grafana/agent/converter/diag" + fnet "github.com/grafana/agent/internal/component/common/net" + "github.com/grafana/agent/internal/converter/diag" ) func DefaultWeaveWorksServerCfg() server.Config { diff --git a/converter/internal/otelcolconvert/converter.go b/internal/converter/internal/otelcolconvert/converter.go similarity index 99% rename from converter/internal/otelcolconvert/converter.go rename to internal/converter/internal/otelcolconvert/converter.go index ab3934f568..a32ce391bc 100644 --- a/converter/internal/otelcolconvert/converter.go +++ b/internal/converter/internal/otelcolconvert/converter.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/river/token/builder" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/otelcol" diff --git a/converter/internal/otelcolconvert/converter_batchprocessor.go b/internal/converter/internal/otelcolconvert/converter_batchprocessor.go similarity index 87% rename from converter/internal/otelcolconvert/converter_batchprocessor.go rename to internal/converter/internal/otelcolconvert/converter_batchprocessor.go index 30649cbc82..df234aee2f 100644 --- a/converter/internal/otelcolconvert/converter_batchprocessor.go +++ b/internal/converter/internal/otelcolconvert/converter_batchprocessor.go @@ -3,10 +3,10 @@ package otelcolconvert import ( "fmt" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/batch" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/batch" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/processor/batchprocessor" ) diff --git a/converter/internal/otelcolconvert/converter_filterprocessor.go b/internal/converter/internal/otelcolconvert/converter_filterprocessor.go similarity index 88% rename from converter/internal/otelcolconvert/converter_filterprocessor.go rename to internal/converter/internal/otelcolconvert/converter_filterprocessor.go index d1d48939ed..71cb6749d3 100644 --- a/converter/internal/otelcolconvert/converter_filterprocessor.go +++ b/internal/converter/internal/otelcolconvert/converter_filterprocessor.go @@ -3,10 +3,10 @@ package otelcolconvert import ( "fmt" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/filter" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/filter" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/filterprocessor" "go.opentelemetry.io/collector/component" ) diff --git a/converter/internal/otelcolconvert/converter_helpers.go b/internal/converter/internal/otelcolconvert/converter_helpers.go similarity index 97% rename from converter/internal/otelcolconvert/converter_helpers.go rename to internal/converter/internal/otelcolconvert/converter_helpers.go index ff4179333a..dbef1c481a 100644 --- a/converter/internal/otelcolconvert/converter_helpers.go +++ b/internal/converter/internal/otelcolconvert/converter_helpers.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" "github.com/grafana/river/token" "github.com/grafana/river/token/builder" "github.com/mitchellh/mapstructure" diff --git a/converter/internal/otelcolconvert/converter_jaegerreceiver.go b/internal/converter/internal/otelcolconvert/converter_jaegerreceiver.go similarity index 92% rename from converter/internal/otelcolconvert/converter_jaegerreceiver.go rename to internal/converter/internal/otelcolconvert/converter_jaegerreceiver.go index d9980d03b7..c7cb41c5ea 100644 --- a/converter/internal/otelcolconvert/converter_jaegerreceiver.go +++ b/internal/converter/internal/otelcolconvert/converter_jaegerreceiver.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/jaeger" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/jaeger" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/jaegerreceiver" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" diff --git a/converter/internal/otelcolconvert/converter_k8sattributesprocessor.go b/internal/converter/internal/otelcolconvert/converter_k8sattributesprocessor.go similarity index 93% rename from converter/internal/otelcolconvert/converter_k8sattributesprocessor.go rename to internal/converter/internal/otelcolconvert/converter_k8sattributesprocessor.go index 4cf3ffba6d..abd109bbd9 100644 --- a/converter/internal/otelcolconvert/converter_k8sattributesprocessor.go +++ b/internal/converter/internal/otelcolconvert/converter_k8sattributesprocessor.go @@ -3,10 +3,10 @@ package otelcolconvert import ( "fmt" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/k8sattributes" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/k8sattributes" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor" "go.opentelemetry.io/collector/component" ) diff --git a/converter/internal/otelcolconvert/converter_kafkareceiver.go b/internal/converter/internal/otelcolconvert/converter_kafkareceiver.go similarity index 95% rename from converter/internal/otelcolconvert/converter_kafkareceiver.go rename to internal/converter/internal/otelcolconvert/converter_kafkareceiver.go index 94a1b71ca1..ae941514e9 100644 --- a/converter/internal/otelcolconvert/converter_kafkareceiver.go +++ b/internal/converter/internal/otelcolconvert/converter_kafkareceiver.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/davecgh/go-spew/spew" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/kafka" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/kafka" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/river/rivertypes" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/kafkaexporter" diff --git a/converter/internal/otelcolconvert/converter_loadbalancingexporter.go b/internal/converter/internal/otelcolconvert/converter_loadbalancingexporter.go similarity index 93% rename from converter/internal/otelcolconvert/converter_loadbalancingexporter.go rename to internal/converter/internal/otelcolconvert/converter_loadbalancingexporter.go index cb7687e29a..8c542951b7 100644 --- a/converter/internal/otelcolconvert/converter_loadbalancingexporter.go +++ b/internal/converter/internal/otelcolconvert/converter_loadbalancingexporter.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/loadbalancing" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/loadbalancing" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" "go.opentelemetry.io/collector/component" ) diff --git a/converter/internal/otelcolconvert/converter_memorylimiterprocessor.go b/internal/converter/internal/otelcolconvert/converter_memorylimiterprocessor.go similarity index 88% rename from converter/internal/otelcolconvert/converter_memorylimiterprocessor.go rename to internal/converter/internal/otelcolconvert/converter_memorylimiterprocessor.go index 0f851d2461..f870cf4848 100644 --- a/converter/internal/otelcolconvert/converter_memorylimiterprocessor.go +++ b/internal/converter/internal/otelcolconvert/converter_memorylimiterprocessor.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/memorylimiter" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/memorylimiter" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/processor/memorylimiterprocessor" ) diff --git a/converter/internal/otelcolconvert/converter_opencensusreceiver.go b/internal/converter/internal/otelcolconvert/converter_opencensusreceiver.go similarity index 87% rename from converter/internal/otelcolconvert/converter_opencensusreceiver.go rename to internal/converter/internal/otelcolconvert/converter_opencensusreceiver.go index 332f512a74..78ae892ce4 100644 --- a/converter/internal/otelcolconvert/converter_opencensusreceiver.go +++ b/internal/converter/internal/otelcolconvert/converter_opencensusreceiver.go @@ -3,10 +3,10 @@ package otelcolconvert import ( "fmt" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/opencensus" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/opencensus" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/opencensusreceiver" "go.opentelemetry.io/collector/component" ) diff --git a/converter/internal/otelcolconvert/converter_otlpexporter.go b/internal/converter/internal/otelcolconvert/converter_otlpexporter.go similarity index 93% rename from converter/internal/otelcolconvert/converter_otlpexporter.go rename to internal/converter/internal/otelcolconvert/converter_otlpexporter.go index f4e1e8e100..30b7c18ce5 100644 --- a/converter/internal/otelcolconvert/converter_otlpexporter.go +++ b/internal/converter/internal/otelcolconvert/converter_otlpexporter.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/otlp" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/otlp" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" "go.opentelemetry.io/collector/config/configopaque" diff --git a/converter/internal/otelcolconvert/converter_otlphttpexporter.go b/internal/converter/internal/otelcolconvert/converter_otlphttpexporter.go similarity index 91% rename from converter/internal/otelcolconvert/converter_otlphttpexporter.go rename to internal/converter/internal/otelcolconvert/converter_otlphttpexporter.go index af85643624..22a8f6555e 100644 --- a/converter/internal/otelcolconvert/converter_otlphttpexporter.go +++ b/internal/converter/internal/otelcolconvert/converter_otlphttpexporter.go @@ -5,10 +5,10 @@ import ( "time" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/exporter/otlphttp" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/exporter/otlphttp" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/confighttp" "go.opentelemetry.io/collector/exporter/otlphttpexporter" diff --git a/converter/internal/otelcolconvert/converter_otlpreceiver.go b/internal/converter/internal/otelcolconvert/converter_otlpreceiver.go similarity index 95% rename from converter/internal/otelcolconvert/converter_otlpreceiver.go rename to internal/converter/internal/otelcolconvert/converter_otlpreceiver.go index a46a96c727..6bbb1d7526 100644 --- a/converter/internal/otelcolconvert/converter_otlpreceiver.go +++ b/internal/converter/internal/otelcolconvert/converter_otlpreceiver.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/otlp" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/otlp" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/river/rivertypes" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configgrpc" diff --git a/converter/internal/otelcolconvert/converter_probabilisticsamplerprocessor.go b/internal/converter/internal/otelcolconvert/converter_probabilisticsamplerprocessor.go similarity index 87% rename from converter/internal/otelcolconvert/converter_probabilisticsamplerprocessor.go rename to internal/converter/internal/otelcolconvert/converter_probabilisticsamplerprocessor.go index 32a81192a3..de800410ae 100644 --- a/converter/internal/otelcolconvert/converter_probabilisticsamplerprocessor.go +++ b/internal/converter/internal/otelcolconvert/converter_probabilisticsamplerprocessor.go @@ -3,10 +3,10 @@ package otelcolconvert import ( "fmt" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/probabilistic_sampler" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/probabilistic_sampler" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/probabilisticsamplerprocessor" "go.opentelemetry.io/collector/component" ) diff --git a/converter/internal/otelcolconvert/converter_spanprocessor.go b/internal/converter/internal/otelcolconvert/converter_spanprocessor.go similarity index 94% rename from converter/internal/otelcolconvert/converter_spanprocessor.go rename to internal/converter/internal/otelcolconvert/converter_spanprocessor.go index bee3039085..6604fc9601 100644 --- a/converter/internal/otelcolconvert/converter_spanprocessor.go +++ b/internal/converter/internal/otelcolconvert/converter_spanprocessor.go @@ -3,10 +3,10 @@ package otelcolconvert import ( "fmt" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/span" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/span" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/spanprocessor" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/pdata/plog" diff --git a/converter/internal/otelcolconvert/converter_tailsamplingprocessor.go b/internal/converter/internal/otelcolconvert/converter_tailsamplingprocessor.go similarity index 97% rename from converter/internal/otelcolconvert/converter_tailsamplingprocessor.go rename to internal/converter/internal/otelcolconvert/converter_tailsamplingprocessor.go index 350963f59c..1bd2828c5f 100644 --- a/converter/internal/otelcolconvert/converter_tailsamplingprocessor.go +++ b/internal/converter/internal/otelcolconvert/converter_tailsamplingprocessor.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/davecgh/go-spew/spew" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/processor/tail_sampling" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/processor/tail_sampling" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/processor/tailsamplingprocessor" "go.opentelemetry.io/collector/component" ) diff --git a/converter/internal/otelcolconvert/converter_zipkinreceiver.go b/internal/converter/internal/otelcolconvert/converter_zipkinreceiver.go similarity index 85% rename from converter/internal/otelcolconvert/converter_zipkinreceiver.go rename to internal/converter/internal/otelcolconvert/converter_zipkinreceiver.go index 20ec5aecc8..66c0f7d52e 100644 --- a/converter/internal/otelcolconvert/converter_zipkinreceiver.go +++ b/internal/converter/internal/otelcolconvert/converter_zipkinreceiver.go @@ -3,10 +3,10 @@ package otelcolconvert import ( "fmt" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/component/otelcol/receiver/zipkin" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol/receiver/zipkin" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/open-telemetry/opentelemetry-collector-contrib/receiver/zipkinreceiver" "go.opentelemetry.io/collector/component" ) diff --git a/converter/internal/otelcolconvert/otelcolconvert.go b/internal/converter/internal/otelcolconvert/otelcolconvert.go similarity index 98% rename from converter/internal/otelcolconvert/otelcolconvert.go rename to internal/converter/internal/otelcolconvert/otelcolconvert.go index a2bb082400..768c9b3e5d 100644 --- a/converter/internal/otelcolconvert/otelcolconvert.go +++ b/internal/converter/internal/otelcolconvert/otelcolconvert.go @@ -5,8 +5,8 @@ import ( "context" "fmt" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/river/token/builder" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" diff --git a/converter/internal/otelcolconvert/otelcolconvert_test.go b/internal/converter/internal/otelcolconvert/otelcolconvert_test.go similarity index 77% rename from converter/internal/otelcolconvert/otelcolconvert_test.go rename to internal/converter/internal/otelcolconvert/otelcolconvert_test.go index d1d1000e0f..570a5dc08a 100644 --- a/converter/internal/otelcolconvert/otelcolconvert_test.go +++ b/internal/converter/internal/otelcolconvert/otelcolconvert_test.go @@ -3,8 +3,8 @@ package otelcolconvert_test import ( "testing" - "github.com/grafana/agent/converter/internal/otelcolconvert" - "github.com/grafana/agent/converter/internal/test_common" + "github.com/grafana/agent/internal/converter/internal/otelcolconvert" + "github.com/grafana/agent/internal/converter/internal/test_common" ) func TestConvert(t *testing.T) { diff --git a/converter/internal/otelcolconvert/pipeline_group.go b/internal/converter/internal/otelcolconvert/pipeline_group.go similarity index 100% rename from converter/internal/otelcolconvert/pipeline_group.go rename to internal/converter/internal/otelcolconvert/pipeline_group.go diff --git a/converter/internal/otelcolconvert/testdata/batch.river b/internal/converter/internal/otelcolconvert/testdata/batch.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/batch.river rename to internal/converter/internal/otelcolconvert/testdata/batch.river diff --git a/converter/internal/otelcolconvert/testdata/batch.yaml b/internal/converter/internal/otelcolconvert/testdata/batch.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/batch.yaml rename to internal/converter/internal/otelcolconvert/testdata/batch.yaml diff --git a/converter/internal/otelcolconvert/testdata/filter.river b/internal/converter/internal/otelcolconvert/testdata/filter.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/filter.river rename to internal/converter/internal/otelcolconvert/testdata/filter.river diff --git a/converter/internal/otelcolconvert/testdata/filter.yaml b/internal/converter/internal/otelcolconvert/testdata/filter.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/filter.yaml rename to internal/converter/internal/otelcolconvert/testdata/filter.yaml diff --git a/converter/internal/otelcolconvert/testdata/jaeger.river b/internal/converter/internal/otelcolconvert/testdata/jaeger.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/jaeger.river rename to internal/converter/internal/otelcolconvert/testdata/jaeger.river diff --git a/converter/internal/otelcolconvert/testdata/jaeger.yaml b/internal/converter/internal/otelcolconvert/testdata/jaeger.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/jaeger.yaml rename to internal/converter/internal/otelcolconvert/testdata/jaeger.yaml diff --git a/converter/internal/otelcolconvert/testdata/k8sattributes.river b/internal/converter/internal/otelcolconvert/testdata/k8sattributes.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/k8sattributes.river rename to internal/converter/internal/otelcolconvert/testdata/k8sattributes.river diff --git a/converter/internal/otelcolconvert/testdata/k8sattributes.yaml b/internal/converter/internal/otelcolconvert/testdata/k8sattributes.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/k8sattributes.yaml rename to internal/converter/internal/otelcolconvert/testdata/k8sattributes.yaml diff --git a/converter/internal/otelcolconvert/testdata/kafka.river b/internal/converter/internal/otelcolconvert/testdata/kafka.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/kafka.river rename to internal/converter/internal/otelcolconvert/testdata/kafka.river diff --git a/converter/internal/otelcolconvert/testdata/kafka.yaml b/internal/converter/internal/otelcolconvert/testdata/kafka.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/kafka.yaml rename to internal/converter/internal/otelcolconvert/testdata/kafka.yaml diff --git a/converter/internal/otelcolconvert/testdata/loadbalancing.river b/internal/converter/internal/otelcolconvert/testdata/loadbalancing.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/loadbalancing.river rename to internal/converter/internal/otelcolconvert/testdata/loadbalancing.river diff --git a/converter/internal/otelcolconvert/testdata/loadbalancing.yaml b/internal/converter/internal/otelcolconvert/testdata/loadbalancing.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/loadbalancing.yaml rename to internal/converter/internal/otelcolconvert/testdata/loadbalancing.yaml diff --git a/converter/internal/otelcolconvert/testdata/memorylimiter.river b/internal/converter/internal/otelcolconvert/testdata/memorylimiter.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/memorylimiter.river rename to internal/converter/internal/otelcolconvert/testdata/memorylimiter.river diff --git a/converter/internal/otelcolconvert/testdata/memorylimiter.yaml b/internal/converter/internal/otelcolconvert/testdata/memorylimiter.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/memorylimiter.yaml rename to internal/converter/internal/otelcolconvert/testdata/memorylimiter.yaml diff --git a/converter/internal/otelcolconvert/testdata/opencensus.river b/internal/converter/internal/otelcolconvert/testdata/opencensus.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/opencensus.river rename to internal/converter/internal/otelcolconvert/testdata/opencensus.river diff --git a/converter/internal/otelcolconvert/testdata/opencensus.yaml b/internal/converter/internal/otelcolconvert/testdata/opencensus.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/opencensus.yaml rename to internal/converter/internal/otelcolconvert/testdata/opencensus.yaml diff --git a/converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.diags b/internal/converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.diags similarity index 100% rename from converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.diags rename to internal/converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.diags diff --git a/converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.yaml b/internal/converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.yaml rename to internal/converter/internal/otelcolconvert/testdata/otelcol_errors/corrupt_config.yaml diff --git a/converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.diags b/internal/converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.diags similarity index 100% rename from converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.diags rename to internal/converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.diags diff --git a/converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.yaml b/internal/converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.yaml rename to internal/converter/internal/otelcolconvert/testdata/otelcol_errors/duplicate_receivers.yaml diff --git a/converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.diags b/internal/converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.diags similarity index 100% rename from converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.diags rename to internal/converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.diags diff --git a/converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.yaml b/internal/converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.yaml rename to internal/converter/internal/otelcolconvert/testdata/otelcol_errors/invalid_config.yaml diff --git a/converter/internal/otelcolconvert/testdata/otlp.river b/internal/converter/internal/otelcolconvert/testdata/otlp.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/otlp.river rename to internal/converter/internal/otelcolconvert/testdata/otlp.river diff --git a/converter/internal/otelcolconvert/testdata/otlp.yaml b/internal/converter/internal/otelcolconvert/testdata/otlp.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/otlp.yaml rename to internal/converter/internal/otelcolconvert/testdata/otlp.yaml diff --git a/converter/internal/otelcolconvert/testdata/otlphttp.river b/internal/converter/internal/otelcolconvert/testdata/otlphttp.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/otlphttp.river rename to internal/converter/internal/otelcolconvert/testdata/otlphttp.river diff --git a/converter/internal/otelcolconvert/testdata/otlphttp.yaml b/internal/converter/internal/otelcolconvert/testdata/otlphttp.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/otlphttp.yaml rename to internal/converter/internal/otelcolconvert/testdata/otlphttp.yaml diff --git a/converter/internal/otelcolconvert/testdata/probabilistic_sampler.river b/internal/converter/internal/otelcolconvert/testdata/probabilistic_sampler.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/probabilistic_sampler.river rename to internal/converter/internal/otelcolconvert/testdata/probabilistic_sampler.river diff --git a/converter/internal/otelcolconvert/testdata/probabilistic_sampler.yaml b/internal/converter/internal/otelcolconvert/testdata/probabilistic_sampler.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/probabilistic_sampler.yaml rename to internal/converter/internal/otelcolconvert/testdata/probabilistic_sampler.yaml diff --git a/converter/internal/otelcolconvert/testdata/span.river b/internal/converter/internal/otelcolconvert/testdata/span.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/span.river rename to internal/converter/internal/otelcolconvert/testdata/span.river diff --git a/converter/internal/otelcolconvert/testdata/span.yaml b/internal/converter/internal/otelcolconvert/testdata/span.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/span.yaml rename to internal/converter/internal/otelcolconvert/testdata/span.yaml diff --git a/converter/internal/otelcolconvert/testdata/span_full.river b/internal/converter/internal/otelcolconvert/testdata/span_full.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/span_full.river rename to internal/converter/internal/otelcolconvert/testdata/span_full.river diff --git a/converter/internal/otelcolconvert/testdata/span_full.yaml b/internal/converter/internal/otelcolconvert/testdata/span_full.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/span_full.yaml rename to internal/converter/internal/otelcolconvert/testdata/span_full.yaml diff --git a/converter/internal/otelcolconvert/testdata/tail_sampling.river b/internal/converter/internal/otelcolconvert/testdata/tail_sampling.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/tail_sampling.river rename to internal/converter/internal/otelcolconvert/testdata/tail_sampling.river diff --git a/converter/internal/otelcolconvert/testdata/tail_sampling.yaml b/internal/converter/internal/otelcolconvert/testdata/tail_sampling.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/tail_sampling.yaml rename to internal/converter/internal/otelcolconvert/testdata/tail_sampling.yaml diff --git a/converter/internal/otelcolconvert/testdata/zipkin.river b/internal/converter/internal/otelcolconvert/testdata/zipkin.river similarity index 100% rename from converter/internal/otelcolconvert/testdata/zipkin.river rename to internal/converter/internal/otelcolconvert/testdata/zipkin.river diff --git a/converter/internal/otelcolconvert/testdata/zipkin.yaml b/internal/converter/internal/otelcolconvert/testdata/zipkin.yaml similarity index 100% rename from converter/internal/otelcolconvert/testdata/zipkin.yaml rename to internal/converter/internal/otelcolconvert/testdata/zipkin.yaml diff --git a/converter/internal/otelcolconvert/utils.go b/internal/converter/internal/otelcolconvert/utils.go similarity index 100% rename from converter/internal/otelcolconvert/utils.go rename to internal/converter/internal/otelcolconvert/utils.go diff --git a/converter/internal/prometheusconvert/build/prometheus_blocks.go b/internal/converter/internal/prometheusconvert/build/prometheus_blocks.go similarity index 98% rename from converter/internal/prometheusconvert/build/prometheus_blocks.go rename to internal/converter/internal/prometheusconvert/build/prometheus_blocks.go index 076045f322..adbe26077f 100644 --- a/converter/internal/prometheusconvert/build/prometheus_blocks.go +++ b/internal/converter/internal/prometheusconvert/build/prometheus_blocks.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/river/token/builder" ) diff --git a/converter/internal/prometheusconvert/component/azure.go b/internal/converter/internal/prometheusconvert/component/azure.go similarity index 86% rename from converter/internal/prometheusconvert/component/azure.go rename to internal/converter/internal/prometheusconvert/component/azure.go index 7f868fe54b..92c3945f4e 100644 --- a/converter/internal/prometheusconvert/component/azure.go +++ b/internal/converter/internal/prometheusconvert/component/azure.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/azure" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/azure" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_azure "github.com/prometheus/prometheus/discovery/azure" ) diff --git a/converter/internal/prometheusconvert/component/consul.go b/internal/converter/internal/prometheusconvert/component/consul.go similarity index 83% rename from converter/internal/prometheusconvert/component/consul.go rename to internal/converter/internal/prometheusconvert/component/consul.go index dc738869e8..6dcaa457ab 100644 --- a/converter/internal/prometheusconvert/component/consul.go +++ b/internal/converter/internal/prometheusconvert/component/consul.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/consul" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/consul" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_consul "github.com/prometheus/prometheus/discovery/consul" ) diff --git a/converter/internal/prometheusconvert/component/digitalocean.go b/internal/converter/internal/prometheusconvert/component/digitalocean.go similarity index 87% rename from converter/internal/prometheusconvert/component/digitalocean.go rename to internal/converter/internal/prometheusconvert/component/digitalocean.go index 6cbdae5a95..f6ec587162 100644 --- a/converter/internal/prometheusconvert/component/digitalocean.go +++ b/internal/converter/internal/prometheusconvert/component/digitalocean.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/digitalocean" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/digitalocean" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_config "github.com/prometheus/common/config" prom_digitalocean "github.com/prometheus/prometheus/discovery/digitalocean" diff --git a/converter/internal/prometheusconvert/component/dns.go b/internal/converter/internal/prometheusconvert/component/dns.go similarity index 75% rename from converter/internal/prometheusconvert/component/dns.go rename to internal/converter/internal/prometheusconvert/component/dns.go index c22624015a..995d57d10f 100644 --- a/converter/internal/prometheusconvert/component/dns.go +++ b/internal/converter/internal/prometheusconvert/component/dns.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/dns" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/dns" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_dns "github.com/prometheus/prometheus/discovery/dns" ) diff --git a/converter/internal/prometheusconvert/component/docker.go b/internal/converter/internal/prometheusconvert/component/docker.go similarity index 82% rename from converter/internal/prometheusconvert/component/docker.go rename to internal/converter/internal/prometheusconvert/component/docker.go index 3dd4faa306..8523d39484 100644 --- a/converter/internal/prometheusconvert/component/docker.go +++ b/internal/converter/internal/prometheusconvert/component/docker.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/docker" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/docker" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_moby "github.com/prometheus/prometheus/discovery/moby" ) diff --git a/converter/internal/prometheusconvert/component/dockerswarm.go b/internal/converter/internal/prometheusconvert/component/dockerswarm.go similarity index 84% rename from converter/internal/prometheusconvert/component/dockerswarm.go rename to internal/converter/internal/prometheusconvert/component/dockerswarm.go index 18af10be48..46d4ce9af3 100644 --- a/converter/internal/prometheusconvert/component/dockerswarm.go +++ b/internal/converter/internal/prometheusconvert/component/dockerswarm.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/dockerswarm" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/dockerswarm" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_moby "github.com/prometheus/prometheus/discovery/moby" ) diff --git a/converter/internal/prometheusconvert/component/ec2.go b/internal/converter/internal/prometheusconvert/component/ec2.go similarity index 83% rename from converter/internal/prometheusconvert/component/ec2.go rename to internal/converter/internal/prometheusconvert/component/ec2.go index 5edf6ec0ba..3a38c55084 100644 --- a/converter/internal/prometheusconvert/component/ec2.go +++ b/internal/converter/internal/prometheusconvert/component/ec2.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/aws" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/aws" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_aws "github.com/prometheus/prometheus/discovery/aws" ) diff --git a/converter/internal/prometheusconvert/component/file.go b/internal/converter/internal/prometheusconvert/component/file.go similarity index 74% rename from converter/internal/prometheusconvert/component/file.go rename to internal/converter/internal/prometheusconvert/component/file.go index 9d5f606ab6..0ff6f32fc6 100644 --- a/converter/internal/prometheusconvert/component/file.go +++ b/internal/converter/internal/prometheusconvert/component/file.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/file" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/file" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_file "github.com/prometheus/prometheus/discovery/file" ) diff --git a/converter/internal/prometheusconvert/component/gce.go b/internal/converter/internal/prometheusconvert/component/gce.go similarity index 76% rename from converter/internal/prometheusconvert/component/gce.go rename to internal/converter/internal/prometheusconvert/component/gce.go index 0a40d936c1..755dab6995 100644 --- a/converter/internal/prometheusconvert/component/gce.go +++ b/internal/converter/internal/prometheusconvert/component/gce.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/gce" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/gce" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_gce "github.com/prometheus/prometheus/discovery/gce" ) diff --git a/converter/internal/prometheusconvert/component/http.go b/internal/converter/internal/prometheusconvert/component/http.go similarity index 75% rename from converter/internal/prometheusconvert/component/http.go rename to internal/converter/internal/prometheusconvert/component/http.go index 5a6fde97fc..5a39a97657 100644 --- a/converter/internal/prometheusconvert/component/http.go +++ b/internal/converter/internal/prometheusconvert/component/http.go @@ -4,12 +4,12 @@ import ( "net/url" "time" - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/http" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/http" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_http "github.com/prometheus/prometheus/discovery/http" ) diff --git a/converter/internal/prometheusconvert/component/ionos.go b/internal/converter/internal/prometheusconvert/component/ionos.go similarity index 77% rename from converter/internal/prometheusconvert/component/ionos.go rename to internal/converter/internal/prometheusconvert/component/ionos.go index bcb094c866..76a34c587a 100644 --- a/converter/internal/prometheusconvert/component/ionos.go +++ b/internal/converter/internal/prometheusconvert/component/ionos.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/ionos" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/ionos" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_ionos "github.com/prometheus/prometheus/discovery/ionos" ) diff --git a/converter/internal/prometheusconvert/component/kubernetes.go b/internal/converter/internal/prometheusconvert/component/kubernetes.go similarity index 84% rename from converter/internal/prometheusconvert/component/kubernetes.go rename to internal/converter/internal/prometheusconvert/component/kubernetes.go index bae0eb8c7d..bd3595dc6e 100644 --- a/converter/internal/prometheusconvert/component/kubernetes.go +++ b/internal/converter/internal/prometheusconvert/component/kubernetes.go @@ -1,12 +1,12 @@ package component import ( - "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/kubernetes" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/kubernetes" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_kubernetes "github.com/prometheus/prometheus/discovery/kubernetes" ) diff --git a/converter/internal/prometheusconvert/component/kuma.go b/internal/converter/internal/prometheusconvert/component/kuma.go similarity index 77% rename from converter/internal/prometheusconvert/component/kuma.go rename to internal/converter/internal/prometheusconvert/component/kuma.go index 0687edc15e..6de9b6a26e 100644 --- a/converter/internal/prometheusconvert/component/kuma.go +++ b/internal/converter/internal/prometheusconvert/component/kuma.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/kuma" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/kuma" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_kuma "github.com/prometheus/prometheus/discovery/xds" ) diff --git a/converter/internal/prometheusconvert/component/lightsail.go b/internal/converter/internal/prometheusconvert/component/lightsail.go similarity index 81% rename from converter/internal/prometheusconvert/component/lightsail.go rename to internal/converter/internal/prometheusconvert/component/lightsail.go index 9a97c2f506..209e259f8a 100644 --- a/converter/internal/prometheusconvert/component/lightsail.go +++ b/internal/converter/internal/prometheusconvert/component/lightsail.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/aws" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/aws" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_aws "github.com/prometheus/prometheus/discovery/aws" ) diff --git a/converter/internal/prometheusconvert/component/linode.go b/internal/converter/internal/prometheusconvert/component/linode.go similarity index 77% rename from converter/internal/prometheusconvert/component/linode.go rename to internal/converter/internal/prometheusconvert/component/linode.go index 145d3dd0ad..42d00efc03 100644 --- a/converter/internal/prometheusconvert/component/linode.go +++ b/internal/converter/internal/prometheusconvert/component/linode.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/linode" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/linode" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_linode "github.com/prometheus/prometheus/discovery/linode" ) diff --git a/converter/internal/prometheusconvert/component/marathon.go b/internal/converter/internal/prometheusconvert/component/marathon.go similarity index 79% rename from converter/internal/prometheusconvert/component/marathon.go rename to internal/converter/internal/prometheusconvert/component/marathon.go index 57fd118e1e..9090685eb0 100644 --- a/converter/internal/prometheusconvert/component/marathon.go +++ b/internal/converter/internal/prometheusconvert/component/marathon.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/marathon" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/marathon" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_marathon "github.com/prometheus/prometheus/discovery/marathon" ) diff --git a/converter/internal/prometheusconvert/component/nerve.go b/internal/converter/internal/prometheusconvert/component/nerve.go similarity index 74% rename from converter/internal/prometheusconvert/component/nerve.go rename to internal/converter/internal/prometheusconvert/component/nerve.go index 015eb2d27f..499228a3ad 100644 --- a/converter/internal/prometheusconvert/component/nerve.go +++ b/internal/converter/internal/prometheusconvert/component/nerve.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/nerve" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/nerve" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_nerve "github.com/prometheus/prometheus/discovery/zookeeper" ) diff --git a/converter/internal/prometheusconvert/component/openstack.go b/internal/converter/internal/prometheusconvert/component/openstack.go similarity index 85% rename from converter/internal/prometheusconvert/component/openstack.go rename to internal/converter/internal/prometheusconvert/component/openstack.go index 27d719b9df..1e393e4490 100644 --- a/converter/internal/prometheusconvert/component/openstack.go +++ b/internal/converter/internal/prometheusconvert/component/openstack.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/openstack" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/openstack" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_openstack "github.com/prometheus/prometheus/discovery/openstack" ) diff --git a/converter/internal/prometheusconvert/component/ovhcloud.go b/internal/converter/internal/prometheusconvert/component/ovhcloud.go similarity index 79% rename from converter/internal/prometheusconvert/component/ovhcloud.go rename to internal/converter/internal/prometheusconvert/component/ovhcloud.go index f4a59fd525..9aad579c6c 100644 --- a/converter/internal/prometheusconvert/component/ovhcloud.go +++ b/internal/converter/internal/prometheusconvert/component/ovhcloud.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/ovhcloud" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/ovhcloud" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_discovery "github.com/prometheus/prometheus/discovery/ovhcloud" ) diff --git a/converter/internal/prometheusconvert/component/relabel.go b/internal/converter/internal/prometheusconvert/component/relabel.go similarity index 87% rename from converter/internal/prometheusconvert/component/relabel.go rename to internal/converter/internal/prometheusconvert/component/relabel.go index a3bee3c6b7..3102bb576d 100644 --- a/converter/internal/prometheusconvert/component/relabel.go +++ b/internal/converter/internal/prometheusconvert/component/relabel.go @@ -3,12 +3,12 @@ package component import ( "fmt" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/discovery" - disc_relabel "github.com/grafana/agent/component/discovery/relabel" - "github.com/grafana/agent/component/prometheus/relabel" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/discovery" + disc_relabel "github.com/grafana/agent/internal/component/discovery/relabel" + "github.com/grafana/agent/internal/component/prometheus/relabel" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_relabel "github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/storage" ) diff --git a/converter/internal/prometheusconvert/component/remote_write.go b/internal/converter/internal/prometheusconvert/component/remote_write.go similarity index 94% rename from converter/internal/prometheusconvert/component/remote_write.go rename to internal/converter/internal/prometheusconvert/component/remote_write.go index 37c4c6814a..86efa78fe5 100644 --- a/converter/internal/prometheusconvert/component/remote_write.go +++ b/internal/converter/internal/prometheusconvert/component/remote_write.go @@ -5,10 +5,10 @@ import ( "strings" "time" - "github.com/grafana/agent/component/prometheus/remotewrite" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/prometheus/remotewrite" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/sigv4" prom_config "github.com/prometheus/prometheus/config" diff --git a/converter/internal/prometheusconvert/component/scaleway.go b/internal/converter/internal/prometheusconvert/component/scaleway.go similarity index 83% rename from converter/internal/prometheusconvert/component/scaleway.go rename to internal/converter/internal/prometheusconvert/component/scaleway.go index 79b5aa1522..f0528baa3f 100644 --- a/converter/internal/prometheusconvert/component/scaleway.go +++ b/internal/converter/internal/prometheusconvert/component/scaleway.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/scaleway" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/scaleway" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/river/rivertypes" prom_scaleway "github.com/prometheus/prometheus/discovery/scaleway" ) diff --git a/converter/internal/prometheusconvert/component/scrape.go b/internal/converter/internal/prometheusconvert/component/scrape.go similarity index 91% rename from converter/internal/prometheusconvert/component/scrape.go rename to internal/converter/internal/prometheusconvert/component/scrape.go index f69f3efa96..c22b8470da 100644 --- a/converter/internal/prometheusconvert/component/scrape.go +++ b/internal/converter/internal/prometheusconvert/component/scrape.go @@ -7,12 +7,12 @@ import ( "golang.org/x/exp/maps" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/scrape" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/scrape" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/service/cluster" prom_config "github.com/prometheus/prometheus/config" prom_discovery "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/storage" diff --git a/converter/internal/prometheusconvert/component/serverset.go b/internal/converter/internal/prometheusconvert/component/serverset.go similarity index 74% rename from converter/internal/prometheusconvert/component/serverset.go rename to internal/converter/internal/prometheusconvert/component/serverset.go index 6b3241ce9d..6cea232a09 100644 --- a/converter/internal/prometheusconvert/component/serverset.go +++ b/internal/converter/internal/prometheusconvert/component/serverset.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/serverset" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/serverset" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_zk "github.com/prometheus/prometheus/discovery/zookeeper" ) diff --git a/converter/internal/prometheusconvert/component/service_discovery.go b/internal/converter/internal/prometheusconvert/component/service_discovery.go similarity index 96% rename from converter/internal/prometheusconvert/component/service_discovery.go rename to internal/converter/internal/prometheusconvert/component/service_discovery.go index 69c179f1ef..566af1ef56 100644 --- a/converter/internal/prometheusconvert/component/service_discovery.go +++ b/internal/converter/internal/prometheusconvert/component/service_discovery.go @@ -3,10 +3,10 @@ package component import ( "fmt" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_discover "github.com/prometheus/prometheus/discovery" prom_http "github.com/prometheus/prometheus/discovery/http" diff --git a/converter/internal/prometheusconvert/component/triton.go b/internal/converter/internal/prometheusconvert/component/triton.go similarity index 79% rename from converter/internal/prometheusconvert/component/triton.go rename to internal/converter/internal/prometheusconvert/component/triton.go index 4f1bf2e299..4868327ca3 100644 --- a/converter/internal/prometheusconvert/component/triton.go +++ b/internal/converter/internal/prometheusconvert/component/triton.go @@ -3,11 +3,11 @@ package component import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/triton" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/triton" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prom_triton "github.com/prometheus/prometheus/discovery/triton" ) diff --git a/converter/internal/prometheusconvert/prometheusconvert.go b/internal/converter/internal/prometheusconvert/prometheusconvert.go similarity index 92% rename from converter/internal/prometheusconvert/prometheusconvert.go rename to internal/converter/internal/prometheusconvert/prometheusconvert.go index 7c81082301..e5cdd84b4e 100644 --- a/converter/internal/prometheusconvert/prometheusconvert.go +++ b/internal/converter/internal/prometheusconvert/prometheusconvert.go @@ -5,12 +5,12 @@ import ( "fmt" "github.com/go-kit/log" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/remotewrite" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" - "github.com/grafana/agent/converter/internal/prometheusconvert/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/remotewrite" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/component" prom_config "github.com/prometheus/prometheus/config" prom_discover "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/storage" diff --git a/internal/converter/internal/prometheusconvert/prometheusconvert_test.go b/internal/converter/internal/prometheusconvert/prometheusconvert_test.go new file mode 100644 index 0000000000..0e7b88fd35 --- /dev/null +++ b/internal/converter/internal/prometheusconvert/prometheusconvert_test.go @@ -0,0 +1,13 @@ +package prometheusconvert_test + +import ( + "testing" + + "github.com/grafana/agent/internal/converter/internal/prometheusconvert" + "github.com/grafana/agent/internal/converter/internal/test_common" + _ "github.com/grafana/agent/internal/static/metrics/instance" +) + +func TestConvert(t *testing.T) { + test_common.TestDirectory(t, "testdata", ".yaml", true, []string{}, prometheusconvert.Convert) +} diff --git a/converter/internal/prometheusconvert/testdata/azure.river b/internal/converter/internal/prometheusconvert/testdata/azure.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/azure.river rename to internal/converter/internal/prometheusconvert/testdata/azure.river diff --git a/converter/internal/prometheusconvert/testdata/azure.yaml b/internal/converter/internal/prometheusconvert/testdata/azure.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/azure.yaml rename to internal/converter/internal/prometheusconvert/testdata/azure.yaml diff --git a/converter/internal/prometheusconvert/testdata/bad_config.diags b/internal/converter/internal/prometheusconvert/testdata/bad_config.diags similarity index 100% rename from converter/internal/prometheusconvert/testdata/bad_config.diags rename to internal/converter/internal/prometheusconvert/testdata/bad_config.diags diff --git a/converter/internal/prometheusconvert/testdata/bad_config.yaml b/internal/converter/internal/prometheusconvert/testdata/bad_config.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/bad_config.yaml rename to internal/converter/internal/prometheusconvert/testdata/bad_config.yaml diff --git a/converter/internal/prometheusconvert/testdata/broken_yaml.diags b/internal/converter/internal/prometheusconvert/testdata/broken_yaml.diags similarity index 100% rename from converter/internal/prometheusconvert/testdata/broken_yaml.diags rename to internal/converter/internal/prometheusconvert/testdata/broken_yaml.diags diff --git a/converter/internal/prometheusconvert/testdata/broken_yaml.yaml b/internal/converter/internal/prometheusconvert/testdata/broken_yaml.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/broken_yaml.yaml rename to internal/converter/internal/prometheusconvert/testdata/broken_yaml.yaml diff --git a/converter/internal/prometheusconvert/testdata/consul.river b/internal/converter/internal/prometheusconvert/testdata/consul.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/consul.river rename to internal/converter/internal/prometheusconvert/testdata/consul.river diff --git a/converter/internal/prometheusconvert/testdata/consul.yaml b/internal/converter/internal/prometheusconvert/testdata/consul.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/consul.yaml rename to internal/converter/internal/prometheusconvert/testdata/consul.yaml diff --git a/converter/internal/prometheusconvert/testdata/digitalocean.diags b/internal/converter/internal/prometheusconvert/testdata/digitalocean.diags similarity index 100% rename from converter/internal/prometheusconvert/testdata/digitalocean.diags rename to internal/converter/internal/prometheusconvert/testdata/digitalocean.diags diff --git a/converter/internal/prometheusconvert/testdata/digitalocean.river b/internal/converter/internal/prometheusconvert/testdata/digitalocean.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/digitalocean.river rename to internal/converter/internal/prometheusconvert/testdata/digitalocean.river diff --git a/converter/internal/prometheusconvert/testdata/digitalocean.yaml b/internal/converter/internal/prometheusconvert/testdata/digitalocean.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/digitalocean.yaml rename to internal/converter/internal/prometheusconvert/testdata/digitalocean.yaml diff --git a/converter/internal/prometheusconvert/testdata/discovery.river b/internal/converter/internal/prometheusconvert/testdata/discovery.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/discovery.river rename to internal/converter/internal/prometheusconvert/testdata/discovery.river diff --git a/converter/internal/prometheusconvert/testdata/discovery.yaml b/internal/converter/internal/prometheusconvert/testdata/discovery.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/discovery.yaml rename to internal/converter/internal/prometheusconvert/testdata/discovery.yaml diff --git a/converter/internal/prometheusconvert/testdata/discovery_relabel.river b/internal/converter/internal/prometheusconvert/testdata/discovery_relabel.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/discovery_relabel.river rename to internal/converter/internal/prometheusconvert/testdata/discovery_relabel.river diff --git a/converter/internal/prometheusconvert/testdata/discovery_relabel.yaml b/internal/converter/internal/prometheusconvert/testdata/discovery_relabel.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/discovery_relabel.yaml rename to internal/converter/internal/prometheusconvert/testdata/discovery_relabel.yaml diff --git a/converter/internal/prometheusconvert/testdata/dns.river b/internal/converter/internal/prometheusconvert/testdata/dns.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/dns.river rename to internal/converter/internal/prometheusconvert/testdata/dns.river diff --git a/converter/internal/prometheusconvert/testdata/dns.yaml b/internal/converter/internal/prometheusconvert/testdata/dns.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/dns.yaml rename to internal/converter/internal/prometheusconvert/testdata/dns.yaml diff --git a/converter/internal/prometheusconvert/testdata/docker.river b/internal/converter/internal/prometheusconvert/testdata/docker.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/docker.river rename to internal/converter/internal/prometheusconvert/testdata/docker.river diff --git a/converter/internal/prometheusconvert/testdata/docker.yaml b/internal/converter/internal/prometheusconvert/testdata/docker.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/docker.yaml rename to internal/converter/internal/prometheusconvert/testdata/docker.yaml diff --git a/converter/internal/prometheusconvert/testdata/dockerswarm.river b/internal/converter/internal/prometheusconvert/testdata/dockerswarm.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/dockerswarm.river rename to internal/converter/internal/prometheusconvert/testdata/dockerswarm.river diff --git a/converter/internal/prometheusconvert/testdata/dockerswarm.yaml b/internal/converter/internal/prometheusconvert/testdata/dockerswarm.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/dockerswarm.yaml rename to internal/converter/internal/prometheusconvert/testdata/dockerswarm.yaml diff --git a/converter/internal/prometheusconvert/testdata/ec2.river b/internal/converter/internal/prometheusconvert/testdata/ec2.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/ec2.river rename to internal/converter/internal/prometheusconvert/testdata/ec2.river diff --git a/converter/internal/prometheusconvert/testdata/ec2.yaml b/internal/converter/internal/prometheusconvert/testdata/ec2.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/ec2.yaml rename to internal/converter/internal/prometheusconvert/testdata/ec2.yaml diff --git a/converter/internal/prometheusconvert/testdata/empty.river b/internal/converter/internal/prometheusconvert/testdata/empty.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/empty.river rename to internal/converter/internal/prometheusconvert/testdata/empty.river diff --git a/converter/internal/prometheusconvert/testdata/empty.yaml b/internal/converter/internal/prometheusconvert/testdata/empty.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/empty.yaml rename to internal/converter/internal/prometheusconvert/testdata/empty.yaml diff --git a/converter/internal/prometheusconvert/testdata/file.river b/internal/converter/internal/prometheusconvert/testdata/file.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/file.river rename to internal/converter/internal/prometheusconvert/testdata/file.river diff --git a/converter/internal/prometheusconvert/testdata/file.yaml b/internal/converter/internal/prometheusconvert/testdata/file.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/file.yaml rename to internal/converter/internal/prometheusconvert/testdata/file.yaml diff --git a/converter/internal/prometheusconvert/testdata/gce.river b/internal/converter/internal/prometheusconvert/testdata/gce.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/gce.river rename to internal/converter/internal/prometheusconvert/testdata/gce.river diff --git a/converter/internal/prometheusconvert/testdata/gce.yaml b/internal/converter/internal/prometheusconvert/testdata/gce.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/gce.yaml rename to internal/converter/internal/prometheusconvert/testdata/gce.yaml diff --git a/converter/internal/prometheusconvert/testdata/http.river b/internal/converter/internal/prometheusconvert/testdata/http.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/http.river rename to internal/converter/internal/prometheusconvert/testdata/http.river diff --git a/converter/internal/prometheusconvert/testdata/http.yaml b/internal/converter/internal/prometheusconvert/testdata/http.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/http.yaml rename to internal/converter/internal/prometheusconvert/testdata/http.yaml diff --git a/converter/internal/prometheusconvert/testdata/ionos.river b/internal/converter/internal/prometheusconvert/testdata/ionos.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/ionos.river rename to internal/converter/internal/prometheusconvert/testdata/ionos.river diff --git a/converter/internal/prometheusconvert/testdata/ionos.yaml b/internal/converter/internal/prometheusconvert/testdata/ionos.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/ionos.yaml rename to internal/converter/internal/prometheusconvert/testdata/ionos.yaml diff --git a/converter/internal/prometheusconvert/testdata/kubernetes.river b/internal/converter/internal/prometheusconvert/testdata/kubernetes.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/kubernetes.river rename to internal/converter/internal/prometheusconvert/testdata/kubernetes.river diff --git a/converter/internal/prometheusconvert/testdata/kubernetes.yaml b/internal/converter/internal/prometheusconvert/testdata/kubernetes.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/kubernetes.yaml rename to internal/converter/internal/prometheusconvert/testdata/kubernetes.yaml diff --git a/converter/internal/prometheusconvert/testdata/kuma.river b/internal/converter/internal/prometheusconvert/testdata/kuma.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/kuma.river rename to internal/converter/internal/prometheusconvert/testdata/kuma.river diff --git a/converter/internal/prometheusconvert/testdata/kuma.yaml b/internal/converter/internal/prometheusconvert/testdata/kuma.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/kuma.yaml rename to internal/converter/internal/prometheusconvert/testdata/kuma.yaml diff --git a/converter/internal/prometheusconvert/testdata/lightsail.river b/internal/converter/internal/prometheusconvert/testdata/lightsail.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/lightsail.river rename to internal/converter/internal/prometheusconvert/testdata/lightsail.river diff --git a/converter/internal/prometheusconvert/testdata/lightsail.yaml b/internal/converter/internal/prometheusconvert/testdata/lightsail.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/lightsail.yaml rename to internal/converter/internal/prometheusconvert/testdata/lightsail.yaml diff --git a/converter/internal/prometheusconvert/testdata/linode.river b/internal/converter/internal/prometheusconvert/testdata/linode.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/linode.river rename to internal/converter/internal/prometheusconvert/testdata/linode.river diff --git a/converter/internal/prometheusconvert/testdata/linode.yaml b/internal/converter/internal/prometheusconvert/testdata/linode.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/linode.yaml rename to internal/converter/internal/prometheusconvert/testdata/linode.yaml diff --git a/converter/internal/prometheusconvert/testdata/marathon.river b/internal/converter/internal/prometheusconvert/testdata/marathon.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/marathon.river rename to internal/converter/internal/prometheusconvert/testdata/marathon.river diff --git a/converter/internal/prometheusconvert/testdata/marathon.yaml b/internal/converter/internal/prometheusconvert/testdata/marathon.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/marathon.yaml rename to internal/converter/internal/prometheusconvert/testdata/marathon.yaml diff --git a/converter/internal/prometheusconvert/testdata/metric_relabel.river b/internal/converter/internal/prometheusconvert/testdata/metric_relabel.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/metric_relabel.river rename to internal/converter/internal/prometheusconvert/testdata/metric_relabel.river diff --git a/converter/internal/prometheusconvert/testdata/metric_relabel.yaml b/internal/converter/internal/prometheusconvert/testdata/metric_relabel.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/metric_relabel.yaml rename to internal/converter/internal/prometheusconvert/testdata/metric_relabel.yaml diff --git a/converter/internal/prometheusconvert/testdata/nerve.river b/internal/converter/internal/prometheusconvert/testdata/nerve.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/nerve.river rename to internal/converter/internal/prometheusconvert/testdata/nerve.river diff --git a/converter/internal/prometheusconvert/testdata/nerve.yaml b/internal/converter/internal/prometheusconvert/testdata/nerve.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/nerve.yaml rename to internal/converter/internal/prometheusconvert/testdata/nerve.yaml diff --git a/converter/internal/prometheusconvert/testdata/openstack.river b/internal/converter/internal/prometheusconvert/testdata/openstack.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/openstack.river rename to internal/converter/internal/prometheusconvert/testdata/openstack.river diff --git a/converter/internal/prometheusconvert/testdata/openstack.yaml b/internal/converter/internal/prometheusconvert/testdata/openstack.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/openstack.yaml rename to internal/converter/internal/prometheusconvert/testdata/openstack.yaml diff --git a/converter/internal/prometheusconvert/testdata/ovhcloud.river b/internal/converter/internal/prometheusconvert/testdata/ovhcloud.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/ovhcloud.river rename to internal/converter/internal/prometheusconvert/testdata/ovhcloud.river diff --git a/converter/internal/prometheusconvert/testdata/ovhcloud.yaml b/internal/converter/internal/prometheusconvert/testdata/ovhcloud.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/ovhcloud.yaml rename to internal/converter/internal/prometheusconvert/testdata/ovhcloud.yaml diff --git a/converter/internal/prometheusconvert/testdata/scaleway.river b/internal/converter/internal/prometheusconvert/testdata/scaleway.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/scaleway.river rename to internal/converter/internal/prometheusconvert/testdata/scaleway.river diff --git a/converter/internal/prometheusconvert/testdata/scaleway.yaml b/internal/converter/internal/prometheusconvert/testdata/scaleway.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/scaleway.yaml rename to internal/converter/internal/prometheusconvert/testdata/scaleway.yaml diff --git a/converter/internal/prometheusconvert/testdata/scrape.diags b/internal/converter/internal/prometheusconvert/testdata/scrape.diags similarity index 100% rename from converter/internal/prometheusconvert/testdata/scrape.diags rename to internal/converter/internal/prometheusconvert/testdata/scrape.diags diff --git a/converter/internal/prometheusconvert/testdata/scrape.river b/internal/converter/internal/prometheusconvert/testdata/scrape.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/scrape.river rename to internal/converter/internal/prometheusconvert/testdata/scrape.river diff --git a/converter/internal/prometheusconvert/testdata/scrape.yaml b/internal/converter/internal/prometheusconvert/testdata/scrape.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/scrape.yaml rename to internal/converter/internal/prometheusconvert/testdata/scrape.yaml diff --git a/converter/internal/prometheusconvert/testdata/serverset.river b/internal/converter/internal/prometheusconvert/testdata/serverset.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/serverset.river rename to internal/converter/internal/prometheusconvert/testdata/serverset.river diff --git a/converter/internal/prometheusconvert/testdata/serverset.yaml b/internal/converter/internal/prometheusconvert/testdata/serverset.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/serverset.yaml rename to internal/converter/internal/prometheusconvert/testdata/serverset.yaml diff --git a/converter/internal/prometheusconvert/testdata/triton.river b/internal/converter/internal/prometheusconvert/testdata/triton.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/triton.river rename to internal/converter/internal/prometheusconvert/testdata/triton.river diff --git a/converter/internal/prometheusconvert/testdata/triton.yaml b/internal/converter/internal/prometheusconvert/testdata/triton.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/triton.yaml rename to internal/converter/internal/prometheusconvert/testdata/triton.yaml diff --git a/converter/internal/prometheusconvert/testdata/unsupported.diags b/internal/converter/internal/prometheusconvert/testdata/unsupported.diags similarity index 100% rename from converter/internal/prometheusconvert/testdata/unsupported.diags rename to internal/converter/internal/prometheusconvert/testdata/unsupported.diags diff --git a/converter/internal/prometheusconvert/testdata/unsupported.river b/internal/converter/internal/prometheusconvert/testdata/unsupported.river similarity index 100% rename from converter/internal/prometheusconvert/testdata/unsupported.river rename to internal/converter/internal/prometheusconvert/testdata/unsupported.river diff --git a/converter/internal/prometheusconvert/testdata/unsupported.yaml b/internal/converter/internal/prometheusconvert/testdata/unsupported.yaml similarity index 100% rename from converter/internal/prometheusconvert/testdata/unsupported.yaml rename to internal/converter/internal/prometheusconvert/testdata/unsupported.yaml diff --git a/converter/internal/prometheusconvert/validate.go b/internal/converter/internal/prometheusconvert/validate.go similarity index 94% rename from converter/internal/prometheusconvert/validate.go rename to internal/converter/internal/prometheusconvert/validate.go index de6c6a46e1..0bca959958 100644 --- a/converter/internal/prometheusconvert/validate.go +++ b/internal/converter/internal/prometheusconvert/validate.go @@ -1,9 +1,9 @@ package prometheusconvert import ( - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/component" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/component" prom_config "github.com/prometheus/prometheus/config" prom_discover "github.com/prometheus/prometheus/discovery" diff --git a/converter/internal/promtailconvert/internal/build/azure_event_hub.go b/internal/converter/internal/promtailconvert/internal/build/azure_event_hub.go similarity index 85% rename from converter/internal/promtailconvert/internal/build/azure_event_hub.go rename to internal/converter/internal/promtailconvert/internal/build/azure_event_hub.go index c59f5f76c3..417f54fa3c 100644 --- a/converter/internal/promtailconvert/internal/build/azure_event_hub.go +++ b/internal/converter/internal/promtailconvert/internal/build/azure_event_hub.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/azure_event_hubs" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/azure_event_hubs" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendAzureEventHubs() { diff --git a/converter/internal/promtailconvert/internal/build/cloudflare.go b/internal/converter/internal/promtailconvert/internal/build/cloudflare.go similarity index 84% rename from converter/internal/promtailconvert/internal/build/cloudflare.go rename to internal/converter/internal/promtailconvert/internal/build/cloudflare.go index 395db564c4..5249d56883 100644 --- a/converter/internal/promtailconvert/internal/build/cloudflare.go +++ b/internal/converter/internal/promtailconvert/internal/build/cloudflare.go @@ -3,9 +3,9 @@ package build import ( "time" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/loki/source/cloudflare" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/loki/source/cloudflare" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/promtailconvert/internal/build/consul_agent.go b/internal/converter/internal/promtailconvert/internal/build/consul_agent.go similarity index 89% rename from converter/internal/promtailconvert/internal/build/consul_agent.go rename to internal/converter/internal/promtailconvert/internal/build/consul_agent.go index 97976f1d2b..a1c6c778b6 100644 --- a/converter/internal/promtailconvert/internal/build/consul_agent.go +++ b/internal/converter/internal/promtailconvert/internal/build/consul_agent.go @@ -3,9 +3,9 @@ package build import ( "time" - "github.com/grafana/agent/component/discovery/consulagent" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/discovery/consulagent" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" promtail_consulagent "github.com/grafana/loki/clients/pkg/promtail/discovery/consulagent" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/promtailconvert/internal/build/docker_sd.go b/internal/converter/internal/promtailconvert/internal/build/docker_sd.go similarity index 86% rename from converter/internal/promtailconvert/internal/build/docker_sd.go rename to internal/converter/internal/promtailconvert/internal/build/docker_sd.go index 5fcc953881..8a337faf6a 100644 --- a/converter/internal/promtailconvert/internal/build/docker_sd.go +++ b/internal/converter/internal/promtailconvert/internal/build/docker_sd.go @@ -3,12 +3,12 @@ package build import ( "time" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/docker" - loki_docker "github.com/grafana/agent/component/loki/source/docker" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/docker" + loki_docker "github.com/grafana/agent/internal/component/loki/source/docker" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/prometheus/prometheus/discovery/moby" ) diff --git a/converter/internal/promtailconvert/internal/build/gcplog.go b/internal/converter/internal/promtailconvert/internal/build/gcplog.go similarity index 84% rename from converter/internal/promtailconvert/internal/build/gcplog.go rename to internal/converter/internal/promtailconvert/internal/build/gcplog.go index 87939cc0dc..b45efa2d51 100644 --- a/converter/internal/promtailconvert/internal/build/gcplog.go +++ b/internal/converter/internal/promtailconvert/internal/build/gcplog.go @@ -1,11 +1,11 @@ package build import ( - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/gcplog" - "github.com/grafana/agent/component/loki/source/gcplog/gcptypes" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/gcplog" + "github.com/grafana/agent/internal/component/loki/source/gcplog/gcptypes" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendGCPLog() { diff --git a/converter/internal/promtailconvert/internal/build/gelf.go b/internal/converter/internal/promtailconvert/internal/build/gelf.go similarity index 80% rename from converter/internal/promtailconvert/internal/build/gelf.go rename to internal/converter/internal/promtailconvert/internal/build/gelf.go index ae2b1467b3..2aed0bc6aa 100644 --- a/converter/internal/promtailconvert/internal/build/gelf.go +++ b/internal/converter/internal/promtailconvert/internal/build/gelf.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/gelf" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/gelf" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendGelfConfig() { diff --git a/converter/internal/promtailconvert/internal/build/global_context.go b/internal/converter/internal/promtailconvert/internal/build/global_context.go similarity index 73% rename from converter/internal/promtailconvert/internal/build/global_context.go rename to internal/converter/internal/promtailconvert/internal/build/global_context.go index 4ee734fcea..a47ad122ce 100644 --- a/converter/internal/promtailconvert/internal/build/global_context.go +++ b/internal/converter/internal/promtailconvert/internal/build/global_context.go @@ -3,7 +3,7 @@ package build import ( "time" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" ) type GlobalContext struct { diff --git a/converter/internal/promtailconvert/internal/build/herokudrain.go b/internal/converter/internal/promtailconvert/internal/build/herokudrain.go similarity index 82% rename from converter/internal/promtailconvert/internal/build/herokudrain.go rename to internal/converter/internal/promtailconvert/internal/build/herokudrain.go index 672e308157..59b7d197e9 100644 --- a/converter/internal/promtailconvert/internal/build/herokudrain.go +++ b/internal/converter/internal/promtailconvert/internal/build/herokudrain.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/heroku" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/heroku" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendHerokuDrainConfig() { diff --git a/converter/internal/promtailconvert/internal/build/journal.go b/internal/converter/internal/promtailconvert/internal/build/journal.go similarity index 83% rename from converter/internal/promtailconvert/internal/build/journal.go rename to internal/converter/internal/promtailconvert/internal/build/journal.go index 6971b81582..e693f310b4 100644 --- a/converter/internal/promtailconvert/internal/build/journal.go +++ b/internal/converter/internal/promtailconvert/internal/build/journal.go @@ -4,10 +4,10 @@ import ( "fmt" "time" - flowrelabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/journal" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + flowrelabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/journal" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendJournalConfig() { diff --git a/converter/internal/promtailconvert/internal/build/kafka.go b/internal/converter/internal/promtailconvert/internal/build/kafka.go similarity index 90% rename from converter/internal/promtailconvert/internal/build/kafka.go rename to internal/converter/internal/promtailconvert/internal/build/kafka.go index 7f954c6298..39f5c4c951 100644 --- a/converter/internal/promtailconvert/internal/build/kafka.go +++ b/internal/converter/internal/promtailconvert/internal/build/kafka.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/kafka" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/kafka" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/promtailconvert/internal/build/loki_write.go b/internal/converter/internal/promtailconvert/internal/build/loki_write.go similarity index 89% rename from converter/internal/promtailconvert/internal/build/loki_write.go rename to internal/converter/internal/promtailconvert/internal/build/loki_write.go index 562f15b0af..2ba031e28e 100644 --- a/converter/internal/promtailconvert/internal/build/loki_write.go +++ b/internal/converter/internal/promtailconvert/internal/build/loki_write.go @@ -4,10 +4,10 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component/common/loki" - lokiwrite "github.com/grafana/agent/component/loki/write" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/loki" + lokiwrite "github.com/grafana/agent/internal/component/loki/write" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/loki/clients/pkg/promtail/client" lokiflag "github.com/grafana/loki/pkg/util/flagext" "github.com/grafana/river/token/builder" diff --git a/converter/internal/promtailconvert/internal/build/push_api.go b/internal/converter/internal/promtailconvert/internal/build/push_api.go similarity index 82% rename from converter/internal/promtailconvert/internal/build/push_api.go rename to internal/converter/internal/promtailconvert/internal/build/push_api.go index a6925ea7b1..849066a733 100644 --- a/converter/internal/promtailconvert/internal/build/push_api.go +++ b/internal/converter/internal/promtailconvert/internal/build/push_api.go @@ -3,10 +3,10 @@ package build import ( "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/api" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/api" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendPushAPI() { diff --git a/converter/internal/promtailconvert/internal/build/scrape_builder.go b/internal/converter/internal/promtailconvert/internal/build/scrape_builder.go similarity index 91% rename from converter/internal/promtailconvert/internal/build/scrape_builder.go rename to internal/converter/internal/promtailconvert/internal/build/scrape_builder.go index c7288be0fc..91d0a34a48 100644 --- a/converter/internal/promtailconvert/internal/build/scrape_builder.go +++ b/internal/converter/internal/promtailconvert/internal/build/scrape_builder.go @@ -5,17 +5,17 @@ import ( "fmt" "strings" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/discovery/relabel" - filematch "github.com/grafana/agent/component/local/file_match" - "github.com/grafana/agent/component/loki/process" - "github.com/grafana/agent/component/loki/process/stages" - lokirelabel "github.com/grafana/agent/component/loki/relabel" - lokisourcefile "github.com/grafana/agent/component/loki/source/file" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert/component" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/discovery/relabel" + filematch "github.com/grafana/agent/internal/component/local/file_match" + "github.com/grafana/agent/internal/component/loki/process" + "github.com/grafana/agent/internal/component/loki/process/stages" + lokirelabel "github.com/grafana/agent/internal/component/loki/relabel" + lokisourcefile "github.com/grafana/agent/internal/component/loki/source/file" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/component" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/grafana/loki/clients/pkg/promtail/targets/file" "github.com/grafana/river/scanner" diff --git a/converter/internal/promtailconvert/internal/build/service_discovery.go b/internal/converter/internal/promtailconvert/internal/build/service_discovery.go similarity index 91% rename from converter/internal/promtailconvert/internal/build/service_discovery.go rename to internal/converter/internal/promtailconvert/internal/build/service_discovery.go index 3405e0966a..533f5c8c2b 100644 --- a/converter/internal/promtailconvert/internal/build/service_discovery.go +++ b/internal/converter/internal/promtailconvert/internal/build/service_discovery.go @@ -3,11 +3,11 @@ package build import ( "fmt" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert" - "github.com/grafana/agent/converter/internal/prometheusconvert/build" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/prometheus/common/model" diff --git a/converter/internal/promtailconvert/internal/build/stages.go b/internal/converter/internal/promtailconvert/internal/build/stages.go similarity index 99% rename from converter/internal/promtailconvert/internal/build/stages.go rename to internal/converter/internal/promtailconvert/internal/build/stages.go index c97e0c0ead..a303949e18 100644 --- a/converter/internal/promtailconvert/internal/build/stages.go +++ b/internal/converter/internal/promtailconvert/internal/build/stages.go @@ -12,9 +12,9 @@ import ( "github.com/grafana/loki/pkg/util/flagext" "github.com/mitchellh/mapstructure" - "github.com/grafana/agent/component/loki/process/metric" - "github.com/grafana/agent/component/loki/process/stages" - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/component/loki/process/metric" + "github.com/grafana/agent/internal/component/loki/process/stages" + "github.com/grafana/agent/internal/converter/diag" ) func convertStage(st interface{}, diags *diag.Diagnostics) (stages.StageConfig, bool) { diff --git a/converter/internal/promtailconvert/internal/build/syslog.go b/internal/converter/internal/promtailconvert/internal/build/syslog.go similarity index 87% rename from converter/internal/promtailconvert/internal/build/syslog.go rename to internal/converter/internal/promtailconvert/internal/build/syslog.go index 47b4c52d5b..31ac4983c4 100644 --- a/converter/internal/promtailconvert/internal/build/syslog.go +++ b/internal/converter/internal/promtailconvert/internal/build/syslog.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/source/syslog" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/source/syslog" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendSyslogConfig() { diff --git a/converter/internal/promtailconvert/internal/build/windows_events.go b/internal/converter/internal/promtailconvert/internal/build/windows_events.go similarity index 85% rename from converter/internal/promtailconvert/internal/build/windows_events.go rename to internal/converter/internal/promtailconvert/internal/build/windows_events.go index dc6d00abcf..e1784535b3 100644 --- a/converter/internal/promtailconvert/internal/build/windows_events.go +++ b/internal/converter/internal/promtailconvert/internal/build/windows_events.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/loki/source/windowsevent" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/loki/source/windowsevent" + "github.com/grafana/agent/internal/converter/internal/common" ) func (s *ScrapeConfigBuilder) AppendWindowsEventsConfig() { diff --git a/converter/internal/promtailconvert/promtailconvert.go b/internal/converter/internal/promtailconvert/promtailconvert.go similarity index 95% rename from converter/internal/promtailconvert/promtailconvert.go rename to internal/converter/internal/promtailconvert/promtailconvert.go index 4983631c04..8c3664881c 100644 --- a/converter/internal/promtailconvert/promtailconvert.go +++ b/internal/converter/internal/promtailconvert/promtailconvert.go @@ -5,10 +5,10 @@ import ( "flag" "fmt" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/promtailconvert/internal/build" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/promtailconvert/internal/build" "github.com/grafana/dskit/flagext" promtailcfg "github.com/grafana/loki/clients/pkg/promtail/config" "github.com/grafana/loki/clients/pkg/promtail/limit" diff --git a/internal/converter/internal/promtailconvert/promtailconvert_test.go b/internal/converter/internal/promtailconvert/promtailconvert_test.go new file mode 100644 index 0000000000..63ea75afbe --- /dev/null +++ b/internal/converter/internal/promtailconvert/promtailconvert_test.go @@ -0,0 +1,13 @@ +package promtailconvert_test + +import ( + "testing" + + "github.com/grafana/agent/internal/converter/internal/promtailconvert" + "github.com/grafana/agent/internal/converter/internal/test_common" + _ "github.com/grafana/agent/internal/static/metrics/instance" // Imported to override default values via the init function. +) + +func TestConvert(t *testing.T) { + test_common.TestDirectory(t, "testdata", ".yaml", true, []string{}, promtailconvert.Convert) +} diff --git a/converter/internal/promtailconvert/testdata/azure.river b/internal/converter/internal/promtailconvert/testdata/azure.river similarity index 100% rename from converter/internal/promtailconvert/testdata/azure.river rename to internal/converter/internal/promtailconvert/testdata/azure.river diff --git a/converter/internal/promtailconvert/testdata/azure.yaml b/internal/converter/internal/promtailconvert/testdata/azure.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/azure.yaml rename to internal/converter/internal/promtailconvert/testdata/azure.yaml diff --git a/converter/internal/promtailconvert/testdata/azure_event_hubs.river b/internal/converter/internal/promtailconvert/testdata/azure_event_hubs.river similarity index 100% rename from converter/internal/promtailconvert/testdata/azure_event_hubs.river rename to internal/converter/internal/promtailconvert/testdata/azure_event_hubs.river diff --git a/converter/internal/promtailconvert/testdata/azure_event_hubs.yaml b/internal/converter/internal/promtailconvert/testdata/azure_event_hubs.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/azure_event_hubs.yaml rename to internal/converter/internal/promtailconvert/testdata/azure_event_hubs.yaml diff --git a/converter/internal/promtailconvert/testdata/bad_config.diags b/internal/converter/internal/promtailconvert/testdata/bad_config.diags similarity index 100% rename from converter/internal/promtailconvert/testdata/bad_config.diags rename to internal/converter/internal/promtailconvert/testdata/bad_config.diags diff --git a/converter/internal/promtailconvert/testdata/bad_config.yaml b/internal/converter/internal/promtailconvert/testdata/bad_config.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/bad_config.yaml rename to internal/converter/internal/promtailconvert/testdata/bad_config.yaml diff --git a/converter/internal/promtailconvert/testdata/cloudflare_relabel.river b/internal/converter/internal/promtailconvert/testdata/cloudflare_relabel.river similarity index 100% rename from converter/internal/promtailconvert/testdata/cloudflare_relabel.river rename to internal/converter/internal/promtailconvert/testdata/cloudflare_relabel.river diff --git a/converter/internal/promtailconvert/testdata/cloudflare_relabel.yaml b/internal/converter/internal/promtailconvert/testdata/cloudflare_relabel.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/cloudflare_relabel.yaml rename to internal/converter/internal/promtailconvert/testdata/cloudflare_relabel.yaml diff --git a/converter/internal/promtailconvert/testdata/consul.river b/internal/converter/internal/promtailconvert/testdata/consul.river similarity index 100% rename from converter/internal/promtailconvert/testdata/consul.river rename to internal/converter/internal/promtailconvert/testdata/consul.river diff --git a/converter/internal/promtailconvert/testdata/consul.yaml b/internal/converter/internal/promtailconvert/testdata/consul.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/consul.yaml rename to internal/converter/internal/promtailconvert/testdata/consul.yaml diff --git a/converter/internal/promtailconvert/testdata/consulagent.diags b/internal/converter/internal/promtailconvert/testdata/consulagent.diags similarity index 100% rename from converter/internal/promtailconvert/testdata/consulagent.diags rename to internal/converter/internal/promtailconvert/testdata/consulagent.diags diff --git a/converter/internal/promtailconvert/testdata/consulagent.river b/internal/converter/internal/promtailconvert/testdata/consulagent.river similarity index 100% rename from converter/internal/promtailconvert/testdata/consulagent.river rename to internal/converter/internal/promtailconvert/testdata/consulagent.river diff --git a/converter/internal/promtailconvert/testdata/consulagent.yaml b/internal/converter/internal/promtailconvert/testdata/consulagent.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/consulagent.yaml rename to internal/converter/internal/promtailconvert/testdata/consulagent.yaml diff --git a/converter/internal/promtailconvert/testdata/digitalocean.river b/internal/converter/internal/promtailconvert/testdata/digitalocean.river similarity index 100% rename from converter/internal/promtailconvert/testdata/digitalocean.river rename to internal/converter/internal/promtailconvert/testdata/digitalocean.river diff --git a/converter/internal/promtailconvert/testdata/digitalocean.yaml b/internal/converter/internal/promtailconvert/testdata/digitalocean.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/digitalocean.yaml rename to internal/converter/internal/promtailconvert/testdata/digitalocean.yaml diff --git a/converter/internal/promtailconvert/testdata/docker.river b/internal/converter/internal/promtailconvert/testdata/docker.river similarity index 100% rename from converter/internal/promtailconvert/testdata/docker.river rename to internal/converter/internal/promtailconvert/testdata/docker.river diff --git a/converter/internal/promtailconvert/testdata/docker.yaml b/internal/converter/internal/promtailconvert/testdata/docker.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/docker.yaml rename to internal/converter/internal/promtailconvert/testdata/docker.yaml diff --git a/converter/internal/promtailconvert/testdata/docker_relabel.river b/internal/converter/internal/promtailconvert/testdata/docker_relabel.river similarity index 100% rename from converter/internal/promtailconvert/testdata/docker_relabel.river rename to internal/converter/internal/promtailconvert/testdata/docker_relabel.river diff --git a/converter/internal/promtailconvert/testdata/docker_relabel.yaml b/internal/converter/internal/promtailconvert/testdata/docker_relabel.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/docker_relabel.yaml rename to internal/converter/internal/promtailconvert/testdata/docker_relabel.yaml diff --git a/converter/internal/promtailconvert/testdata/dockerswarm.river b/internal/converter/internal/promtailconvert/testdata/dockerswarm.river similarity index 100% rename from converter/internal/promtailconvert/testdata/dockerswarm.river rename to internal/converter/internal/promtailconvert/testdata/dockerswarm.river diff --git a/converter/internal/promtailconvert/testdata/dockerswarm.yaml b/internal/converter/internal/promtailconvert/testdata/dockerswarm.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/dockerswarm.yaml rename to internal/converter/internal/promtailconvert/testdata/dockerswarm.yaml diff --git a/converter/internal/promtailconvert/testdata/ec2.river b/internal/converter/internal/promtailconvert/testdata/ec2.river similarity index 100% rename from converter/internal/promtailconvert/testdata/ec2.river rename to internal/converter/internal/promtailconvert/testdata/ec2.river diff --git a/converter/internal/promtailconvert/testdata/ec2.yaml b/internal/converter/internal/promtailconvert/testdata/ec2.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/ec2.yaml rename to internal/converter/internal/promtailconvert/testdata/ec2.yaml diff --git a/converter/internal/promtailconvert/testdata/file.river b/internal/converter/internal/promtailconvert/testdata/file.river similarity index 100% rename from converter/internal/promtailconvert/testdata/file.river rename to internal/converter/internal/promtailconvert/testdata/file.river diff --git a/converter/internal/promtailconvert/testdata/file.yaml b/internal/converter/internal/promtailconvert/testdata/file.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/file.yaml rename to internal/converter/internal/promtailconvert/testdata/file.yaml diff --git a/converter/internal/promtailconvert/testdata/gce.river b/internal/converter/internal/promtailconvert/testdata/gce.river similarity index 100% rename from converter/internal/promtailconvert/testdata/gce.river rename to internal/converter/internal/promtailconvert/testdata/gce.river diff --git a/converter/internal/promtailconvert/testdata/gce.yaml b/internal/converter/internal/promtailconvert/testdata/gce.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/gce.yaml rename to internal/converter/internal/promtailconvert/testdata/gce.yaml diff --git a/converter/internal/promtailconvert/testdata/gcplog.river b/internal/converter/internal/promtailconvert/testdata/gcplog.river similarity index 100% rename from converter/internal/promtailconvert/testdata/gcplog.river rename to internal/converter/internal/promtailconvert/testdata/gcplog.river diff --git a/converter/internal/promtailconvert/testdata/gcplog.yaml b/internal/converter/internal/promtailconvert/testdata/gcplog.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/gcplog.yaml rename to internal/converter/internal/promtailconvert/testdata/gcplog.yaml diff --git a/converter/internal/promtailconvert/testdata/gelf.river b/internal/converter/internal/promtailconvert/testdata/gelf.river similarity index 100% rename from converter/internal/promtailconvert/testdata/gelf.river rename to internal/converter/internal/promtailconvert/testdata/gelf.river diff --git a/converter/internal/promtailconvert/testdata/gelf.yaml b/internal/converter/internal/promtailconvert/testdata/gelf.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/gelf.yaml rename to internal/converter/internal/promtailconvert/testdata/gelf.yaml diff --git a/converter/internal/promtailconvert/testdata/heroku.river b/internal/converter/internal/promtailconvert/testdata/heroku.river similarity index 100% rename from converter/internal/promtailconvert/testdata/heroku.river rename to internal/converter/internal/promtailconvert/testdata/heroku.river diff --git a/converter/internal/promtailconvert/testdata/heroku.yaml b/internal/converter/internal/promtailconvert/testdata/heroku.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/heroku.yaml rename to internal/converter/internal/promtailconvert/testdata/heroku.yaml diff --git a/converter/internal/promtailconvert/testdata/journal.river b/internal/converter/internal/promtailconvert/testdata/journal.river similarity index 100% rename from converter/internal/promtailconvert/testdata/journal.river rename to internal/converter/internal/promtailconvert/testdata/journal.river diff --git a/converter/internal/promtailconvert/testdata/journal.yaml b/internal/converter/internal/promtailconvert/testdata/journal.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/journal.yaml rename to internal/converter/internal/promtailconvert/testdata/journal.yaml diff --git a/converter/internal/promtailconvert/testdata/journal_relabel.river b/internal/converter/internal/promtailconvert/testdata/journal_relabel.river similarity index 100% rename from converter/internal/promtailconvert/testdata/journal_relabel.river rename to internal/converter/internal/promtailconvert/testdata/journal_relabel.river diff --git a/converter/internal/promtailconvert/testdata/journal_relabel.yaml b/internal/converter/internal/promtailconvert/testdata/journal_relabel.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/journal_relabel.yaml rename to internal/converter/internal/promtailconvert/testdata/journal_relabel.yaml diff --git a/converter/internal/promtailconvert/testdata/kafka.river b/internal/converter/internal/promtailconvert/testdata/kafka.river similarity index 100% rename from converter/internal/promtailconvert/testdata/kafka.river rename to internal/converter/internal/promtailconvert/testdata/kafka.river diff --git a/converter/internal/promtailconvert/testdata/kafka.yaml b/internal/converter/internal/promtailconvert/testdata/kafka.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/kafka.yaml rename to internal/converter/internal/promtailconvert/testdata/kafka.yaml diff --git a/converter/internal/promtailconvert/testdata/kubernetes.river b/internal/converter/internal/promtailconvert/testdata/kubernetes.river similarity index 100% rename from converter/internal/promtailconvert/testdata/kubernetes.river rename to internal/converter/internal/promtailconvert/testdata/kubernetes.river diff --git a/converter/internal/promtailconvert/testdata/kubernetes.yaml b/internal/converter/internal/promtailconvert/testdata/kubernetes.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/kubernetes.yaml rename to internal/converter/internal/promtailconvert/testdata/kubernetes.yaml diff --git a/converter/internal/promtailconvert/testdata/loki_write.river b/internal/converter/internal/promtailconvert/testdata/loki_write.river similarity index 100% rename from converter/internal/promtailconvert/testdata/loki_write.river rename to internal/converter/internal/promtailconvert/testdata/loki_write.river diff --git a/converter/internal/promtailconvert/testdata/loki_write.yaml b/internal/converter/internal/promtailconvert/testdata/loki_write.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/loki_write.yaml rename to internal/converter/internal/promtailconvert/testdata/loki_write.yaml diff --git a/converter/internal/promtailconvert/testdata/marathon.river b/internal/converter/internal/promtailconvert/testdata/marathon.river similarity index 100% rename from converter/internal/promtailconvert/testdata/marathon.river rename to internal/converter/internal/promtailconvert/testdata/marathon.river diff --git a/converter/internal/promtailconvert/testdata/marathon.yaml b/internal/converter/internal/promtailconvert/testdata/marathon.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/marathon.yaml rename to internal/converter/internal/promtailconvert/testdata/marathon.yaml diff --git a/converter/internal/promtailconvert/testdata/mixed_pipeline.river b/internal/converter/internal/promtailconvert/testdata/mixed_pipeline.river similarity index 100% rename from converter/internal/promtailconvert/testdata/mixed_pipeline.river rename to internal/converter/internal/promtailconvert/testdata/mixed_pipeline.river diff --git a/converter/internal/promtailconvert/testdata/mixed_pipeline.yaml b/internal/converter/internal/promtailconvert/testdata/mixed_pipeline.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/mixed_pipeline.yaml rename to internal/converter/internal/promtailconvert/testdata/mixed_pipeline.yaml diff --git a/converter/internal/promtailconvert/testdata/nerve.river b/internal/converter/internal/promtailconvert/testdata/nerve.river similarity index 100% rename from converter/internal/promtailconvert/testdata/nerve.river rename to internal/converter/internal/promtailconvert/testdata/nerve.river diff --git a/converter/internal/promtailconvert/testdata/nerve.yaml b/internal/converter/internal/promtailconvert/testdata/nerve.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/nerve.yaml rename to internal/converter/internal/promtailconvert/testdata/nerve.yaml diff --git a/converter/internal/promtailconvert/testdata/openstack.river b/internal/converter/internal/promtailconvert/testdata/openstack.river similarity index 100% rename from converter/internal/promtailconvert/testdata/openstack.river rename to internal/converter/internal/promtailconvert/testdata/openstack.river diff --git a/converter/internal/promtailconvert/testdata/openstack.yaml b/internal/converter/internal/promtailconvert/testdata/openstack.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/openstack.yaml rename to internal/converter/internal/promtailconvert/testdata/openstack.yaml diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.river b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.river similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.river rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.river diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.yaml b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.yaml rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_cri_empty.yaml diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_drop.diags b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_drop.diags similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_drop.diags rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_drop.diags diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_drop.river b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_drop.river similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_drop.river rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_drop.river diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_drop.yaml b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_drop.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_drop.yaml rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_drop.yaml diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.river b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.river similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.river rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.river diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.yaml b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.yaml rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_match_nested.yaml diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_part1.river b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_part1.river similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_part1.river rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_part1.river diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_part1.yaml b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_part1.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_part1.yaml rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_part1.yaml diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_part2.river b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_part2.river similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_part2.river rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_part2.river diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_part2.yaml b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_part2.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_part2.yaml rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_part2.yaml diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.river b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.river similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.river rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.river diff --git a/converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.yaml b/internal/converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.yaml rename to internal/converter/internal/promtailconvert/testdata/pipeline_stages_structured_metadata.yaml diff --git a/converter/internal/promtailconvert/testdata/push_api.river b/internal/converter/internal/promtailconvert/testdata/push_api.river similarity index 100% rename from converter/internal/promtailconvert/testdata/push_api.river rename to internal/converter/internal/promtailconvert/testdata/push_api.river diff --git a/converter/internal/promtailconvert/testdata/push_api.yaml b/internal/converter/internal/promtailconvert/testdata/push_api.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/push_api.yaml rename to internal/converter/internal/promtailconvert/testdata/push_api.yaml diff --git a/converter/internal/promtailconvert/testdata/push_api_unsupported.diags b/internal/converter/internal/promtailconvert/testdata/push_api_unsupported.diags similarity index 100% rename from converter/internal/promtailconvert/testdata/push_api_unsupported.diags rename to internal/converter/internal/promtailconvert/testdata/push_api_unsupported.diags diff --git a/converter/internal/promtailconvert/testdata/push_api_unsupported.yaml b/internal/converter/internal/promtailconvert/testdata/push_api_unsupported.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/push_api_unsupported.yaml rename to internal/converter/internal/promtailconvert/testdata/push_api_unsupported.yaml diff --git a/converter/internal/promtailconvert/testdata/remote_write_basic_auth.river b/internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth.river similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_basic_auth.river rename to internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth.river diff --git a/converter/internal/promtailconvert/testdata/remote_write_basic_auth.yaml b/internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_basic_auth.yaml rename to internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth.yaml diff --git a/converter/internal/promtailconvert/testdata/remote_write_basic_auth2.river b/internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth2.river similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_basic_auth2.river rename to internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth2.river diff --git a/converter/internal/promtailconvert/testdata/remote_write_basic_auth2.yaml b/internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth2.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_basic_auth2.yaml rename to internal/converter/internal/promtailconvert/testdata/remote_write_basic_auth2.yaml diff --git a/converter/internal/promtailconvert/testdata/remote_write_bearer_file.river b/internal/converter/internal/promtailconvert/testdata/remote_write_bearer_file.river similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_bearer_file.river rename to internal/converter/internal/promtailconvert/testdata/remote_write_bearer_file.river diff --git a/converter/internal/promtailconvert/testdata/remote_write_bearer_file.yaml b/internal/converter/internal/promtailconvert/testdata/remote_write_bearer_file.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_bearer_file.yaml rename to internal/converter/internal/promtailconvert/testdata/remote_write_bearer_file.yaml diff --git a/converter/internal/promtailconvert/testdata/remote_write_bearer_token.river b/internal/converter/internal/promtailconvert/testdata/remote_write_bearer_token.river similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_bearer_token.river rename to internal/converter/internal/promtailconvert/testdata/remote_write_bearer_token.river diff --git a/converter/internal/promtailconvert/testdata/remote_write_bearer_token.yaml b/internal/converter/internal/promtailconvert/testdata/remote_write_bearer_token.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_bearer_token.yaml rename to internal/converter/internal/promtailconvert/testdata/remote_write_bearer_token.yaml diff --git a/converter/internal/promtailconvert/testdata/remote_write_oauth.river b/internal/converter/internal/promtailconvert/testdata/remote_write_oauth.river similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_oauth.river rename to internal/converter/internal/promtailconvert/testdata/remote_write_oauth.river diff --git a/converter/internal/promtailconvert/testdata/remote_write_oauth.yaml b/internal/converter/internal/promtailconvert/testdata/remote_write_oauth.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_oauth.yaml rename to internal/converter/internal/promtailconvert/testdata/remote_write_oauth.yaml diff --git a/converter/internal/promtailconvert/testdata/remote_write_oauth2.river b/internal/converter/internal/promtailconvert/testdata/remote_write_oauth2.river similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_oauth2.river rename to internal/converter/internal/promtailconvert/testdata/remote_write_oauth2.river diff --git a/converter/internal/promtailconvert/testdata/remote_write_oauth2.yaml b/internal/converter/internal/promtailconvert/testdata/remote_write_oauth2.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/remote_write_oauth2.yaml rename to internal/converter/internal/promtailconvert/testdata/remote_write_oauth2.yaml diff --git a/converter/internal/promtailconvert/testdata/sd_pipeline_example.river b/internal/converter/internal/promtailconvert/testdata/sd_pipeline_example.river similarity index 100% rename from converter/internal/promtailconvert/testdata/sd_pipeline_example.river rename to internal/converter/internal/promtailconvert/testdata/sd_pipeline_example.river diff --git a/converter/internal/promtailconvert/testdata/sd_pipeline_example.yaml b/internal/converter/internal/promtailconvert/testdata/sd_pipeline_example.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/sd_pipeline_example.yaml rename to internal/converter/internal/promtailconvert/testdata/sd_pipeline_example.yaml diff --git a/converter/internal/promtailconvert/testdata/serverset.river b/internal/converter/internal/promtailconvert/testdata/serverset.river similarity index 100% rename from converter/internal/promtailconvert/testdata/serverset.river rename to internal/converter/internal/promtailconvert/testdata/serverset.river diff --git a/converter/internal/promtailconvert/testdata/serverset.yaml b/internal/converter/internal/promtailconvert/testdata/serverset.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/serverset.yaml rename to internal/converter/internal/promtailconvert/testdata/serverset.yaml diff --git a/converter/internal/promtailconvert/testdata/source_pipeline_example.river b/internal/converter/internal/promtailconvert/testdata/source_pipeline_example.river similarity index 100% rename from converter/internal/promtailconvert/testdata/source_pipeline_example.river rename to internal/converter/internal/promtailconvert/testdata/source_pipeline_example.river diff --git a/converter/internal/promtailconvert/testdata/source_pipeline_example.yaml b/internal/converter/internal/promtailconvert/testdata/source_pipeline_example.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/source_pipeline_example.yaml rename to internal/converter/internal/promtailconvert/testdata/source_pipeline_example.yaml diff --git a/converter/internal/promtailconvert/testdata/static_pipeline_example.river b/internal/converter/internal/promtailconvert/testdata/static_pipeline_example.river similarity index 100% rename from converter/internal/promtailconvert/testdata/static_pipeline_example.river rename to internal/converter/internal/promtailconvert/testdata/static_pipeline_example.river diff --git a/converter/internal/promtailconvert/testdata/static_pipeline_example.yaml b/internal/converter/internal/promtailconvert/testdata/static_pipeline_example.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/static_pipeline_example.yaml rename to internal/converter/internal/promtailconvert/testdata/static_pipeline_example.yaml diff --git a/converter/internal/promtailconvert/testdata/syslog.river b/internal/converter/internal/promtailconvert/testdata/syslog.river similarity index 100% rename from converter/internal/promtailconvert/testdata/syslog.river rename to internal/converter/internal/promtailconvert/testdata/syslog.river diff --git a/converter/internal/promtailconvert/testdata/syslog.yaml b/internal/converter/internal/promtailconvert/testdata/syslog.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/syslog.yaml rename to internal/converter/internal/promtailconvert/testdata/syslog.yaml diff --git a/converter/internal/promtailconvert/testdata/triton.river b/internal/converter/internal/promtailconvert/testdata/triton.river similarity index 100% rename from converter/internal/promtailconvert/testdata/triton.river rename to internal/converter/internal/promtailconvert/testdata/triton.river diff --git a/converter/internal/promtailconvert/testdata/triton.yaml b/internal/converter/internal/promtailconvert/testdata/triton.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/triton.yaml rename to internal/converter/internal/promtailconvert/testdata/triton.yaml diff --git a/converter/internal/promtailconvert/testdata/unsupported.diags b/internal/converter/internal/promtailconvert/testdata/unsupported.diags similarity index 100% rename from converter/internal/promtailconvert/testdata/unsupported.diags rename to internal/converter/internal/promtailconvert/testdata/unsupported.diags diff --git a/converter/internal/promtailconvert/testdata/unsupported.yaml b/internal/converter/internal/promtailconvert/testdata/unsupported.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/unsupported.yaml rename to internal/converter/internal/promtailconvert/testdata/unsupported.yaml diff --git a/converter/internal/promtailconvert/testdata/windowsevents.river b/internal/converter/internal/promtailconvert/testdata/windowsevents.river similarity index 100% rename from converter/internal/promtailconvert/testdata/windowsevents.river rename to internal/converter/internal/promtailconvert/testdata/windowsevents.river diff --git a/converter/internal/promtailconvert/testdata/windowsevents.yaml b/internal/converter/internal/promtailconvert/testdata/windowsevents.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/windowsevents.yaml rename to internal/converter/internal/promtailconvert/testdata/windowsevents.yaml diff --git a/converter/internal/promtailconvert/testdata/windowsevents_relabel.river b/internal/converter/internal/promtailconvert/testdata/windowsevents_relabel.river similarity index 100% rename from converter/internal/promtailconvert/testdata/windowsevents_relabel.river rename to internal/converter/internal/promtailconvert/testdata/windowsevents_relabel.river diff --git a/converter/internal/promtailconvert/testdata/windowsevents_relabel.yaml b/internal/converter/internal/promtailconvert/testdata/windowsevents_relabel.yaml similarity index 100% rename from converter/internal/promtailconvert/testdata/windowsevents_relabel.yaml rename to internal/converter/internal/promtailconvert/testdata/windowsevents_relabel.yaml diff --git a/converter/internal/promtailconvert/validate.go b/internal/converter/internal/promtailconvert/validate.go similarity index 98% rename from converter/internal/promtailconvert/validate.go rename to internal/converter/internal/promtailconvert/validate.go index 817601d486..182203e287 100644 --- a/converter/internal/promtailconvert/validate.go +++ b/internal/converter/internal/promtailconvert/validate.go @@ -1,7 +1,7 @@ package promtailconvert import ( - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/converter/diag" promtailcfg "github.com/grafana/loki/clients/pkg/promtail/config" ) diff --git a/converter/internal/staticconvert/internal/build/apache_exporter.go b/internal/converter/internal/staticconvert/internal/build/apache_exporter.go similarity index 76% rename from converter/internal/staticconvert/internal/build/apache_exporter.go rename to internal/converter/internal/staticconvert/internal/build/apache_exporter.go index d6a6a78ff5..41cd1e311c 100644 --- a/converter/internal/staticconvert/internal/build/apache_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/apache_exporter.go @@ -1,10 +1,10 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/apache" - "github.com/grafana/agent/pkg/integrations/apache_http" - apache_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/apache_http" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/apache" + "github.com/grafana/agent/internal/static/integrations/apache_http" + apache_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/apache_http" ) func (b *IntegrationsConfigBuilder) appendApacheExporter(config *apache_http.Config) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/app_agent_receiver.go b/internal/converter/internal/staticconvert/internal/build/app_agent_receiver.go similarity index 86% rename from converter/internal/staticconvert/internal/build/app_agent_receiver.go rename to internal/converter/internal/staticconvert/internal/build/app_agent_receiver.go index d9bc0267c0..d5179e9c11 100644 --- a/converter/internal/staticconvert/internal/build/app_agent_receiver.go +++ b/internal/converter/internal/staticconvert/internal/build/app_agent_receiver.go @@ -4,12 +4,12 @@ import ( "fmt" "github.com/alecthomas/units" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/component/faro/receiver" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - app_agent_receiver_v2 "github.com/grafana/agent/pkg/integrations/v2/app_agent_receiver" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/component/faro/receiver" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + app_agent_receiver_v2 "github.com/grafana/agent/internal/static/integrations/v2/app_agent_receiver" "github.com/grafana/river/rivertypes" "github.com/grafana/river/scanner" ) diff --git a/converter/internal/staticconvert/internal/build/azure_exporter.go b/internal/converter/internal/staticconvert/internal/build/azure_exporter.go similarity index 84% rename from converter/internal/staticconvert/internal/build/azure_exporter.go rename to internal/converter/internal/staticconvert/internal/build/azure_exporter.go index b51b36103d..90493479f9 100644 --- a/converter/internal/staticconvert/internal/build/azure_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/azure_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/azure" - "github.com/grafana/agent/pkg/integrations/azure_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/azure" + "github.com/grafana/agent/internal/static/integrations/azure_exporter" ) func (b *IntegrationsConfigBuilder) appendAzureExporter(config *azure_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/blackbox_exporter.go b/internal/converter/internal/staticconvert/internal/build/blackbox_exporter.go similarity index 85% rename from converter/internal/staticconvert/internal/build/blackbox_exporter.go rename to internal/converter/internal/staticconvert/internal/build/blackbox_exporter.go index 70007319ae..38bd62c53c 100644 --- a/converter/internal/staticconvert/internal/build/blackbox_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/blackbox_exporter.go @@ -3,10 +3,10 @@ package build import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/blackbox" - "github.com/grafana/agent/pkg/integrations/blackbox_exporter" - blackbox_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/blackbox_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/blackbox" + "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" + blackbox_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/blackbox_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/builder.go b/internal/converter/internal/staticconvert/internal/build/builder.go similarity index 81% rename from converter/internal/staticconvert/internal/build/builder.go rename to internal/converter/internal/staticconvert/internal/build/builder.go index dadc4ae3fd..68e35d2880 100644 --- a/converter/internal/staticconvert/internal/build/builder.go +++ b/internal/converter/internal/staticconvert/internal/build/builder.go @@ -4,49 +4,49 @@ import ( "fmt" "strings" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/remotewrite" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert" - "github.com/grafana/agent/pkg/config" - agent_exporter "github.com/grafana/agent/pkg/integrations/agent" - "github.com/grafana/agent/pkg/integrations/apache_http" - "github.com/grafana/agent/pkg/integrations/azure_exporter" - "github.com/grafana/agent/pkg/integrations/blackbox_exporter" - "github.com/grafana/agent/pkg/integrations/cadvisor" - "github.com/grafana/agent/pkg/integrations/cloudwatch_exporter" - int_config "github.com/grafana/agent/pkg/integrations/config" - "github.com/grafana/agent/pkg/integrations/consul_exporter" - "github.com/grafana/agent/pkg/integrations/dnsmasq_exporter" - "github.com/grafana/agent/pkg/integrations/elasticsearch_exporter" - "github.com/grafana/agent/pkg/integrations/gcp_exporter" - "github.com/grafana/agent/pkg/integrations/github_exporter" - "github.com/grafana/agent/pkg/integrations/kafka_exporter" - "github.com/grafana/agent/pkg/integrations/memcached_exporter" - "github.com/grafana/agent/pkg/integrations/mongodb_exporter" - mssql_exporter "github.com/grafana/agent/pkg/integrations/mssql" - "github.com/grafana/agent/pkg/integrations/mysqld_exporter" - "github.com/grafana/agent/pkg/integrations/node_exporter" - "github.com/grafana/agent/pkg/integrations/oracledb_exporter" - "github.com/grafana/agent/pkg/integrations/postgres_exporter" - "github.com/grafana/agent/pkg/integrations/process_exporter" - "github.com/grafana/agent/pkg/integrations/redis_exporter" - "github.com/grafana/agent/pkg/integrations/snmp_exporter" - "github.com/grafana/agent/pkg/integrations/snowflake_exporter" - "github.com/grafana/agent/pkg/integrations/squid_exporter" - "github.com/grafana/agent/pkg/integrations/statsd_exporter" - agent_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/agent" - apache_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/apache_http" - app_agent_receiver_v2 "github.com/grafana/agent/pkg/integrations/v2/app_agent_receiver" - blackbox_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/blackbox_exporter" - common_v2 "github.com/grafana/agent/pkg/integrations/v2/common" - eventhandler_v2 "github.com/grafana/agent/pkg/integrations/v2/eventhandler" - metricsutils_v2 "github.com/grafana/agent/pkg/integrations/v2/metricsutils" - snmp_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/snmp_exporter" - vmware_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/vmware_exporter" - "github.com/grafana/agent/pkg/integrations/windows_exporter" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/remotewrite" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert" + "github.com/grafana/agent/internal/static/config" + agent_exporter "github.com/grafana/agent/internal/static/integrations/agent" + "github.com/grafana/agent/internal/static/integrations/apache_http" + "github.com/grafana/agent/internal/static/integrations/azure_exporter" + "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" + "github.com/grafana/agent/internal/static/integrations/cadvisor" + "github.com/grafana/agent/internal/static/integrations/cloudwatch_exporter" + int_config "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/internal/static/integrations/consul_exporter" + "github.com/grafana/agent/internal/static/integrations/dnsmasq_exporter" + "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" + "github.com/grafana/agent/internal/static/integrations/gcp_exporter" + "github.com/grafana/agent/internal/static/integrations/github_exporter" + "github.com/grafana/agent/internal/static/integrations/kafka_exporter" + "github.com/grafana/agent/internal/static/integrations/memcached_exporter" + "github.com/grafana/agent/internal/static/integrations/mongodb_exporter" + mssql_exporter "github.com/grafana/agent/internal/static/integrations/mssql" + "github.com/grafana/agent/internal/static/integrations/mysqld_exporter" + "github.com/grafana/agent/internal/static/integrations/node_exporter" + "github.com/grafana/agent/internal/static/integrations/oracledb_exporter" + "github.com/grafana/agent/internal/static/integrations/postgres_exporter" + "github.com/grafana/agent/internal/static/integrations/process_exporter" + "github.com/grafana/agent/internal/static/integrations/redis_exporter" + "github.com/grafana/agent/internal/static/integrations/snmp_exporter" + "github.com/grafana/agent/internal/static/integrations/snowflake_exporter" + "github.com/grafana/agent/internal/static/integrations/squid_exporter" + "github.com/grafana/agent/internal/static/integrations/statsd_exporter" + agent_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/agent" + apache_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/apache_http" + app_agent_receiver_v2 "github.com/grafana/agent/internal/static/integrations/v2/app_agent_receiver" + blackbox_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/blackbox_exporter" + common_v2 "github.com/grafana/agent/internal/static/integrations/v2/common" + eventhandler_v2 "github.com/grafana/agent/internal/static/integrations/v2/eventhandler" + metricsutils_v2 "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + snmp_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/snmp_exporter" + vmware_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/vmware_exporter" + "github.com/grafana/agent/internal/static/integrations/windows_exporter" "github.com/grafana/river/scanner" "github.com/grafana/river/token/builder" "github.com/prometheus/common/model" diff --git a/converter/internal/staticconvert/internal/build/cadvisor_exporter.go b/internal/converter/internal/staticconvert/internal/build/cadvisor_exporter.go similarity index 86% rename from converter/internal/staticconvert/internal/build/cadvisor_exporter.go rename to internal/converter/internal/staticconvert/internal/build/cadvisor_exporter.go index 0c6445c537..00c8ab7089 100644 --- a/converter/internal/staticconvert/internal/build/cadvisor_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/cadvisor_exporter.go @@ -3,9 +3,9 @@ package build import ( "time" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/cadvisor" - cadvisor_integration "github.com/grafana/agent/pkg/integrations/cadvisor" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/cadvisor" + cadvisor_integration "github.com/grafana/agent/internal/static/integrations/cadvisor" ) func (b *IntegrationsConfigBuilder) appendCadvisorExporter(config *cadvisor_integration.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go b/internal/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go similarity index 93% rename from converter/internal/staticconvert/internal/build/cloudwatch_exporter.go rename to internal/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go index 0d13d8a1c5..d288c090e7 100644 --- a/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/cloudwatch" - "github.com/grafana/agent/pkg/integrations/cloudwatch_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/cloudwatch" + "github.com/grafana/agent/internal/static/integrations/cloudwatch_exporter" ) func (b *IntegrationsConfigBuilder) appendCloudwatchExporter(config *cloudwatch_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/consul_exporter.go b/internal/converter/internal/staticconvert/internal/build/consul_exporter.go similarity index 81% rename from converter/internal/staticconvert/internal/build/consul_exporter.go rename to internal/converter/internal/staticconvert/internal/build/consul_exporter.go index 89d0221ff4..8281aa84c4 100644 --- a/converter/internal/staticconvert/internal/build/consul_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/consul_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/consul" - "github.com/grafana/agent/pkg/integrations/consul_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/consul" + "github.com/grafana/agent/internal/static/integrations/consul_exporter" ) func (b *IntegrationsConfigBuilder) appendConsulExporter(config *consul_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go b/internal/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go similarity index 70% rename from converter/internal/staticconvert/internal/build/dnsmasq_exporter.go rename to internal/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go index fa2a5e43a9..1bcc43071e 100644 --- a/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/dnsmasq" - "github.com/grafana/agent/pkg/integrations/dnsmasq_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/dnsmasq" + "github.com/grafana/agent/internal/static/integrations/dnsmasq_exporter" ) func (b *IntegrationsConfigBuilder) appendDnsmasqExporter(config *dnsmasq_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go b/internal/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go similarity index 84% rename from converter/internal/staticconvert/internal/build/elasticsearch_exporter.go rename to internal/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go index 67dda9e028..21fc667211 100644 --- a/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go @@ -1,10 +1,10 @@ package build import ( - commonCfg "github.com/grafana/agent/component/common/config" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/elasticsearch" - "github.com/grafana/agent/pkg/integrations/elasticsearch_exporter" + commonCfg "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/elasticsearch" + "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/eventhandler.go b/internal/converter/internal/staticconvert/internal/build/eventhandler.go similarity index 88% rename from converter/internal/staticconvert/internal/build/eventhandler.go rename to internal/converter/internal/staticconvert/internal/build/eventhandler.go index 9d61e33d6b..ef0dad2743 100644 --- a/converter/internal/staticconvert/internal/build/eventhandler.go +++ b/internal/converter/internal/staticconvert/internal/build/eventhandler.go @@ -3,13 +3,13 @@ package build import ( "fmt" - "github.com/grafana/agent/component/common/loki" - flow_relabel "github.com/grafana/agent/component/common/relabel" - "github.com/grafana/agent/component/loki/relabel" - "github.com/grafana/agent/component/loki/source/kubernetes_events" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - eventhandler_v2 "github.com/grafana/agent/pkg/integrations/v2/eventhandler" + "github.com/grafana/agent/internal/component/common/loki" + flow_relabel "github.com/grafana/agent/internal/component/common/relabel" + "github.com/grafana/agent/internal/component/loki/relabel" + "github.com/grafana/agent/internal/component/loki/source/kubernetes_events" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + eventhandler_v2 "github.com/grafana/agent/internal/static/integrations/v2/eventhandler" "github.com/grafana/river/scanner" ) diff --git a/converter/internal/staticconvert/internal/build/gcp_exporter.go b/internal/converter/internal/staticconvert/internal/build/gcp_exporter.go similarity index 78% rename from converter/internal/staticconvert/internal/build/gcp_exporter.go rename to internal/converter/internal/staticconvert/internal/build/gcp_exporter.go index a864c416fa..823d4bfcca 100644 --- a/converter/internal/staticconvert/internal/build/gcp_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/gcp_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/gcp" - "github.com/grafana/agent/pkg/integrations/gcp_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/gcp" + "github.com/grafana/agent/internal/static/integrations/gcp_exporter" ) func (b *IntegrationsConfigBuilder) appendGcpExporter(config *gcp_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/github_exporter.go b/internal/converter/internal/staticconvert/internal/build/github_exporter.go similarity index 75% rename from converter/internal/staticconvert/internal/build/github_exporter.go rename to internal/converter/internal/staticconvert/internal/build/github_exporter.go index 4fcc4d4e0e..5531b554c8 100644 --- a/converter/internal/staticconvert/internal/build/github_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/github_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/github" - "github.com/grafana/agent/pkg/integrations/github_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/github" + "github.com/grafana/agent/internal/static/integrations/github_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/global_context.go b/internal/converter/internal/staticconvert/internal/build/global_context.go similarity index 73% rename from converter/internal/staticconvert/internal/build/global_context.go rename to internal/converter/internal/staticconvert/internal/build/global_context.go index 3f4bd73583..270e84fc33 100644 --- a/converter/internal/staticconvert/internal/build/global_context.go +++ b/internal/converter/internal/staticconvert/internal/build/global_context.go @@ -1,8 +1,8 @@ package build import ( - "github.com/grafana/agent/component/prometheus/remotewrite" - "github.com/grafana/agent/converter/internal/common" + "github.com/grafana/agent/internal/component/prometheus/remotewrite" + "github.com/grafana/agent/internal/converter/internal/common" ) type GlobalContext struct { diff --git a/converter/internal/staticconvert/internal/build/kafka_exporter.go b/internal/converter/internal/staticconvert/internal/build/kafka_exporter.go similarity index 87% rename from converter/internal/staticconvert/internal/build/kafka_exporter.go rename to internal/converter/internal/staticconvert/internal/build/kafka_exporter.go index 16be4275dd..b5d180a7f8 100644 --- a/converter/internal/staticconvert/internal/build/kafka_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/kafka_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/kafka" - "github.com/grafana/agent/pkg/integrations/kafka_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/kafka" + "github.com/grafana/agent/internal/static/integrations/kafka_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/logging.go b/internal/converter/internal/staticconvert/internal/build/logging.go similarity index 74% rename from converter/internal/staticconvert/internal/build/logging.go rename to internal/converter/internal/staticconvert/internal/build/logging.go index 24c4d9ba40..f64eb11de4 100644 --- a/converter/internal/staticconvert/internal/build/logging.go +++ b/internal/converter/internal/staticconvert/internal/build/logging.go @@ -3,9 +3,9 @@ package build import ( "reflect" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/pkg/server" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/static/server" ) func (b *IntegrationsConfigBuilder) appendLogging(config *server.Config) { diff --git a/converter/internal/staticconvert/internal/build/memcached_exporter.go b/internal/converter/internal/staticconvert/internal/build/memcached_exporter.go similarity index 65% rename from converter/internal/staticconvert/internal/build/memcached_exporter.go rename to internal/converter/internal/staticconvert/internal/build/memcached_exporter.go index e43afdb7d4..46176c2348 100644 --- a/converter/internal/staticconvert/internal/build/memcached_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/memcached_exporter.go @@ -1,10 +1,10 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/memcached" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/pkg/integrations/memcached_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/memcached" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/static/integrations/memcached_exporter" ) func (b *IntegrationsConfigBuilder) appendMemcachedExporter(config *memcached_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/mongodb_exporter.go b/internal/converter/internal/staticconvert/internal/build/mongodb_exporter.go similarity index 75% rename from converter/internal/staticconvert/internal/build/mongodb_exporter.go rename to internal/converter/internal/staticconvert/internal/build/mongodb_exporter.go index 59e7da7718..36839e97c2 100644 --- a/converter/internal/staticconvert/internal/build/mongodb_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/mongodb_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/mongodb" - "github.com/grafana/agent/pkg/integrations/mongodb_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/mongodb" + "github.com/grafana/agent/internal/static/integrations/mongodb_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/mssql_exporter.go b/internal/converter/internal/staticconvert/internal/build/mssql_exporter.go similarity index 74% rename from converter/internal/staticconvert/internal/build/mssql_exporter.go rename to internal/converter/internal/staticconvert/internal/build/mssql_exporter.go index f6154a65c9..87ef828edf 100644 --- a/converter/internal/staticconvert/internal/build/mssql_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/mssql_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/mssql" - mssql_exporter "github.com/grafana/agent/pkg/integrations/mssql" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/mssql" + mssql_exporter "github.com/grafana/agent/internal/static/integrations/mssql" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/mysqld_exporter.go b/internal/converter/internal/staticconvert/internal/build/mysqld_exporter.go similarity index 89% rename from converter/internal/staticconvert/internal/build/mysqld_exporter.go rename to internal/converter/internal/staticconvert/internal/build/mysqld_exporter.go index 51b3a20a8d..4694e934a6 100644 --- a/converter/internal/staticconvert/internal/build/mysqld_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/mysqld_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/mysql" - "github.com/grafana/agent/pkg/integrations/mysqld_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/mysql" + "github.com/grafana/agent/internal/static/integrations/mysqld_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/node_exporter.go b/internal/converter/internal/staticconvert/internal/build/node_exporter.go similarity index 94% rename from converter/internal/staticconvert/internal/build/node_exporter.go rename to internal/converter/internal/staticconvert/internal/build/node_exporter.go index 3e896d3b10..32b0a57e59 100644 --- a/converter/internal/staticconvert/internal/build/node_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/node_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/unix" - "github.com/grafana/agent/pkg/integrations/node_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/unix" + "github.com/grafana/agent/internal/static/integrations/node_exporter" ) func (b *IntegrationsConfigBuilder) appendNodeExporter(config *node_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/oracledb_exporter.go b/internal/converter/internal/staticconvert/internal/build/oracledb_exporter.go similarity index 74% rename from converter/internal/staticconvert/internal/build/oracledb_exporter.go rename to internal/converter/internal/staticconvert/internal/build/oracledb_exporter.go index c786bd3b2d..bbf0a859e6 100644 --- a/converter/internal/staticconvert/internal/build/oracledb_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/oracledb_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/oracledb" - "github.com/grafana/agent/pkg/integrations/oracledb_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/oracledb" + "github.com/grafana/agent/internal/static/integrations/oracledb_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/postgres_exporter.go b/internal/converter/internal/staticconvert/internal/build/postgres_exporter.go similarity index 82% rename from converter/internal/staticconvert/internal/build/postgres_exporter.go rename to internal/converter/internal/staticconvert/internal/build/postgres_exporter.go index 2fe1103110..9a54a7251d 100644 --- a/converter/internal/staticconvert/internal/build/postgres_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/postgres_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/postgres" - "github.com/grafana/agent/pkg/integrations/postgres_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/postgres" + "github.com/grafana/agent/internal/static/integrations/postgres_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/process_exporter.go b/internal/converter/internal/staticconvert/internal/build/process_exporter.go similarity index 81% rename from converter/internal/staticconvert/internal/build/process_exporter.go rename to internal/converter/internal/staticconvert/internal/build/process_exporter.go index 1224deca78..4634b40982 100644 --- a/converter/internal/staticconvert/internal/build/process_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/process_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/process" - "github.com/grafana/agent/pkg/integrations/process_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/process" + "github.com/grafana/agent/internal/static/integrations/process_exporter" ) func (b *IntegrationsConfigBuilder) appendProcessExporter(config *process_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/redis_exporter.go b/internal/converter/internal/staticconvert/internal/build/redis_exporter.go similarity index 91% rename from converter/internal/staticconvert/internal/build/redis_exporter.go rename to internal/converter/internal/staticconvert/internal/build/redis_exporter.go index 56e497807b..659bb122db 100644 --- a/converter/internal/staticconvert/internal/build/redis_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/redis_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/redis" - "github.com/grafana/agent/pkg/integrations/redis_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/redis" + "github.com/grafana/agent/internal/static/integrations/redis_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/self_exporter.go b/internal/converter/internal/staticconvert/internal/build/self_exporter.go similarity index 69% rename from converter/internal/staticconvert/internal/build/self_exporter.go rename to internal/converter/internal/staticconvert/internal/build/self_exporter.go index ee6f3cc935..54e81e2a9e 100644 --- a/converter/internal/staticconvert/internal/build/self_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/self_exporter.go @@ -1,10 +1,10 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/self" - agent_exporter "github.com/grafana/agent/pkg/integrations/agent" - agent_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/agent" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/self" + agent_exporter "github.com/grafana/agent/internal/static/integrations/agent" + agent_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/agent" ) func (b *IntegrationsConfigBuilder) appendAgentExporter(config *agent_exporter.Config) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/server.go b/internal/converter/internal/staticconvert/internal/build/server.go similarity index 94% rename from converter/internal/staticconvert/internal/build/server.go rename to internal/converter/internal/staticconvert/internal/build/server.go index 0204101ae2..187f10f6c7 100644 --- a/converter/internal/staticconvert/internal/build/server.go +++ b/internal/converter/internal/staticconvert/internal/build/server.go @@ -3,9 +3,9 @@ package build import ( "reflect" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/service/http" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/static/server" ) func (b *IntegrationsConfigBuilder) appendServer(config *server.Config) { diff --git a/converter/internal/staticconvert/internal/build/snmp_exporter.go b/internal/converter/internal/staticconvert/internal/build/snmp_exporter.go similarity index 89% rename from converter/internal/staticconvert/internal/build/snmp_exporter.go rename to internal/converter/internal/staticconvert/internal/build/snmp_exporter.go index 9b56c2fbd8..23dab102a8 100644 --- a/converter/internal/staticconvert/internal/build/snmp_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/snmp_exporter.go @@ -1,11 +1,11 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/snmp" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/pkg/integrations/snmp_exporter" - snmp_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/snmp_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/snmp" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/static/integrations/snmp_exporter" + snmp_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/snmp_exporter" "github.com/grafana/river/rivertypes" snmp_config "github.com/prometheus/snmp_exporter/config" ) diff --git a/converter/internal/staticconvert/internal/build/snowflake_exporter.go b/internal/converter/internal/staticconvert/internal/build/snowflake_exporter.go similarity index 74% rename from converter/internal/staticconvert/internal/build/snowflake_exporter.go rename to internal/converter/internal/staticconvert/internal/build/snowflake_exporter.go index ed0f10ff1c..b496258d60 100644 --- a/converter/internal/staticconvert/internal/build/snowflake_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/snowflake_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/snowflake" - "github.com/grafana/agent/pkg/integrations/snowflake_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/snowflake" + "github.com/grafana/agent/internal/static/integrations/snowflake_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/squid_exporter.go b/internal/converter/internal/staticconvert/internal/build/squid_exporter.go similarity index 72% rename from converter/internal/staticconvert/internal/build/squid_exporter.go rename to internal/converter/internal/staticconvert/internal/build/squid_exporter.go index 4283f4ebe0..9999a4c805 100644 --- a/converter/internal/staticconvert/internal/build/squid_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/squid_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/squid" - "github.com/grafana/agent/pkg/integrations/squid_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/squid" + "github.com/grafana/agent/internal/static/integrations/squid_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/statsd_exporter.go b/internal/converter/internal/staticconvert/internal/build/statsd_exporter.go similarity index 83% rename from converter/internal/staticconvert/internal/build/statsd_exporter.go rename to internal/converter/internal/staticconvert/internal/build/statsd_exporter.go index 3756a876b8..5f8b509565 100644 --- a/converter/internal/staticconvert/internal/build/statsd_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/statsd_exporter.go @@ -1,10 +1,10 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/statsd" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/pkg/integrations/statsd_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/statsd" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/static/integrations/statsd_exporter" ) func (b *IntegrationsConfigBuilder) appendStatsdExporter(config *statsd_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/internal/build/vmware_exporter.go b/internal/converter/internal/staticconvert/internal/build/vmware_exporter.go similarity index 77% rename from converter/internal/staticconvert/internal/build/vmware_exporter.go rename to internal/converter/internal/staticconvert/internal/build/vmware_exporter.go index 61b595330b..656395b668 100644 --- a/converter/internal/staticconvert/internal/build/vmware_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/vmware_exporter.go @@ -1,9 +1,9 @@ package build import ( - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/vsphere" - vmware_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/vmware_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/vsphere" + vmware_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/vmware_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/converter/internal/staticconvert/internal/build/windows_exporter.go b/internal/converter/internal/staticconvert/internal/build/windows_exporter.go similarity index 92% rename from converter/internal/staticconvert/internal/build/windows_exporter.go rename to internal/converter/internal/staticconvert/internal/build/windows_exporter.go index 2f0b110a68..7c88ae7d47 100644 --- a/converter/internal/staticconvert/internal/build/windows_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/windows_exporter.go @@ -3,9 +3,9 @@ package build import ( "strings" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/component/prometheus/exporter/windows" - "github.com/grafana/agent/pkg/integrations/windows_exporter" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/component/prometheus/exporter/windows" + "github.com/grafana/agent/internal/static/integrations/windows_exporter" ) func (b *IntegrationsConfigBuilder) appendWindowsExporter(config *windows_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/converter/internal/staticconvert/staticconvert.go b/internal/converter/internal/staticconvert/staticconvert.go similarity index 90% rename from converter/internal/staticconvert/staticconvert.go rename to internal/converter/internal/staticconvert/staticconvert.go index 5540446b50..bb4a94f14b 100644 --- a/converter/internal/staticconvert/staticconvert.go +++ b/internal/converter/internal/staticconvert/staticconvert.go @@ -5,14 +5,14 @@ import ( "flag" "fmt" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/converter/internal/prometheusconvert" - "github.com/grafana/agent/converter/internal/promtailconvert" - "github.com/grafana/agent/converter/internal/staticconvert/internal/build" - "github.com/grafana/agent/pkg/config" - "github.com/grafana/agent/pkg/logs" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/converter/internal/prometheusconvert" + "github.com/grafana/agent/internal/converter/internal/promtailconvert" + "github.com/grafana/agent/internal/converter/internal/staticconvert/internal/build" + "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/internal/static/logs" promtail_config "github.com/grafana/loki/clients/pkg/promtail/config" "github.com/grafana/loki/clients/pkg/promtail/limit" "github.com/grafana/loki/clients/pkg/promtail/targets/file" @@ -20,7 +20,7 @@ import ( "github.com/grafana/river/token/builder" prom_config "github.com/prometheus/prometheus/config" - _ "github.com/grafana/agent/pkg/integrations/install" // Install integrations + _ "github.com/grafana/agent/internal/static/integrations/install" // Install integrations ) // Convert implements a Static config converter. diff --git a/converter/internal/staticconvert/staticconvert_test.go b/internal/converter/internal/staticconvert/staticconvert_test.go similarity index 71% rename from converter/internal/staticconvert/staticconvert_test.go rename to internal/converter/internal/staticconvert/staticconvert_test.go index 42a79b248e..a38de5d018 100644 --- a/converter/internal/staticconvert/staticconvert_test.go +++ b/internal/converter/internal/staticconvert/staticconvert_test.go @@ -4,9 +4,9 @@ import ( "runtime" "testing" - "github.com/grafana/agent/converter/internal/staticconvert" - "github.com/grafana/agent/converter/internal/test_common" - _ "github.com/grafana/agent/pkg/metrics/instance" // Imported to override default values via the init function. + "github.com/grafana/agent/internal/converter/internal/staticconvert" + "github.com/grafana/agent/internal/converter/internal/test_common" + _ "github.com/grafana/agent/internal/static/metrics/instance" // Imported to override default values via the init function. ) func TestConvert(t *testing.T) { diff --git a/converter/internal/staticconvert/testdata-v2/integrations_v2.diags b/internal/converter/internal/staticconvert/testdata-v2/integrations_v2.diags similarity index 100% rename from converter/internal/staticconvert/testdata-v2/integrations_v2.diags rename to internal/converter/internal/staticconvert/testdata-v2/integrations_v2.diags diff --git a/converter/internal/staticconvert/testdata-v2/integrations_v2.river b/internal/converter/internal/staticconvert/testdata-v2/integrations_v2.river similarity index 100% rename from converter/internal/staticconvert/testdata-v2/integrations_v2.river rename to internal/converter/internal/staticconvert/testdata-v2/integrations_v2.river diff --git a/converter/internal/staticconvert/testdata-v2/integrations_v2.yaml b/internal/converter/internal/staticconvert/testdata-v2/integrations_v2.yaml similarity index 100% rename from converter/internal/staticconvert/testdata-v2/integrations_v2.yaml rename to internal/converter/internal/staticconvert/testdata-v2/integrations_v2.yaml diff --git a/converter/internal/staticconvert/testdata-v2/missing_metrics_config.diags b/internal/converter/internal/staticconvert/testdata-v2/missing_metrics_config.diags similarity index 100% rename from converter/internal/staticconvert/testdata-v2/missing_metrics_config.diags rename to internal/converter/internal/staticconvert/testdata-v2/missing_metrics_config.diags diff --git a/converter/internal/staticconvert/testdata-v2/missing_metrics_config.yaml b/internal/converter/internal/staticconvert/testdata-v2/missing_metrics_config.yaml similarity index 100% rename from converter/internal/staticconvert/testdata-v2/missing_metrics_config.yaml rename to internal/converter/internal/staticconvert/testdata-v2/missing_metrics_config.yaml diff --git a/converter/internal/staticconvert/testdata-v2/unsupported.diags b/internal/converter/internal/staticconvert/testdata-v2/unsupported.diags similarity index 100% rename from converter/internal/staticconvert/testdata-v2/unsupported.diags rename to internal/converter/internal/staticconvert/testdata-v2/unsupported.diags diff --git a/converter/internal/staticconvert/testdata-v2/unsupported.river b/internal/converter/internal/staticconvert/testdata-v2/unsupported.river similarity index 100% rename from converter/internal/staticconvert/testdata-v2/unsupported.river rename to internal/converter/internal/staticconvert/testdata-v2/unsupported.river diff --git a/converter/internal/staticconvert/testdata-v2/unsupported.yaml b/internal/converter/internal/staticconvert/testdata-v2/unsupported.yaml similarity index 100% rename from converter/internal/staticconvert/testdata-v2/unsupported.yaml rename to internal/converter/internal/staticconvert/testdata-v2/unsupported.yaml diff --git a/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.diags b/internal/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.diags similarity index 100% rename from converter/internal/staticconvert/testdata-v2_windows/integrations_v2.diags rename to internal/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.diags diff --git a/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.river b/internal/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.river similarity index 100% rename from converter/internal/staticconvert/testdata-v2_windows/integrations_v2.river rename to internal/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.river diff --git a/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.yaml b/internal/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.yaml similarity index 100% rename from converter/internal/staticconvert/testdata-v2_windows/integrations_v2.yaml rename to internal/converter/internal/staticconvert/testdata-v2_windows/integrations_v2.yaml diff --git a/converter/internal/staticconvert/testdata/dup_labels.diags b/internal/converter/internal/staticconvert/testdata/dup_labels.diags similarity index 100% rename from converter/internal/staticconvert/testdata/dup_labels.diags rename to internal/converter/internal/staticconvert/testdata/dup_labels.diags diff --git a/converter/internal/staticconvert/testdata/dup_labels.yaml b/internal/converter/internal/staticconvert/testdata/dup_labels.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/dup_labels.yaml rename to internal/converter/internal/staticconvert/testdata/dup_labels.yaml diff --git a/converter/internal/staticconvert/testdata/example-cert.pem b/internal/converter/internal/staticconvert/testdata/example-cert.pem similarity index 100% rename from converter/internal/staticconvert/testdata/example-cert.pem rename to internal/converter/internal/staticconvert/testdata/example-cert.pem diff --git a/converter/internal/staticconvert/testdata/example-key.pem b/internal/converter/internal/staticconvert/testdata/example-key.pem similarity index 100% rename from converter/internal/staticconvert/testdata/example-key.pem rename to internal/converter/internal/staticconvert/testdata/example-key.pem diff --git a/converter/internal/staticconvert/testdata/integrations.diags b/internal/converter/internal/staticconvert/testdata/integrations.diags similarity index 100% rename from converter/internal/staticconvert/testdata/integrations.diags rename to internal/converter/internal/staticconvert/testdata/integrations.diags diff --git a/converter/internal/staticconvert/testdata/integrations.river b/internal/converter/internal/staticconvert/testdata/integrations.river similarity index 100% rename from converter/internal/staticconvert/testdata/integrations.river rename to internal/converter/internal/staticconvert/testdata/integrations.river diff --git a/converter/internal/staticconvert/testdata/integrations.yaml b/internal/converter/internal/staticconvert/testdata/integrations.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/integrations.yaml rename to internal/converter/internal/staticconvert/testdata/integrations.yaml diff --git a/converter/internal/staticconvert/testdata/integrations_no_rw.diags b/internal/converter/internal/staticconvert/testdata/integrations_no_rw.diags similarity index 100% rename from converter/internal/staticconvert/testdata/integrations_no_rw.diags rename to internal/converter/internal/staticconvert/testdata/integrations_no_rw.diags diff --git a/converter/internal/staticconvert/testdata/integrations_no_rw.yaml b/internal/converter/internal/staticconvert/testdata/integrations_no_rw.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/integrations_no_rw.yaml rename to internal/converter/internal/staticconvert/testdata/integrations_no_rw.yaml diff --git a/converter/internal/staticconvert/testdata/prom_missing_name.diags b/internal/converter/internal/staticconvert/testdata/prom_missing_name.diags similarity index 100% rename from converter/internal/staticconvert/testdata/prom_missing_name.diags rename to internal/converter/internal/staticconvert/testdata/prom_missing_name.diags diff --git a/converter/internal/staticconvert/testdata/prom_missing_name.yaml b/internal/converter/internal/staticconvert/testdata/prom_missing_name.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/prom_missing_name.yaml rename to internal/converter/internal/staticconvert/testdata/prom_missing_name.yaml diff --git a/converter/internal/staticconvert/testdata/prom_remote_write.diags b/internal/converter/internal/staticconvert/testdata/prom_remote_write.diags similarity index 100% rename from converter/internal/staticconvert/testdata/prom_remote_write.diags rename to internal/converter/internal/staticconvert/testdata/prom_remote_write.diags diff --git a/converter/internal/staticconvert/testdata/prom_remote_write.river b/internal/converter/internal/staticconvert/testdata/prom_remote_write.river similarity index 100% rename from converter/internal/staticconvert/testdata/prom_remote_write.river rename to internal/converter/internal/staticconvert/testdata/prom_remote_write.river diff --git a/converter/internal/staticconvert/testdata/prom_remote_write.yaml b/internal/converter/internal/staticconvert/testdata/prom_remote_write.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/prom_remote_write.yaml rename to internal/converter/internal/staticconvert/testdata/prom_remote_write.yaml diff --git a/converter/internal/staticconvert/testdata/prom_scrape.diags b/internal/converter/internal/staticconvert/testdata/prom_scrape.diags similarity index 100% rename from converter/internal/staticconvert/testdata/prom_scrape.diags rename to internal/converter/internal/staticconvert/testdata/prom_scrape.diags diff --git a/converter/internal/staticconvert/testdata/prom_scrape.river b/internal/converter/internal/staticconvert/testdata/prom_scrape.river similarity index 100% rename from converter/internal/staticconvert/testdata/prom_scrape.river rename to internal/converter/internal/staticconvert/testdata/prom_scrape.river diff --git a/converter/internal/staticconvert/testdata/prom_scrape.yaml b/internal/converter/internal/staticconvert/testdata/prom_scrape.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/prom_scrape.yaml rename to internal/converter/internal/staticconvert/testdata/prom_scrape.yaml diff --git a/converter/internal/staticconvert/testdata/promtail_prom.diags b/internal/converter/internal/staticconvert/testdata/promtail_prom.diags similarity index 100% rename from converter/internal/staticconvert/testdata/promtail_prom.diags rename to internal/converter/internal/staticconvert/testdata/promtail_prom.diags diff --git a/converter/internal/staticconvert/testdata/promtail_prom.river b/internal/converter/internal/staticconvert/testdata/promtail_prom.river similarity index 100% rename from converter/internal/staticconvert/testdata/promtail_prom.river rename to internal/converter/internal/staticconvert/testdata/promtail_prom.river diff --git a/converter/internal/staticconvert/testdata/promtail_prom.yaml b/internal/converter/internal/staticconvert/testdata/promtail_prom.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/promtail_prom.yaml rename to internal/converter/internal/staticconvert/testdata/promtail_prom.yaml diff --git a/converter/internal/staticconvert/testdata/promtail_scrape.diags b/internal/converter/internal/staticconvert/testdata/promtail_scrape.diags similarity index 100% rename from converter/internal/staticconvert/testdata/promtail_scrape.diags rename to internal/converter/internal/staticconvert/testdata/promtail_scrape.diags diff --git a/converter/internal/staticconvert/testdata/promtail_scrape.river b/internal/converter/internal/staticconvert/testdata/promtail_scrape.river similarity index 100% rename from converter/internal/staticconvert/testdata/promtail_scrape.river rename to internal/converter/internal/staticconvert/testdata/promtail_scrape.river diff --git a/converter/internal/staticconvert/testdata/promtail_scrape.yaml b/internal/converter/internal/staticconvert/testdata/promtail_scrape.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/promtail_scrape.yaml rename to internal/converter/internal/staticconvert/testdata/promtail_scrape.yaml diff --git a/converter/internal/staticconvert/testdata/sanitize.diags b/internal/converter/internal/staticconvert/testdata/sanitize.diags similarity index 100% rename from converter/internal/staticconvert/testdata/sanitize.diags rename to internal/converter/internal/staticconvert/testdata/sanitize.diags diff --git a/converter/internal/staticconvert/testdata/sanitize.river b/internal/converter/internal/staticconvert/testdata/sanitize.river similarity index 100% rename from converter/internal/staticconvert/testdata/sanitize.river rename to internal/converter/internal/staticconvert/testdata/sanitize.river diff --git a/converter/internal/staticconvert/testdata/sanitize.yaml b/internal/converter/internal/staticconvert/testdata/sanitize.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/sanitize.yaml rename to internal/converter/internal/staticconvert/testdata/sanitize.yaml diff --git a/converter/internal/staticconvert/testdata/unsupported.diags b/internal/converter/internal/staticconvert/testdata/unsupported.diags similarity index 100% rename from converter/internal/staticconvert/testdata/unsupported.diags rename to internal/converter/internal/staticconvert/testdata/unsupported.diags diff --git a/converter/internal/staticconvert/testdata/unsupported.river b/internal/converter/internal/staticconvert/testdata/unsupported.river similarity index 100% rename from converter/internal/staticconvert/testdata/unsupported.river rename to internal/converter/internal/staticconvert/testdata/unsupported.river diff --git a/converter/internal/staticconvert/testdata/unsupported.yaml b/internal/converter/internal/staticconvert/testdata/unsupported.yaml similarity index 100% rename from converter/internal/staticconvert/testdata/unsupported.yaml rename to internal/converter/internal/staticconvert/testdata/unsupported.yaml diff --git a/converter/internal/staticconvert/testdata_windows/integrations.diags b/internal/converter/internal/staticconvert/testdata_windows/integrations.diags similarity index 100% rename from converter/internal/staticconvert/testdata_windows/integrations.diags rename to internal/converter/internal/staticconvert/testdata_windows/integrations.diags diff --git a/converter/internal/staticconvert/testdata_windows/integrations.river b/internal/converter/internal/staticconvert/testdata_windows/integrations.river similarity index 100% rename from converter/internal/staticconvert/testdata_windows/integrations.river rename to internal/converter/internal/staticconvert/testdata_windows/integrations.river diff --git a/converter/internal/staticconvert/testdata_windows/integrations.yaml b/internal/converter/internal/staticconvert/testdata_windows/integrations.yaml similarity index 100% rename from converter/internal/staticconvert/testdata_windows/integrations.yaml rename to internal/converter/internal/staticconvert/testdata_windows/integrations.yaml diff --git a/converter/internal/staticconvert/validate.go b/internal/converter/internal/staticconvert/validate.go similarity index 70% rename from converter/internal/staticconvert/validate.go rename to internal/converter/internal/staticconvert/validate.go index 2c5aeb87c1..024b57b182 100644 --- a/converter/internal/staticconvert/validate.go +++ b/internal/converter/internal/staticconvert/validate.go @@ -3,49 +3,49 @@ package staticconvert import ( "fmt" - "github.com/grafana/agent/converter/diag" - "github.com/grafana/agent/converter/internal/common" - "github.com/grafana/agent/pkg/config" - v1 "github.com/grafana/agent/pkg/integrations" - agent_exporter "github.com/grafana/agent/pkg/integrations/agent" - "github.com/grafana/agent/pkg/integrations/apache_http" - "github.com/grafana/agent/pkg/integrations/azure_exporter" - "github.com/grafana/agent/pkg/integrations/blackbox_exporter" - "github.com/grafana/agent/pkg/integrations/cadvisor" - "github.com/grafana/agent/pkg/integrations/cloudwatch_exporter" - "github.com/grafana/agent/pkg/integrations/consul_exporter" - "github.com/grafana/agent/pkg/integrations/dnsmasq_exporter" - "github.com/grafana/agent/pkg/integrations/elasticsearch_exporter" - "github.com/grafana/agent/pkg/integrations/gcp_exporter" - "github.com/grafana/agent/pkg/integrations/github_exporter" - "github.com/grafana/agent/pkg/integrations/kafka_exporter" - "github.com/grafana/agent/pkg/integrations/memcached_exporter" - "github.com/grafana/agent/pkg/integrations/mongodb_exporter" - mssql_exporter "github.com/grafana/agent/pkg/integrations/mssql" - "github.com/grafana/agent/pkg/integrations/mysqld_exporter" - "github.com/grafana/agent/pkg/integrations/node_exporter" - "github.com/grafana/agent/pkg/integrations/oracledb_exporter" - "github.com/grafana/agent/pkg/integrations/postgres_exporter" - "github.com/grafana/agent/pkg/integrations/process_exporter" - "github.com/grafana/agent/pkg/integrations/redis_exporter" - "github.com/grafana/agent/pkg/integrations/snmp_exporter" - "github.com/grafana/agent/pkg/integrations/snowflake_exporter" - "github.com/grafana/agent/pkg/integrations/squid_exporter" - "github.com/grafana/agent/pkg/integrations/statsd_exporter" - v2 "github.com/grafana/agent/pkg/integrations/v2" - agent_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/agent" - apache_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/apache_http" - app_agent_receiver_v2 "github.com/grafana/agent/pkg/integrations/v2/app_agent_receiver" - blackbox_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/blackbox_exporter" - eventhandler_v2 "github.com/grafana/agent/pkg/integrations/v2/eventhandler" - metricsutils_v2 "github.com/grafana/agent/pkg/integrations/v2/metricsutils" - snmp_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/snmp_exporter" - vmware_exporter_v2 "github.com/grafana/agent/pkg/integrations/v2/vmware_exporter" - "github.com/grafana/agent/pkg/integrations/windows_exporter" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/traces" + "github.com/grafana/agent/internal/converter/diag" + "github.com/grafana/agent/internal/converter/internal/common" + "github.com/grafana/agent/internal/static/config" + v1 "github.com/grafana/agent/internal/static/integrations" + agent_exporter "github.com/grafana/agent/internal/static/integrations/agent" + "github.com/grafana/agent/internal/static/integrations/apache_http" + "github.com/grafana/agent/internal/static/integrations/azure_exporter" + "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" + "github.com/grafana/agent/internal/static/integrations/cadvisor" + "github.com/grafana/agent/internal/static/integrations/cloudwatch_exporter" + "github.com/grafana/agent/internal/static/integrations/consul_exporter" + "github.com/grafana/agent/internal/static/integrations/dnsmasq_exporter" + "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" + "github.com/grafana/agent/internal/static/integrations/gcp_exporter" + "github.com/grafana/agent/internal/static/integrations/github_exporter" + "github.com/grafana/agent/internal/static/integrations/kafka_exporter" + "github.com/grafana/agent/internal/static/integrations/memcached_exporter" + "github.com/grafana/agent/internal/static/integrations/mongodb_exporter" + mssql_exporter "github.com/grafana/agent/internal/static/integrations/mssql" + "github.com/grafana/agent/internal/static/integrations/mysqld_exporter" + "github.com/grafana/agent/internal/static/integrations/node_exporter" + "github.com/grafana/agent/internal/static/integrations/oracledb_exporter" + "github.com/grafana/agent/internal/static/integrations/postgres_exporter" + "github.com/grafana/agent/internal/static/integrations/process_exporter" + "github.com/grafana/agent/internal/static/integrations/redis_exporter" + "github.com/grafana/agent/internal/static/integrations/snmp_exporter" + "github.com/grafana/agent/internal/static/integrations/snowflake_exporter" + "github.com/grafana/agent/internal/static/integrations/squid_exporter" + "github.com/grafana/agent/internal/static/integrations/statsd_exporter" + v2 "github.com/grafana/agent/internal/static/integrations/v2" + agent_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/agent" + apache_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/apache_http" + app_agent_receiver_v2 "github.com/grafana/agent/internal/static/integrations/v2/app_agent_receiver" + blackbox_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/blackbox_exporter" + eventhandler_v2 "github.com/grafana/agent/internal/static/integrations/v2/eventhandler" + metricsutils_v2 "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + snmp_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/snmp_exporter" + vmware_exporter_v2 "github.com/grafana/agent/internal/static/integrations/v2/vmware_exporter" + "github.com/grafana/agent/internal/static/integrations/windows_exporter" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/static/traces" _ "github.com/prometheus/prometheus/discovery/install" // Register Prometheus SDs ) diff --git a/converter/internal/test_common/testing.go b/internal/converter/internal/test_common/testing.go similarity index 94% rename from converter/internal/test_common/testing.go rename to internal/converter/internal/test_common/testing.go index 8be5141f91..fec09f30af 100644 --- a/converter/internal/test_common/testing.go +++ b/internal/converter/internal/test_common/testing.go @@ -12,14 +12,14 @@ import ( "strings" "testing" - "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/service" - cluster_service "github.com/grafana/agent/service/cluster" - http_service "github.com/grafana/agent/service/http" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/service" + cluster_service "github.com/grafana/agent/internal/service/cluster" + http_service "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/service/labelstore" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" ) diff --git a/pkg/flow/componenttest/componenttest.go b/internal/flow/componenttest/componenttest.go similarity index 96% rename from pkg/flow/componenttest/componenttest.go rename to internal/flow/componenttest/componenttest.go index fad1997304..be3a117d40 100644 --- a/pkg/flow/componenttest/componenttest.go +++ b/internal/flow/componenttest/componenttest.go @@ -9,13 +9,13 @@ import ( "sync" "time" - "github.com/grafana/agent/service/labelstore" + "github.com/grafana/agent/internal/service/labelstore" "github.com/prometheus/client_golang/prometheus" "go.uber.org/atomic" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/logging" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/logging" "go.opentelemetry.io/otel/trace/noop" ) diff --git a/pkg/flow/componenttest/context.go b/internal/flow/componenttest/context.go similarity index 100% rename from pkg/flow/componenttest/context.go rename to internal/flow/componenttest/context.go diff --git a/pkg/flow/componenttest/testfailmodule.go b/internal/flow/componenttest/testfailmodule.go similarity index 93% rename from pkg/flow/componenttest/testfailmodule.go rename to internal/flow/componenttest/testfailmodule.go index e7357a36cc..297579880b 100644 --- a/pkg/flow/componenttest/testfailmodule.go +++ b/internal/flow/componenttest/testfailmodule.go @@ -4,8 +4,8 @@ import ( "context" "fmt" - "github.com/grafana/agent/component" - mod "github.com/grafana/agent/component/module" + "github.com/grafana/agent/internal/component" + mod "github.com/grafana/agent/internal/component/module" "github.com/grafana/agent/internal/featuregate" ) diff --git a/pkg/flow/declare_test.go b/internal/flow/declare_test.go similarity index 98% rename from pkg/flow/declare_test.go rename to internal/flow/declare_test.go index 00253324a4..d66505c8fb 100644 --- a/pkg/flow/declare_test.go +++ b/internal/flow/declare_test.go @@ -8,10 +8,10 @@ import ( "time" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/internal/testcomponents" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/internal/testcomponents" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/service" "github.com/stretchr/testify/require" ) diff --git a/pkg/flow/flow.go b/internal/flow/flow.go similarity index 97% rename from pkg/flow/flow.go rename to internal/flow/flow.go index 3610a67fa7..7fbc10ac30 100644 --- a/pkg/flow/flow.go +++ b/internal/flow/flow.go @@ -52,12 +52,12 @@ import ( "time" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/worker" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/flow/tracing" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/worker" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/flow/tracing" + "github.com/grafana/agent/internal/service" "github.com/prometheus/client_golang/prometheus" "go.uber.org/atomic" ) diff --git a/pkg/flow/flow_components.go b/internal/flow/flow_components.go similarity index 94% rename from pkg/flow/flow_components.go rename to internal/flow/flow_components.go index c78542741e..bdbe87a2ab 100644 --- a/pkg/flow/flow_components.go +++ b/internal/flow/flow_components.go @@ -3,9 +3,9 @@ package flow import ( "fmt" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/dag" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/dag" ) // GetComponent implements [component.Provider]. diff --git a/pkg/flow/flow_services.go b/internal/flow/flow_services.go similarity index 93% rename from pkg/flow/flow_services.go rename to internal/flow/flow_services.go index 4f08dccc07..f55380118c 100644 --- a/pkg/flow/flow_services.go +++ b/internal/flow/flow_services.go @@ -3,10 +3,10 @@ package flow import ( "context" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/dag" - "github.com/grafana/agent/pkg/flow/internal/worker" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/dag" + "github.com/grafana/agent/internal/flow/internal/worker" + "github.com/grafana/agent/internal/service" ) // GetServiceConsumers implements [service.Host]. It returns a slice of diff --git a/pkg/flow/flow_services_test.go b/internal/flow/flow_services_test.go similarity index 96% rename from pkg/flow/flow_services_test.go rename to internal/flow/flow_services_test.go index 04aa909ce0..86e375132f 100644 --- a/pkg/flow/flow_services_test.go +++ b/internal/flow/flow_services_test.go @@ -5,13 +5,13 @@ import ( "testing" "time" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/testcomponents" - "github.com/grafana/agent/pkg/flow/internal/testservices" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/testcomponents" + "github.com/grafana/agent/internal/flow/internal/testservices" + "github.com/grafana/agent/internal/service" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" "go.uber.org/atomic" ) diff --git a/pkg/flow/flow_test.go b/internal/flow/flow_test.go similarity index 89% rename from pkg/flow/flow_test.go rename to internal/flow/flow_test.go index 0bf88568e2..d750568303 100644 --- a/pkg/flow/flow_test.go +++ b/internal/flow/flow_test.go @@ -5,12 +5,12 @@ import ( "os" "testing" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/dag" - "github.com/grafana/agent/pkg/flow/internal/testcomponents" - "github.com/grafana/agent/pkg/flow/logging" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/dag" + "github.com/grafana/agent/internal/flow/internal/testcomponents" + "github.com/grafana/agent/internal/flow/logging" "github.com/stretchr/testify/require" "go.uber.org/goleak" ) diff --git a/pkg/flow/flow_updates_test.go b/internal/flow/flow_updates_test.go similarity index 98% rename from pkg/flow/flow_updates_test.go rename to internal/flow/flow_updates_test.go index c2349928f0..4eb8935478 100644 --- a/pkg/flow/flow_updates_test.go +++ b/internal/flow/flow_updates_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/flow/internal/testcomponents" - "github.com/grafana/agent/pkg/flow/internal/worker" + "github.com/grafana/agent/internal/flow/internal/testcomponents" + "github.com/grafana/agent/internal/flow/internal/worker" "github.com/stretchr/testify/require" ) diff --git a/pkg/flow/import_test.go b/internal/flow/import_test.go similarity index 96% rename from pkg/flow/import_test.go rename to internal/flow/import_test.go index fab45f3e4b..65642605f4 100644 --- a/pkg/flow/import_test.go +++ b/internal/flow/import_test.go @@ -11,14 +11,14 @@ import ( "time" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/internal/testcomponents" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/internal/testcomponents" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/service" "github.com/stretchr/testify/require" "golang.org/x/tools/txtar" - _ "github.com/grafana/agent/component/module/string" + _ "github.com/grafana/agent/internal/component/module/string" ) // The tests are using the .txtar files stored in the testdata folder. diff --git a/pkg/flow/internal/controller/block_node.go b/internal/flow/internal/controller/block_node.go similarity index 92% rename from pkg/flow/internal/controller/block_node.go rename to internal/flow/internal/controller/block_node.go index 0bb20a33eb..6d3aca5bbb 100644 --- a/pkg/flow/internal/controller/block_node.go +++ b/internal/flow/internal/controller/block_node.go @@ -1,7 +1,7 @@ package controller import ( - "github.com/grafana/agent/pkg/flow/internal/dag" + "github.com/grafana/agent/internal/flow/internal/dag" "github.com/grafana/river/ast" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/controller/component_node.go b/internal/flow/internal/controller/component_node.go similarity index 95% rename from pkg/flow/internal/controller/component_node.go rename to internal/flow/internal/controller/component_node.go index 1a6e416053..f3d9cdcaa4 100644 --- a/pkg/flow/internal/controller/component_node.go +++ b/internal/flow/internal/controller/component_node.go @@ -1,7 +1,7 @@ package controller import ( - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/river/ast" ) diff --git a/pkg/flow/internal/controller/component_node_manager.go b/internal/flow/internal/controller/component_node_manager.go similarity index 100% rename from pkg/flow/internal/controller/component_node_manager.go rename to internal/flow/internal/controller/component_node_manager.go diff --git a/pkg/flow/internal/controller/component_references.go b/internal/flow/internal/controller/component_references.go similarity index 98% rename from pkg/flow/internal/controller/component_references.go rename to internal/flow/internal/controller/component_references.go index 6e9dbb3d9b..c046895dda 100644 --- a/pkg/flow/internal/controller/component_references.go +++ b/internal/flow/internal/controller/component_references.go @@ -3,7 +3,7 @@ package controller import ( "fmt" - "github.com/grafana/agent/pkg/flow/internal/dag" + "github.com/grafana/agent/internal/flow/internal/dag" "github.com/grafana/river/ast" "github.com/grafana/river/diag" "github.com/grafana/river/vm" diff --git a/pkg/flow/internal/controller/component_registry.go b/internal/flow/internal/controller/component_registry.go similarity index 98% rename from pkg/flow/internal/controller/component_registry.go rename to internal/flow/internal/controller/component_registry.go index 0d2e04d1c4..f5359e6308 100644 --- a/pkg/flow/internal/controller/component_registry.go +++ b/internal/flow/internal/controller/component_registry.go @@ -3,7 +3,7 @@ package controller import ( "fmt" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" ) diff --git a/pkg/flow/internal/controller/custom_component_registry.go b/internal/flow/internal/controller/custom_component_registry.go similarity index 100% rename from pkg/flow/internal/controller/custom_component_registry.go rename to internal/flow/internal/controller/custom_component_registry.go diff --git a/pkg/flow/internal/controller/loader.go b/internal/flow/internal/controller/loader.go similarity index 99% rename from pkg/flow/internal/controller/loader.go rename to internal/flow/internal/controller/loader.go index 64513d3007..74d4b344b2 100644 --- a/pkg/flow/internal/controller/loader.go +++ b/internal/flow/internal/controller/loader.go @@ -10,11 +10,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/internal/dag" - "github.com/grafana/agent/pkg/flow/internal/worker" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/flow/tracing" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow/internal/dag" + "github.com/grafana/agent/internal/flow/internal/worker" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/flow/tracing" + "github.com/grafana/agent/internal/service" "github.com/grafana/dskit/backoff" "github.com/grafana/river/ast" "github.com/grafana/river/diag" diff --git a/pkg/flow/internal/controller/loader_test.go b/internal/flow/internal/controller/loader_test.go similarity index 97% rename from pkg/flow/internal/controller/loader_test.go rename to internal/flow/internal/controller/loader_test.go index d24c6c56c8..5105587ba1 100644 --- a/pkg/flow/internal/controller/loader_test.go +++ b/internal/flow/internal/controller/loader_test.go @@ -6,11 +6,11 @@ import ( "strings" "testing" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/dag" - "github.com/grafana/agent/pkg/flow/logging" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/dag" + "github.com/grafana/agent/internal/flow/logging" "github.com/grafana/river/ast" "github.com/grafana/river/diag" "github.com/grafana/river/parser" @@ -18,7 +18,7 @@ import ( "github.com/stretchr/testify/require" "go.opentelemetry.io/otel/trace/noop" - _ "github.com/grafana/agent/pkg/flow/internal/testcomponents" // Include test components + _ "github.com/grafana/agent/internal/flow/internal/testcomponents" // Include test components ) func TestLoader(t *testing.T) { diff --git a/pkg/flow/internal/controller/metrics.go b/internal/flow/internal/controller/metrics.go similarity index 100% rename from pkg/flow/internal/controller/metrics.go rename to internal/flow/internal/controller/metrics.go diff --git a/pkg/flow/internal/controller/module.go b/internal/flow/internal/controller/module.go similarity index 96% rename from pkg/flow/internal/controller/module.go rename to internal/flow/internal/controller/module.go index 72454dc10c..36240eabc3 100644 --- a/pkg/flow/internal/controller/module.go +++ b/internal/flow/internal/controller/module.go @@ -3,7 +3,7 @@ package controller import ( "context" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/river/ast" ) diff --git a/pkg/flow/internal/controller/node_builtin_component.go b/internal/flow/internal/controller/node_builtin_component.go similarity index 98% rename from pkg/flow/internal/controller/node_builtin_component.go rename to internal/flow/internal/controller/node_builtin_component.go index e7d21f9c57..028ca23627 100644 --- a/pkg/flow/internal/controller/node_builtin_component.go +++ b/internal/flow/internal/controller/node_builtin_component.go @@ -13,11 +13,11 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/flow/tracing" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/flow/tracing" "github.com/grafana/river/ast" "github.com/grafana/river/vm" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/flow/internal/controller/node_builtin_component_test.go b/internal/flow/internal/controller/node_builtin_component_test.go similarity index 100% rename from pkg/flow/internal/controller/node_builtin_component_test.go rename to internal/flow/internal/controller/node_builtin_component_test.go diff --git a/pkg/flow/internal/controller/node_config.go b/internal/flow/internal/controller/node_config.go similarity index 98% rename from pkg/flow/internal/controller/node_config.go rename to internal/flow/internal/controller/node_config.go index 109f426a49..127addb9ac 100644 --- a/pkg/flow/internal/controller/node_config.go +++ b/internal/flow/internal/controller/node_config.go @@ -3,7 +3,7 @@ package controller import ( "fmt" - "github.com/grafana/agent/pkg/flow/internal/importsource" + "github.com/grafana/agent/internal/flow/internal/importsource" "github.com/grafana/river/ast" "github.com/grafana/river/diag" ) diff --git a/pkg/flow/internal/controller/node_config_argument.go b/internal/flow/internal/controller/node_config_argument.go similarity index 100% rename from pkg/flow/internal/controller/node_config_argument.go rename to internal/flow/internal/controller/node_config_argument.go diff --git a/pkg/flow/internal/controller/node_config_export.go b/internal/flow/internal/controller/node_config_export.go similarity index 100% rename from pkg/flow/internal/controller/node_config_export.go rename to internal/flow/internal/controller/node_config_export.go diff --git a/pkg/flow/internal/controller/node_config_import.go b/internal/flow/internal/controller/node_config_import.go similarity index 98% rename from pkg/flow/internal/controller/node_config_import.go rename to internal/flow/internal/controller/node_config_import.go index 10ef832a96..fdaf4e3b37 100644 --- a/pkg/flow/internal/controller/node_config_import.go +++ b/internal/flow/internal/controller/node_config_import.go @@ -13,11 +13,11 @@ import ( "go.uber.org/atomic" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/internal/importsource" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/flow/tracing" - "github.com/grafana/agent/pkg/runner" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/internal/importsource" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/flow/tracing" + "github.com/grafana/agent/internal/runner" "github.com/grafana/river/ast" "github.com/grafana/river/parser" "github.com/grafana/river/vm" diff --git a/pkg/flow/internal/controller/node_config_logging.go b/internal/flow/internal/controller/node_config_logging.go similarity index 97% rename from pkg/flow/internal/controller/node_config_logging.go rename to internal/flow/internal/controller/node_config_logging.go index 74a35fe661..f5757138bd 100644 --- a/pkg/flow/internal/controller/node_config_logging.go +++ b/internal/flow/internal/controller/node_config_logging.go @@ -5,7 +5,7 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging" + "github.com/grafana/agent/internal/flow/logging" "github.com/grafana/river/ast" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/controller/node_config_tracing.go b/internal/flow/internal/controller/node_config_tracing.go similarity index 98% rename from pkg/flow/internal/controller/node_config_tracing.go rename to internal/flow/internal/controller/node_config_tracing.go index 4fb70e92c9..c8d77b46b8 100644 --- a/pkg/flow/internal/controller/node_config_tracing.go +++ b/internal/flow/internal/controller/node_config_tracing.go @@ -4,7 +4,7 @@ import ( "fmt" "sync" - "github.com/grafana/agent/pkg/flow/tracing" + "github.com/grafana/agent/internal/flow/tracing" "github.com/grafana/river/ast" "github.com/grafana/river/vm" "go.opentelemetry.io/otel/trace" diff --git a/pkg/flow/internal/controller/node_custom_component.go b/internal/flow/internal/controller/node_custom_component.go similarity index 99% rename from pkg/flow/internal/controller/node_custom_component.go rename to internal/flow/internal/controller/node_custom_component.go index 5ba0a756bb..8b3e05a74e 100644 --- a/pkg/flow/internal/controller/node_custom_component.go +++ b/internal/flow/internal/controller/node_custom_component.go @@ -10,8 +10,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/river/ast" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/controller/node_declare.go b/internal/flow/internal/controller/node_declare.go similarity index 100% rename from pkg/flow/internal/controller/node_declare.go rename to internal/flow/internal/controller/node_declare.go diff --git a/pkg/flow/internal/controller/node_service.go b/internal/flow/internal/controller/node_service.go similarity index 97% rename from pkg/flow/internal/controller/node_service.go rename to internal/flow/internal/controller/node_service.go index 8d3a3303ea..e3746ac88b 100644 --- a/pkg/flow/internal/controller/node_service.go +++ b/internal/flow/internal/controller/node_service.go @@ -6,8 +6,8 @@ import ( "reflect" "sync" - "github.com/grafana/agent/component" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/service" "github.com/grafana/river/ast" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/controller/queue.go b/internal/flow/internal/controller/queue.go similarity index 100% rename from pkg/flow/internal/controller/queue.go rename to internal/flow/internal/controller/queue.go diff --git a/pkg/flow/internal/controller/queue_test.go b/internal/flow/internal/controller/queue_test.go similarity index 100% rename from pkg/flow/internal/controller/queue_test.go rename to internal/flow/internal/controller/queue_test.go diff --git a/pkg/flow/internal/controller/scheduler.go b/internal/flow/internal/controller/scheduler.go similarity index 100% rename from pkg/flow/internal/controller/scheduler.go rename to internal/flow/internal/controller/scheduler.go diff --git a/pkg/flow/internal/controller/scheduler_test.go b/internal/flow/internal/controller/scheduler_test.go similarity index 96% rename from pkg/flow/internal/controller/scheduler_test.go rename to internal/flow/internal/controller/scheduler_test.go index c965d99c9d..9f9b3f136a 100644 --- a/pkg/flow/internal/controller/scheduler_test.go +++ b/internal/flow/internal/controller/scheduler_test.go @@ -5,8 +5,8 @@ import ( "sync" "testing" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/internal/controller" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/internal/controller" "github.com/grafana/river/ast" "github.com/grafana/river/vm" "github.com/stretchr/testify/require" diff --git a/pkg/flow/internal/controller/service_map.go b/internal/flow/internal/controller/service_map.go similarity index 95% rename from pkg/flow/internal/controller/service_map.go rename to internal/flow/internal/controller/service_map.go index cdc215b9c0..a6dfc55a50 100644 --- a/pkg/flow/internal/controller/service_map.go +++ b/internal/flow/internal/controller/service_map.go @@ -1,7 +1,7 @@ package controller import ( - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/service" "golang.org/x/exp/maps" ) diff --git a/pkg/flow/internal/controller/value_cache.go b/internal/flow/internal/controller/value_cache.go similarity index 99% rename from pkg/flow/internal/controller/value_cache.go rename to internal/flow/internal/controller/value_cache.go index adef1e2f99..0b0268cfb3 100644 --- a/pkg/flow/internal/controller/value_cache.go +++ b/internal/flow/internal/controller/value_cache.go @@ -4,7 +4,7 @@ import ( "reflect" "sync" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/controller/value_cache_test.go b/internal/flow/internal/controller/value_cache_test.go similarity index 100% rename from pkg/flow/internal/controller/value_cache_test.go rename to internal/flow/internal/controller/value_cache_test.go diff --git a/pkg/flow/internal/dag/dag.go b/internal/flow/internal/dag/dag.go similarity index 100% rename from pkg/flow/internal/dag/dag.go rename to internal/flow/internal/dag/dag.go diff --git a/pkg/flow/internal/dag/ops.go b/internal/flow/internal/dag/ops.go similarity index 100% rename from pkg/flow/internal/dag/ops.go rename to internal/flow/internal/dag/ops.go diff --git a/pkg/flow/internal/dag/ops_test.go b/internal/flow/internal/dag/ops_test.go similarity index 100% rename from pkg/flow/internal/dag/ops_test.go rename to internal/flow/internal/dag/ops_test.go diff --git a/pkg/flow/internal/dag/tarjan.go b/internal/flow/internal/dag/tarjan.go similarity index 100% rename from pkg/flow/internal/dag/tarjan.go rename to internal/flow/internal/dag/tarjan.go diff --git a/pkg/flow/internal/dag/tarjan_test.go b/internal/flow/internal/dag/tarjan_test.go similarity index 100% rename from pkg/flow/internal/dag/tarjan_test.go rename to internal/flow/internal/dag/tarjan_test.go diff --git a/pkg/flow/internal/dag/walk.go b/internal/flow/internal/dag/walk.go similarity index 100% rename from pkg/flow/internal/dag/walk.go rename to internal/flow/internal/dag/walk.go diff --git a/pkg/flow/internal/importsource/import_file.go b/internal/flow/internal/importsource/import_file.go similarity index 96% rename from pkg/flow/internal/importsource/import_file.go rename to internal/flow/internal/importsource/import_file.go index bde2f635b6..bc6690967e 100644 --- a/pkg/flow/internal/importsource/import_file.go +++ b/internal/flow/internal/importsource/import_file.go @@ -6,8 +6,8 @@ import ( "reflect" "time" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/local/file" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/local/file" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/importsource/import_git.go b/internal/flow/internal/importsource/import_git.go similarity index 98% rename from pkg/flow/internal/importsource/import_git.go rename to internal/flow/internal/importsource/import_git.go index ba7a5aa308..6c3490eb9b 100644 --- a/pkg/flow/internal/importsource/import_git.go +++ b/internal/flow/internal/importsource/import_git.go @@ -11,9 +11,9 @@ import ( "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/grafana/agent/internal/vcs" - "github.com/grafana/agent/pkg/flow/logging/level" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/importsource/import_http.go b/internal/flow/internal/importsource/import_http.go similarity index 93% rename from pkg/flow/internal/importsource/import_http.go rename to internal/flow/internal/importsource/import_http.go index 1d0673445c..959f24fe8c 100644 --- a/pkg/flow/internal/importsource/import_http.go +++ b/internal/flow/internal/importsource/import_http.go @@ -7,9 +7,9 @@ import ( "reflect" "time" - "github.com/grafana/agent/component" - common_config "github.com/grafana/agent/component/common/config" - remote_http "github.com/grafana/agent/component/remote/http" + "github.com/grafana/agent/internal/component" + common_config "github.com/grafana/agent/internal/component/common/config" + remote_http "github.com/grafana/agent/internal/component/remote/http" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/importsource/import_source.go b/internal/flow/internal/importsource/import_source.go similarity index 97% rename from pkg/flow/internal/importsource/import_source.go rename to internal/flow/internal/importsource/import_source.go index f1ef6e72ac..9f45697713 100644 --- a/pkg/flow/internal/importsource/import_source.go +++ b/internal/flow/internal/importsource/import_source.go @@ -4,7 +4,7 @@ import ( "context" "fmt" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/importsource/import_string.go b/internal/flow/internal/importsource/import_string.go similarity index 96% rename from pkg/flow/internal/importsource/import_string.go rename to internal/flow/internal/importsource/import_string.go index aae1ebc070..fc07583627 100644 --- a/pkg/flow/internal/importsource/import_string.go +++ b/internal/flow/internal/importsource/import_string.go @@ -5,7 +5,7 @@ import ( "fmt" "reflect" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/river/rivertypes" "github.com/grafana/river/vm" ) diff --git a/pkg/flow/internal/testcomponents/count.go b/internal/flow/internal/testcomponents/count.go similarity index 95% rename from pkg/flow/internal/testcomponents/count.go rename to internal/flow/internal/testcomponents/count.go index a3444f82d3..c284136f0d 100644 --- a/pkg/flow/internal/testcomponents/count.go +++ b/internal/flow/internal/testcomponents/count.go @@ -7,9 +7,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "go.uber.org/atomic" ) diff --git a/pkg/flow/internal/testcomponents/doc.go b/internal/flow/internal/testcomponents/doc.go similarity index 100% rename from pkg/flow/internal/testcomponents/doc.go rename to internal/flow/internal/testcomponents/doc.go diff --git a/pkg/flow/internal/testcomponents/experimental.go b/internal/flow/internal/testcomponents/experimental.go similarity index 94% rename from pkg/flow/internal/testcomponents/experimental.go rename to internal/flow/internal/testcomponents/experimental.go index 29cd0d8da0..73721d2394 100644 --- a/pkg/flow/internal/testcomponents/experimental.go +++ b/internal/flow/internal/testcomponents/experimental.go @@ -4,7 +4,7 @@ import ( "context" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" ) diff --git a/pkg/flow/internal/testcomponents/fake.go b/internal/flow/internal/testcomponents/fake.go similarity index 95% rename from pkg/flow/internal/testcomponents/fake.go rename to internal/flow/internal/testcomponents/fake.go index 30bb2e523a..c75ea304a8 100644 --- a/pkg/flow/internal/testcomponents/fake.go +++ b/internal/flow/internal/testcomponents/fake.go @@ -3,7 +3,7 @@ package testcomponents import ( "context" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" ) // Fake is a fake component instance which invokes fields when its methods are diff --git a/pkg/flow/internal/testcomponents/passthrough.go b/internal/flow/internal/testcomponents/passthrough.go similarity index 95% rename from pkg/flow/internal/testcomponents/passthrough.go rename to internal/flow/internal/testcomponents/passthrough.go index 8de806f802..108bfd61f8 100644 --- a/pkg/flow/internal/testcomponents/passthrough.go +++ b/internal/flow/internal/testcomponents/passthrough.go @@ -5,9 +5,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/pkg/flow/internal/testcomponents/sumation.go b/internal/flow/internal/testcomponents/sumation.go similarity index 93% rename from pkg/flow/internal/testcomponents/sumation.go rename to internal/flow/internal/testcomponents/sumation.go index 8813f36570..8318ff070e 100644 --- a/pkg/flow/internal/testcomponents/sumation.go +++ b/internal/flow/internal/testcomponents/sumation.go @@ -4,9 +4,9 @@ import ( "context" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "go.uber.org/atomic" ) diff --git a/pkg/flow/internal/testcomponents/tick.go b/internal/flow/internal/testcomponents/tick.go similarity index 95% rename from pkg/flow/internal/testcomponents/tick.go rename to internal/flow/internal/testcomponents/tick.go index 37b4d50022..e75622644e 100644 --- a/pkg/flow/internal/testcomponents/tick.go +++ b/internal/flow/internal/testcomponents/tick.go @@ -7,9 +7,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" ) func init() { diff --git a/pkg/flow/internal/testservices/doc.go b/internal/flow/internal/testservices/doc.go similarity index 100% rename from pkg/flow/internal/testservices/doc.go rename to internal/flow/internal/testservices/doc.go diff --git a/pkg/flow/internal/testservices/fake.go b/internal/flow/internal/testservices/fake.go similarity index 96% rename from pkg/flow/internal/testservices/fake.go rename to internal/flow/internal/testservices/fake.go index 5d08febfb1..2963f1057b 100644 --- a/pkg/flow/internal/testservices/fake.go +++ b/internal/flow/internal/testservices/fake.go @@ -3,7 +3,7 @@ package testservices import ( "context" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/service" ) // The Fake service allows injecting custom behavior for interface methods. diff --git a/pkg/flow/internal/worker/worker_pool.go b/internal/flow/internal/worker/worker_pool.go similarity index 100% rename from pkg/flow/internal/worker/worker_pool.go rename to internal/flow/internal/worker/worker_pool.go diff --git a/pkg/flow/internal/worker/worker_pool_test.go b/internal/flow/internal/worker/worker_pool_test.go similarity index 100% rename from pkg/flow/internal/worker/worker_pool_test.go rename to internal/flow/internal/worker/worker_pool_test.go diff --git a/pkg/flow/logging/handler.go b/internal/flow/logging/handler.go similarity index 100% rename from pkg/flow/logging/handler.go rename to internal/flow/logging/handler.go diff --git a/pkg/flow/logging/handler_test.go b/internal/flow/logging/handler_test.go similarity index 100% rename from pkg/flow/logging/handler_test.go rename to internal/flow/logging/handler_test.go diff --git a/pkg/flow/logging/level/level.go b/internal/flow/logging/level/level.go similarity index 96% rename from pkg/flow/logging/level/level.go rename to internal/flow/logging/level/level.go index bff1fa09c3..d343a1b9da 100644 --- a/pkg/flow/logging/level/level.go +++ b/internal/flow/logging/level/level.go @@ -6,7 +6,7 @@ import ( "github.com/go-kit/log" gokitlevel "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/flow/logging" + "github.com/grafana/agent/internal/flow/logging" ) const ( diff --git a/pkg/flow/logging/logger.go b/internal/flow/logging/logger.go similarity index 98% rename from pkg/flow/logging/logger.go rename to internal/flow/logging/logger.go index 1856c54654..39fbab54e8 100644 --- a/pkg/flow/logging/logger.go +++ b/internal/flow/logging/logger.go @@ -8,7 +8,7 @@ import ( "sync" "time" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/agent/internal/slogadapter" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" diff --git a/pkg/flow/logging/logger_test.go b/internal/flow/logging/logger_test.go similarity index 97% rename from pkg/flow/logging/logger_test.go rename to internal/flow/logging/logger_test.go index cf3f7a66c1..7b8fb15d76 100644 --- a/pkg/flow/logging/logger_test.go +++ b/internal/flow/logging/logger_test.go @@ -11,9 +11,9 @@ import ( "github.com/go-kit/log" gokitlevel "github.com/go-kit/log/level" - "github.com/grafana/agent/component/common/loki" - "github.com/grafana/agent/pkg/flow/logging" - flowlevel "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/component/common/loki" + "github.com/grafana/agent/internal/flow/logging" + flowlevel "github.com/grafana/agent/internal/flow/logging/level" "github.com/stretchr/testify/require" ) @@ -21,7 +21,7 @@ import ( $ go test -count=1 -benchmem ./pkg/flow/logging -run ^$ -bench BenchmarkLogging_ goos: darwin goarch: arm64 -pkg: github.com/grafana/agent/pkg/flow/logging +pkg: github.com/grafana/agent/internal/flow/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/pkg/flow/logging/options.go b/internal/flow/logging/options.go similarity index 97% rename from pkg/flow/logging/options.go rename to internal/flow/logging/options.go index 9780c89237..2c17c4b2b4 100644 --- a/pkg/flow/logging/options.go +++ b/internal/flow/logging/options.go @@ -6,7 +6,7 @@ import ( "log/slog" "math" - "github.com/grafana/agent/component/common/loki" + "github.com/grafana/agent/internal/component/common/loki" "github.com/grafana/river" ) diff --git a/pkg/flow/module.go b/internal/flow/module.go similarity index 94% rename from pkg/flow/module.go rename to internal/flow/module.go index 61dc0f2965..edc3c23852 100644 --- a/pkg/flow/module.go +++ b/internal/flow/module.go @@ -6,13 +6,13 @@ import ( "path" "sync" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/worker" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/flow/tracing" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/worker" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/flow/tracing" "github.com/grafana/river/ast" "github.com/grafana/river/scanner" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/flow/module_eval_test.go b/internal/flow/module_eval_test.go similarity index 91% rename from pkg/flow/module_eval_test.go rename to internal/flow/module_eval_test.go index 46dc6d3913..94b811b423 100644 --- a/pkg/flow/module_eval_test.go +++ b/internal/flow/module_eval_test.go @@ -10,21 +10,21 @@ import ( "testing" "time" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/internal/testcomponents" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/service" - cluster_service "github.com/grafana/agent/service/cluster" - http_service "github.com/grafana/agent/service/http" - "github.com/grafana/agent/service/labelstore" - otel_service "github.com/grafana/agent/service/otel" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/internal/testcomponents" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/service" + cluster_service "github.com/grafana/agent/internal/service/cluster" + http_service "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/service/labelstore" + otel_service "github.com/grafana/agent/internal/service/otel" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" "go.uber.org/goleak" - _ "github.com/grafana/agent/component/module/string" + _ "github.com/grafana/agent/internal/component/module/string" ) func TestUpdates_EmptyModule(t *testing.T) { diff --git a/pkg/flow/module_fail_test.go b/internal/flow/module_fail_test.go similarity index 94% rename from pkg/flow/module_fail_test.go rename to internal/flow/module_fail_test.go index 071c36813b..a6ec2eeec6 100644 --- a/pkg/flow/module_fail_test.go +++ b/internal/flow/module_fail_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/internal/controller" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/internal/controller" "github.com/stretchr/testify/require" ) diff --git a/pkg/flow/module_registry.go b/internal/flow/module_registry.go similarity index 100% rename from pkg/flow/module_registry.go rename to internal/flow/module_registry.go diff --git a/pkg/flow/module_test.go b/internal/flow/module_test.go similarity index 97% rename from pkg/flow/module_test.go rename to internal/flow/module_test.go index 14e464287a..79661491c4 100644 --- a/pkg/flow/module_test.go +++ b/internal/flow/module_test.go @@ -6,12 +6,12 @@ import ( "testing" "time" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow/internal/controller" - "github.com/grafana/agent/pkg/flow/internal/worker" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow/internal/controller" + "github.com/grafana/agent/internal/flow/internal/worker" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/service" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" ) diff --git a/pkg/flow/source.go b/internal/flow/source.go similarity index 98% rename from pkg/flow/source.go rename to internal/flow/source.go index 78d667d4d4..1c1d8d897c 100644 --- a/pkg/flow/source.go +++ b/internal/flow/source.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/grafana/agent/pkg/config/encoder" + "github.com/grafana/agent/internal/static/config/encoder" "github.com/grafana/river/ast" "github.com/grafana/river/diag" "github.com/grafana/river/parser" diff --git a/pkg/flow/source_test.go b/internal/flow/source_test.go similarity index 96% rename from pkg/flow/source_test.go rename to internal/flow/source_test.go index fa79c8c1e9..be88b556c1 100644 --- a/pkg/flow/source_test.go +++ b/internal/flow/source_test.go @@ -8,7 +8,7 @@ import ( "github.com/grafana/river/diag" "github.com/stretchr/testify/require" - _ "github.com/grafana/agent/pkg/flow/internal/testcomponents" // Include test components + _ "github.com/grafana/agent/internal/flow/internal/testcomponents" // Include test components ) func TestParseSource(t *testing.T) { diff --git a/pkg/flow/testdata/import_error/import_error_1.txtar b/internal/flow/testdata/import_error/import_error_1.txtar similarity index 100% rename from pkg/flow/testdata/import_error/import_error_1.txtar rename to internal/flow/testdata/import_error/import_error_1.txtar diff --git a/pkg/flow/testdata/import_error/import_error_2.txtar b/internal/flow/testdata/import_error/import_error_2.txtar similarity index 100% rename from pkg/flow/testdata/import_error/import_error_2.txtar rename to internal/flow/testdata/import_error/import_error_2.txtar diff --git a/pkg/flow/testdata/import_error/import_error_3.txtar b/internal/flow/testdata/import_error/import_error_3.txtar similarity index 100% rename from pkg/flow/testdata/import_error/import_error_3.txtar rename to internal/flow/testdata/import_error/import_error_3.txtar diff --git a/pkg/flow/testdata/import_error/import_error_4.txtar b/internal/flow/testdata/import_error/import_error_4.txtar similarity index 100% rename from pkg/flow/testdata/import_error/import_error_4.txtar rename to internal/flow/testdata/import_error/import_error_4.txtar diff --git a/pkg/flow/testdata/import_file/import_file_1.txtar b/internal/flow/testdata/import_file/import_file_1.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_1.txtar rename to internal/flow/testdata/import_file/import_file_1.txtar diff --git a/pkg/flow/testdata/import_file/import_file_10.txtar b/internal/flow/testdata/import_file/import_file_10.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_10.txtar rename to internal/flow/testdata/import_file/import_file_10.txtar diff --git a/pkg/flow/testdata/import_file/import_file_11.txtar b/internal/flow/testdata/import_file/import_file_11.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_11.txtar rename to internal/flow/testdata/import_file/import_file_11.txtar diff --git a/pkg/flow/testdata/import_file/import_file_12.txtar b/internal/flow/testdata/import_file/import_file_12.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_12.txtar rename to internal/flow/testdata/import_file/import_file_12.txtar diff --git a/pkg/flow/testdata/import_file/import_file_13.txtar b/internal/flow/testdata/import_file/import_file_13.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_13.txtar rename to internal/flow/testdata/import_file/import_file_13.txtar diff --git a/pkg/flow/testdata/import_file/import_file_14.txtar b/internal/flow/testdata/import_file/import_file_14.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_14.txtar rename to internal/flow/testdata/import_file/import_file_14.txtar diff --git a/pkg/flow/testdata/import_file/import_file_15.txtar b/internal/flow/testdata/import_file/import_file_15.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_15.txtar rename to internal/flow/testdata/import_file/import_file_15.txtar diff --git a/pkg/flow/testdata/import_file/import_file_16.txtar b/internal/flow/testdata/import_file/import_file_16.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_16.txtar rename to internal/flow/testdata/import_file/import_file_16.txtar diff --git a/pkg/flow/testdata/import_file/import_file_2.txtar b/internal/flow/testdata/import_file/import_file_2.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_2.txtar rename to internal/flow/testdata/import_file/import_file_2.txtar diff --git a/pkg/flow/testdata/import_file/import_file_3.txtar b/internal/flow/testdata/import_file/import_file_3.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_3.txtar rename to internal/flow/testdata/import_file/import_file_3.txtar diff --git a/pkg/flow/testdata/import_file/import_file_4.txtar b/internal/flow/testdata/import_file/import_file_4.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_4.txtar rename to internal/flow/testdata/import_file/import_file_4.txtar diff --git a/pkg/flow/testdata/import_file/import_file_5.txtar b/internal/flow/testdata/import_file/import_file_5.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_5.txtar rename to internal/flow/testdata/import_file/import_file_5.txtar diff --git a/pkg/flow/testdata/import_file/import_file_6.txtar b/internal/flow/testdata/import_file/import_file_6.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_6.txtar rename to internal/flow/testdata/import_file/import_file_6.txtar diff --git a/pkg/flow/testdata/import_file/import_file_7.txtar b/internal/flow/testdata/import_file/import_file_7.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_7.txtar rename to internal/flow/testdata/import_file/import_file_7.txtar diff --git a/pkg/flow/testdata/import_file/import_file_8.txtar b/internal/flow/testdata/import_file/import_file_8.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_8.txtar rename to internal/flow/testdata/import_file/import_file_8.txtar diff --git a/pkg/flow/testdata/import_file/import_file_9.txtar b/internal/flow/testdata/import_file/import_file_9.txtar similarity index 100% rename from pkg/flow/testdata/import_file/import_file_9.txtar rename to internal/flow/testdata/import_file/import_file_9.txtar diff --git a/pkg/flow/testdata/import_git/import_git_1.txtar b/internal/flow/testdata/import_git/import_git_1.txtar similarity index 100% rename from pkg/flow/testdata/import_git/import_git_1.txtar rename to internal/flow/testdata/import_git/import_git_1.txtar diff --git a/pkg/flow/testdata/import_http/import_http_1.txtar b/internal/flow/testdata/import_http/import_http_1.txtar similarity index 100% rename from pkg/flow/testdata/import_http/import_http_1.txtar rename to internal/flow/testdata/import_http/import_http_1.txtar diff --git a/pkg/flow/testdata/import_string/import_string_1.txtar b/internal/flow/testdata/import_string/import_string_1.txtar similarity index 100% rename from pkg/flow/testdata/import_string/import_string_1.txtar rename to internal/flow/testdata/import_string/import_string_1.txtar diff --git a/pkg/flow/tracing/internal/jaegerremote/LICENSE b/internal/flow/tracing/internal/jaegerremote/LICENSE similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/LICENSE rename to internal/flow/tracing/internal/jaegerremote/LICENSE diff --git a/pkg/flow/tracing/internal/jaegerremote/README.md b/internal/flow/tracing/internal/jaegerremote/README.md similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/README.md rename to internal/flow/tracing/internal/jaegerremote/README.md diff --git a/pkg/flow/tracing/internal/jaegerremote/constants.go b/internal/flow/tracing/internal/jaegerremote/constants.go similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/constants.go rename to internal/flow/tracing/internal/jaegerremote/constants.go diff --git a/pkg/flow/tracing/internal/jaegerremote/doc.go b/internal/flow/tracing/internal/jaegerremote/doc.go similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/doc.go rename to internal/flow/tracing/internal/jaegerremote/doc.go diff --git a/pkg/flow/tracing/internal/jaegerremote/sampler.go b/internal/flow/tracing/internal/jaegerremote/sampler.go similarity index 99% rename from pkg/flow/tracing/internal/jaegerremote/sampler.go rename to internal/flow/tracing/internal/jaegerremote/sampler.go index 9932ac5705..9d24aaa899 100644 --- a/pkg/flow/tracing/internal/jaegerremote/sampler.go +++ b/internal/flow/tracing/internal/jaegerremote/sampler.go @@ -23,7 +23,7 @@ import ( "math" "sync" - "github.com/grafana/agent/pkg/flow/tracing/internal/jaegerremote/utils" + "github.com/grafana/agent/internal/flow/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/pkg/flow/tracing/internal/jaegerremote/sampler_remote.go b/internal/flow/tracing/internal/jaegerremote/sampler_remote.go similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/sampler_remote.go rename to internal/flow/tracing/internal/jaegerremote/sampler_remote.go diff --git a/pkg/flow/tracing/internal/jaegerremote/sampler_remote_options.go b/internal/flow/tracing/internal/jaegerremote/sampler_remote_options.go similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/sampler_remote_options.go rename to internal/flow/tracing/internal/jaegerremote/sampler_remote_options.go diff --git a/pkg/flow/tracing/internal/jaegerremote/utils/http_json.go b/internal/flow/tracing/internal/jaegerremote/utils/http_json.go similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/utils/http_json.go rename to internal/flow/tracing/internal/jaegerremote/utils/http_json.go diff --git a/pkg/flow/tracing/internal/jaegerremote/utils/rate_limiter.go b/internal/flow/tracing/internal/jaegerremote/utils/rate_limiter.go similarity index 100% rename from pkg/flow/tracing/internal/jaegerremote/utils/rate_limiter.go rename to internal/flow/tracing/internal/jaegerremote/utils/rate_limiter.go diff --git a/pkg/flow/tracing/lazy_sampler.go b/internal/flow/tracing/lazy_sampler.go similarity index 100% rename from pkg/flow/tracing/lazy_sampler.go rename to internal/flow/tracing/lazy_sampler.go diff --git a/pkg/flow/tracing/otelcol_client.go b/internal/flow/tracing/otelcol_client.go similarity index 99% rename from pkg/flow/tracing/otelcol_client.go rename to internal/flow/tracing/otelcol_client.go index 72b1017989..13d0c6631b 100644 --- a/pkg/flow/tracing/otelcol_client.go +++ b/internal/flow/tracing/otelcol_client.go @@ -5,7 +5,7 @@ import ( "fmt" "sync" - "github.com/grafana/agent/component/otelcol" + "github.com/grafana/agent/internal/component/otelcol" "github.com/hashicorp/go-multierror" "go.opentelemetry.io/collector/pdata/pcommon" "go.opentelemetry.io/collector/pdata/ptrace" diff --git a/pkg/flow/tracing/tracing.go b/internal/flow/tracing/tracing.go similarity index 97% rename from pkg/flow/tracing/tracing.go rename to internal/flow/tracing/tracing.go index 12247d477a..9d1a174e33 100644 --- a/pkg/flow/tracing/tracing.go +++ b/internal/flow/tracing/tracing.go @@ -8,9 +8,9 @@ import ( "sync" "time" - "github.com/grafana/agent/component/otelcol" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/flow/tracing/internal/jaegerremote" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/component/otelcol" + "github.com/grafana/agent/internal/flow/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/pkg/flow/tracing/wrap_tracer.go b/internal/flow/tracing/wrap_tracer.go similarity index 100% rename from pkg/flow/tracing/wrap_tracer.go rename to internal/flow/tracing/wrap_tracer.go diff --git a/cmd/internal/flowmode/cluster_builder.go b/internal/flowmode/cluster_builder.go similarity index 98% rename from cmd/internal/flowmode/cluster_builder.go rename to internal/flowmode/cluster_builder.go index f5529d8f23..70422c4574 100644 --- a/cmd/internal/flowmode/cluster_builder.go +++ b/internal/flowmode/cluster_builder.go @@ -9,8 +9,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service/cluster" "github.com/grafana/ckit/advertise" "github.com/hashicorp/go-discover" "github.com/hashicorp/go-discover/provider/k8s" diff --git a/cmd/internal/flowmode/cluster_builder_test.go b/internal/flowmode/cluster_builder_test.go similarity index 100% rename from cmd/internal/flowmode/cluster_builder_test.go rename to internal/flowmode/cluster_builder_test.go diff --git a/cmd/internal/flowmode/cmd_convert.go b/internal/flowmode/cmd_convert.go similarity index 98% rename from cmd/internal/flowmode/cmd_convert.go rename to internal/flowmode/cmd_convert.go index 01e03a0800..bffc9ef1f3 100644 --- a/cmd/internal/flowmode/cmd_convert.go +++ b/internal/flowmode/cmd_convert.go @@ -11,8 +11,8 @@ import ( "github.com/spf13/cobra" "github.com/spf13/pflag" - "github.com/grafana/agent/converter" - convert_diag "github.com/grafana/agent/converter/diag" + "github.com/grafana/agent/internal/converter" + convert_diag "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/river/diag" ) diff --git a/cmd/internal/flowmode/cmd_convert_test.go b/internal/flowmode/cmd_convert_test.go similarity index 100% rename from cmd/internal/flowmode/cmd_convert_test.go rename to internal/flowmode/cmd_convert_test.go diff --git a/cmd/internal/flowmode/cmd_fmt.go b/internal/flowmode/cmd_fmt.go similarity index 100% rename from cmd/internal/flowmode/cmd_fmt.go rename to internal/flowmode/cmd_fmt.go diff --git a/cmd/internal/flowmode/cmd_run.go b/internal/flowmode/cmd_run.go similarity index 94% rename from cmd/internal/flowmode/cmd_run.go rename to internal/flowmode/cmd_run.go index 1efd9933ee..3bbd9889a3 100644 --- a/cmd/internal/flowmode/cmd_run.go +++ b/internal/flowmode/cmd_run.go @@ -17,24 +17,24 @@ import ( "github.com/fatih/color" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/converter" - convert_diag "github.com/grafana/agent/converter/diag" "github.com/grafana/agent/internal/agentseed" + "github.com/grafana/agent/internal/boringcrypto" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/converter" + convert_diag "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/boringcrypto" - "github.com/grafana/agent/pkg/config/instrumentation" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/flow/tracing" - "github.com/grafana/agent/pkg/usagestats" - "github.com/grafana/agent/service" - httpservice "github.com/grafana/agent/service/http" - "github.com/grafana/agent/service/labelstore" - otel_service "github.com/grafana/agent/service/otel" - remotecfgservice "github.com/grafana/agent/service/remotecfg" - uiservice "github.com/grafana/agent/service/ui" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/flow/tracing" + "github.com/grafana/agent/internal/service" + httpservice "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/service/labelstore" + otel_service "github.com/grafana/agent/internal/service/otel" + remotecfgservice "github.com/grafana/agent/internal/service/remotecfg" + uiservice "github.com/grafana/agent/internal/service/ui" + "github.com/grafana/agent/internal/static/config/instrumentation" + "github.com/grafana/agent/internal/usagestats" "github.com/grafana/ckit/advertise" "github.com/grafana/ckit/peer" "github.com/grafana/river/diag" @@ -44,7 +44,7 @@ import ( "golang.org/x/exp/maps" // Install Components - _ "github.com/grafana/agent/component/all" + _ "github.com/grafana/agent/internal/component/all" ) func runCommand() *cobra.Command { diff --git a/cmd/internal/flowmode/cmd_tools.go b/internal/flowmode/cmd_tools.go similarity index 90% rename from cmd/internal/flowmode/cmd_tools.go rename to internal/flowmode/cmd_tools.go index 01e7fd9719..7224668ab0 100644 --- a/cmd/internal/flowmode/cmd_tools.go +++ b/internal/flowmode/cmd_tools.go @@ -3,7 +3,7 @@ package flowmode import ( "fmt" - "github.com/grafana/agent/component/prometheus/remotewrite" + "github.com/grafana/agent/internal/component/prometheus/remotewrite" "github.com/spf13/cobra" ) diff --git a/cmd/internal/flowmode/flowmode.go b/internal/flowmode/flowmode.go similarity index 94% rename from cmd/internal/flowmode/flowmode.go rename to internal/flowmode/flowmode.go index 581923ce44..d5edcb48b4 100644 --- a/cmd/internal/flowmode/flowmode.go +++ b/internal/flowmode/flowmode.go @@ -5,7 +5,7 @@ import ( "fmt" "os" - "github.com/grafana/agent/pkg/build" + "github.com/grafana/agent/internal/build" "github.com/spf13/cobra" ) diff --git a/cmd/internal/flowmode/resources_collector.go b/internal/flowmode/resources_collector.go similarity index 98% rename from cmd/internal/flowmode/resources_collector.go rename to internal/flowmode/resources_collector.go index 737d99bd86..f4a1123734 100644 --- a/cmd/internal/flowmode/resources_collector.go +++ b/internal/flowmode/resources_collector.go @@ -5,7 +5,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" + "github.com/grafana/agent/internal/flow/logging/level" "github.com/prometheus/client_golang/prometheus" "github.com/shirou/gopsutil/v3/net" "github.com/shirou/gopsutil/v3/process" diff --git a/pkg/loki/client/client.go b/internal/loki/client/client.go similarity index 98% rename from pkg/loki/client/client.go rename to internal/loki/client/client.go index e01973c17b..46c40bbdfc 100644 --- a/pkg/loki/client/client.go +++ b/internal/loki/client/client.go @@ -12,7 +12,7 @@ import ( "strings" log "github.com/go-kit/log" - "github.com/grafana/agent/pkg/loki/client/internal" + "github.com/grafana/agent/internal/loki/client/internal" "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/loki/client/client_test.go b/internal/loki/client/client_test.go similarity index 100% rename from pkg/loki/client/client_test.go rename to internal/loki/client/client_test.go diff --git a/pkg/loki/client/internal/client.go b/internal/loki/client/internal/client.go similarity index 100% rename from pkg/loki/client/internal/client.go rename to internal/loki/client/internal/client.go diff --git a/pkg/loki/client/internal/client_test.go b/internal/loki/client/internal/client_test.go similarity index 100% rename from pkg/loki/client/internal/client_test.go rename to internal/loki/client/internal/client_test.go diff --git a/pkg/loki/client/rules.go b/internal/loki/client/rules.go similarity index 100% rename from pkg/loki/client/rules.go rename to internal/loki/client/rules.go diff --git a/pkg/loki/client/rules_test.go b/internal/loki/client/rules_test.go similarity index 100% rename from pkg/loki/client/rules_test.go rename to internal/loki/client/rules_test.go diff --git a/pkg/mimir/client/client.go b/internal/mimir/client/client.go similarity index 98% rename from pkg/mimir/client/client.go rename to internal/mimir/client/client.go index b6ed180688..802c40d6ac 100644 --- a/pkg/mimir/client/client.go +++ b/internal/mimir/client/client.go @@ -12,7 +12,7 @@ import ( "strings" log "github.com/go-kit/log" - "github.com/grafana/agent/pkg/mimir/client/internal" + "github.com/grafana/agent/internal/mimir/client/internal" "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/user" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/mimir/client/client_test.go b/internal/mimir/client/client_test.go similarity index 100% rename from pkg/mimir/client/client_test.go rename to internal/mimir/client/client_test.go diff --git a/pkg/mimir/client/internal/client.go b/internal/mimir/client/internal/client.go similarity index 100% rename from pkg/mimir/client/internal/client.go rename to internal/mimir/client/internal/client.go diff --git a/pkg/mimir/client/internal/client_test.go b/internal/mimir/client/internal/client_test.go similarity index 100% rename from pkg/mimir/client/internal/client_test.go rename to internal/mimir/client/internal/client_test.go diff --git a/pkg/mimir/client/rules.go b/internal/mimir/client/rules.go similarity index 100% rename from pkg/mimir/client/rules.go rename to internal/mimir/client/rules.go diff --git a/pkg/mimir/client/rules_test.go b/internal/mimir/client/rules_test.go similarity index 100% rename from pkg/mimir/client/rules_test.go rename to internal/mimir/client/rules_test.go diff --git a/pkg/runner/hash_map.go b/internal/runner/hash_map.go similarity index 100% rename from pkg/runner/hash_map.go rename to internal/runner/hash_map.go diff --git a/pkg/runner/hash_map_test.go b/internal/runner/hash_map_test.go similarity index 100% rename from pkg/runner/hash_map_test.go rename to internal/runner/hash_map_test.go diff --git a/pkg/runner/runner.go b/internal/runner/runner.go similarity index 100% rename from pkg/runner/runner.go rename to internal/runner/runner.go diff --git a/pkg/runner/runner_test.go b/internal/runner/runner_test.go similarity index 96% rename from pkg/runner/runner_test.go rename to internal/runner/runner_test.go index ea06dcff80..60fc84068c 100644 --- a/pkg/runner/runner_test.go +++ b/internal/runner/runner_test.go @@ -6,8 +6,8 @@ import ( "time" "github.com/cespare/xxhash/v2" - "github.com/grafana/agent/pkg/runner" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/runner" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" "go.uber.org/atomic" ) diff --git a/service/cluster/cluster.go b/internal/service/cluster/cluster.go similarity index 98% rename from service/cluster/cluster.go rename to internal/service/cluster/cluster.go index 2ea23e2601..6c404b65f5 100644 --- a/service/cluster/cluster.go +++ b/internal/service/cluster/cluster.go @@ -14,10 +14,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service" - http_service "github.com/grafana/agent/service/http" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service" + http_service "github.com/grafana/agent/internal/service/http" "github.com/grafana/ckit" "github.com/grafana/ckit/peer" "github.com/grafana/ckit/shard" diff --git a/service/cluster/cluster_test.go b/internal/service/cluster/cluster_test.go similarity index 100% rename from service/cluster/cluster_test.go rename to internal/service/cluster/cluster_test.go diff --git a/service/cluster/mock.go b/internal/service/cluster/mock.go similarity index 100% rename from service/cluster/mock.go rename to internal/service/cluster/mock.go diff --git a/service/http/handler.go b/internal/service/http/handler.go similarity index 90% rename from service/http/handler.go rename to internal/service/http/handler.go index 49a81ebadd..98796530dd 100644 --- a/service/http/handler.go +++ b/internal/service/http/handler.go @@ -6,7 +6,7 @@ import ( "crypto/tls" "fmt" - "github.com/grafana/agent/pkg/server" + "github.com/grafana/agent/internal/static/server" ) // tlsConfig generates a tls.Config from args. diff --git a/service/http/handler_windows.go b/internal/service/http/handler_windows.go similarity index 97% rename from service/http/handler_windows.go rename to internal/service/http/handler_windows.go index e35d664d51..2b5cb4efab 100644 --- a/service/http/handler_windows.go +++ b/internal/service/http/handler_windows.go @@ -2,7 +2,8 @@ package http import ( "crypto/tls" - "github.com/grafana/agent/pkg/server" + + "github.com/grafana/agent/internal/static/server" ) // tlsConfig generates a tls.Config from args. diff --git a/service/http/http.go b/internal/service/http/http.go similarity index 98% rename from service/http/http.go rename to internal/service/http/http.go index 488651d759..16e9d8449f 100644 --- a/service/http/http.go +++ b/internal/service/http/http.go @@ -15,11 +15,11 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service" + "github.com/grafana/agent/internal/static/server" "github.com/grafana/ckit/memconn" _ "github.com/grafana/pyroscope-go/godeltaprof/http/pprof" // Register godeltaprof handler "github.com/prometheus/client_golang/prometheus" diff --git a/service/http/http_test.go b/internal/service/http/http_test.go similarity index 95% rename from service/http/http_test.go rename to internal/service/http/http_test.go index 68e34780cd..4239b01d4a 100644 --- a/service/http/http_test.go +++ b/internal/service/http/http_test.go @@ -6,11 +6,11 @@ import ( "net/http" "testing" - "github.com/grafana/agent/component" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/service" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/phayes/freeport" "github.com/prometheus/client_golang/prometheus" diff --git a/service/http/routes.go b/internal/service/http/routes.go similarity index 100% rename from service/http/routes.go rename to internal/service/http/routes.go diff --git a/service/http/split_path.go b/internal/service/http/split_path.go similarity index 97% rename from service/http/split_path.go rename to internal/service/http/split_path.go index 882dd823dd..93cdfbda05 100644 --- a/service/http/split_path.go +++ b/internal/service/http/split_path.go @@ -5,8 +5,8 @@ import ( "fmt" "strings" - "github.com/grafana/agent/component" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/service" ) // splitURLPath splits a path from a URL into two parts: a component ID and the diff --git a/service/http/split_path_test.go b/internal/service/http/split_path_test.go similarity index 97% rename from service/http/split_path_test.go rename to internal/service/http/split_path_test.go index 281fd8a9f7..c580f830dd 100644 --- a/service/http/split_path_test.go +++ b/internal/service/http/split_path_test.go @@ -3,8 +3,8 @@ package http import ( "testing" - "github.com/grafana/agent/component" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/service" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/service/http/testdata/config.conf b/internal/service/http/testdata/config.conf similarity index 100% rename from service/http/testdata/config.conf rename to internal/service/http/testdata/config.conf diff --git a/service/http/testdata/test-cert.crt b/internal/service/http/testdata/test-cert.crt similarity index 100% rename from service/http/testdata/test-cert.crt rename to internal/service/http/testdata/test-cert.crt diff --git a/service/http/testdata/test-key.key b/internal/service/http/testdata/test-key.key similarity index 100% rename from service/http/testdata/test-key.key rename to internal/service/http/testdata/test-key.key diff --git a/service/http/tls.go b/internal/service/http/tls.go similarity index 100% rename from service/http/tls.go rename to internal/service/http/tls.go diff --git a/service/http/tls_test.go b/internal/service/http/tls_test.go similarity index 100% rename from service/http/tls_test.go rename to internal/service/http/tls_test.go diff --git a/service/labelstore/data.go b/internal/service/labelstore/data.go similarity index 100% rename from service/labelstore/data.go rename to internal/service/labelstore/data.go diff --git a/service/labelstore/service.go b/internal/service/labelstore/service.go similarity index 97% rename from service/labelstore/service.go rename to internal/service/labelstore/service.go index 79de6f7729..6906462606 100644 --- a/service/labelstore/service.go +++ b/internal/service/labelstore/service.go @@ -6,9 +6,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging/level" - agent_service "github.com/grafana/agent/service" - flow_service "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow/logging/level" + agent_service "github.com/grafana/agent/internal/service" + flow_service "github.com/grafana/agent/internal/service" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/value" diff --git a/service/labelstore/service_test.go b/internal/service/labelstore/service_test.go similarity index 100% rename from service/labelstore/service_test.go rename to internal/service/labelstore/service_test.go diff --git a/service/otel/otel.go b/internal/service/otel/otel.go similarity index 95% rename from service/otel/otel.go rename to internal/service/otel/otel.go index 36c5fa7059..f8e4707250 100644 --- a/service/otel/otel.go +++ b/internal/service/otel/otel.go @@ -8,8 +8,8 @@ import ( "fmt" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/service" + "github.com/grafana/agent/internal/util" ) // ServiceName defines the name used for the otel service. diff --git a/service/remotecfg/noop.go b/internal/service/remotecfg/noop.go similarity index 100% rename from service/remotecfg/noop.go rename to internal/service/remotecfg/noop.go diff --git a/service/remotecfg/remotecfg.go b/internal/service/remotecfg/remotecfg.go similarity index 98% rename from service/remotecfg/remotecfg.go rename to internal/service/remotecfg/remotecfg.go index 528a229f7e..318404227d 100644 --- a/service/remotecfg/remotecfg.go +++ b/internal/service/remotecfg/remotecfg.go @@ -15,10 +15,10 @@ import ( "github.com/go-kit/log" agentv1 "github.com/grafana/agent-remote-config/api/gen/proto/go/agent/v1" "github.com/grafana/agent-remote-config/api/gen/proto/go/agent/v1/agentv1connect" - "github.com/grafana/agent/component/common/config" "github.com/grafana/agent/internal/agentseed" - "github.com/grafana/agent/pkg/flow/logging/level" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/component/common/config" + "github.com/grafana/agent/internal/flow/logging/level" + "github.com/grafana/agent/internal/service" "github.com/grafana/river" commonconfig "github.com/prometheus/common/config" ) diff --git a/service/remotecfg/remotecfg_test.go b/internal/service/remotecfg/remotecfg_test.go similarity index 94% rename from service/remotecfg/remotecfg_test.go rename to internal/service/remotecfg/remotecfg_test.go index 6db1f34baf..a370419369 100644 --- a/service/remotecfg/remotecfg_test.go +++ b/internal/service/remotecfg/remotecfg_test.go @@ -10,14 +10,14 @@ import ( "connectrpc.com/connect" agentv1 "github.com/grafana/agent-remote-config/api/gen/proto/go/agent/v1" - "github.com/grafana/agent/component" - _ "github.com/grafana/agent/component/loki/process" + "github.com/grafana/agent/internal/component" + _ "github.com/grafana/agent/internal/component/loki/process" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/pkg/flow" - "github.com/grafana/agent/pkg/flow/componenttest" - "github.com/grafana/agent/pkg/flow/logging" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/service" + "github.com/grafana/agent/internal/flow" + "github.com/grafana/agent/internal/flow/componenttest" + "github.com/grafana/agent/internal/flow/logging" + "github.com/grafana/agent/internal/service" + "github.com/grafana/agent/internal/util" "github.com/grafana/river" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" diff --git a/service/service.go b/internal/service/service.go similarity index 98% rename from service/service.go rename to internal/service/service.go index a6e73cdee9..344ff11341 100644 --- a/service/service.go +++ b/internal/service/service.go @@ -10,7 +10,7 @@ import ( "context" "fmt" - "github.com/grafana/agent/component" + "github.com/grafana/agent/internal/component" ) // Definition describes an individual Flow service. Services have unique names diff --git a/service/ui/ui.go b/internal/service/ui/ui.go similarity index 90% rename from service/ui/ui.go rename to internal/service/ui/ui.go index d8927c6012..bbf62b748b 100644 --- a/service/ui/ui.go +++ b/internal/service/ui/ui.go @@ -8,10 +8,10 @@ import ( "path" "github.com/gorilla/mux" - "github.com/grafana/agent/service" - http_service "github.com/grafana/agent/service/http" - "github.com/grafana/agent/web/api" - "github.com/grafana/agent/web/ui" + "github.com/grafana/agent/internal/service" + http_service "github.com/grafana/agent/internal/service/http" + "github.com/grafana/agent/internal/web/api" + "github.com/grafana/agent/internal/web/ui" ) // ServiceName defines the name used for the UI service. diff --git a/pkg/agentctl/sync.go b/internal/static/agentctl/sync.go similarity index 96% rename from pkg/agentctl/sync.go rename to internal/static/agentctl/sync.go index a3c752e09f..3246405921 100644 --- a/pkg/agentctl/sync.go +++ b/internal/static/agentctl/sync.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/client" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/client" + "github.com/grafana/agent/internal/static/metrics/instance" ) // ConfigSync loads YAML files from a directory and syncs them to the diff --git a/pkg/agentctl/sync_test.go b/internal/static/agentctl/sync_test.go similarity index 96% rename from pkg/agentctl/sync_test.go rename to internal/static/agentctl/sync_test.go index ace2becd76..8cd490256c 100644 --- a/pkg/agentctl/sync_test.go +++ b/internal/static/agentctl/sync_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - "github.com/grafana/agent/pkg/metrics/cluster/configapi" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/cluster/configapi" + "github.com/grafana/agent/internal/static/metrics/instance" "github.com/stretchr/testify/require" ) diff --git a/pkg/agentctl/testdata/agent-1.yaml b/internal/static/agentctl/testdata/agent-1.yaml similarity index 100% rename from pkg/agentctl/testdata/agent-1.yaml rename to internal/static/agentctl/testdata/agent-1.yaml diff --git a/pkg/agentctl/testdata/agent-2.yaml b/internal/static/agentctl/testdata/agent-2.yaml similarity index 100% rename from pkg/agentctl/testdata/agent-2.yaml rename to internal/static/agentctl/testdata/agent-2.yaml diff --git a/pkg/agentctl/testdata/agent-3.yaml b/internal/static/agentctl/testdata/agent-3.yaml similarity index 100% rename from pkg/agentctl/testdata/agent-3.yaml rename to internal/static/agentctl/testdata/agent-3.yaml diff --git a/pkg/agentctl/waltools/cardinality.go b/internal/static/agentctl/waltools/cardinality.go similarity index 100% rename from pkg/agentctl/waltools/cardinality.go rename to internal/static/agentctl/waltools/cardinality.go diff --git a/pkg/agentctl/waltools/cardinality_test.go b/internal/static/agentctl/waltools/cardinality_test.go similarity index 100% rename from pkg/agentctl/waltools/cardinality_test.go rename to internal/static/agentctl/waltools/cardinality_test.go diff --git a/pkg/agentctl/waltools/samples.go b/internal/static/agentctl/waltools/samples.go similarity index 100% rename from pkg/agentctl/waltools/samples.go rename to internal/static/agentctl/waltools/samples.go diff --git a/pkg/agentctl/waltools/wal_iterator.go b/internal/static/agentctl/waltools/wal_iterator.go similarity index 100% rename from pkg/agentctl/waltools/wal_iterator.go rename to internal/static/agentctl/waltools/wal_iterator.go diff --git a/pkg/agentctl/waltools/walstats.go b/internal/static/agentctl/waltools/walstats.go similarity index 100% rename from pkg/agentctl/waltools/walstats.go rename to internal/static/agentctl/waltools/walstats.go diff --git a/pkg/agentctl/waltools/walstats_test.go b/internal/static/agentctl/waltools/walstats_test.go similarity index 100% rename from pkg/agentctl/waltools/walstats_test.go rename to internal/static/agentctl/waltools/walstats_test.go diff --git a/pkg/agentproto/agent.pb.go b/internal/static/agentproto/agent.pb.go similarity index 100% rename from pkg/agentproto/agent.pb.go rename to internal/static/agentproto/agent.pb.go diff --git a/pkg/agentproto/agent.proto b/internal/static/agentproto/agent.proto similarity index 85% rename from pkg/agentproto/agent.proto rename to internal/static/agentproto/agent.proto index 3b9744cd60..405f7779c4 100644 --- a/pkg/agentproto/agent.proto +++ b/internal/static/agentproto/agent.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package agentproto; -option go_package = "github.com/grafana/agent/pkg/agentproto"; +option go_package = "github.com/grafana/agent/internal/static/agentproto"; import "google/protobuf/empty.proto"; @@ -17,4 +17,4 @@ service ScrapingService { rpc Reshard(ReshardRequest) returns (google.protobuf.Empty); } -message ReshardRequest {} \ No newline at end of file +message ReshardRequest {} diff --git a/pkg/agentproto/func.go b/internal/static/agentproto/func.go similarity index 100% rename from pkg/agentproto/func.go rename to internal/static/agentproto/func.go diff --git a/pkg/agentproto/gen.go b/internal/static/agentproto/gen.go similarity index 100% rename from pkg/agentproto/gen.go rename to internal/static/agentproto/gen.go diff --git a/pkg/client/client.go b/internal/static/client/client.go similarity index 97% rename from pkg/client/client.go rename to internal/static/client/client.go index a3e2b74b02..68048cbce3 100644 --- a/pkg/client/client.go +++ b/internal/static/client/client.go @@ -11,8 +11,8 @@ import ( "net/http" "strings" - "github.com/grafana/agent/pkg/metrics/cluster/configapi" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/cluster/configapi" + "github.com/grafana/agent/internal/static/metrics/instance" "gopkg.in/yaml.v2" ) diff --git a/pkg/config/agent_management_remote_config_test.go b/internal/static/config/agent_management_remote_config_test.go similarity index 98% rename from pkg/config/agent_management_remote_config_test.go rename to internal/static/config/agent_management_remote_config_test.go index 834375bda3..820801cf70 100644 --- a/pkg/config/agent_management_remote_config_test.go +++ b/internal/static/config/agent_management_remote_config_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - process_exporter "github.com/grafana/agent/pkg/integrations/process_exporter" - "github.com/grafana/agent/pkg/metrics/instance" + process_exporter "github.com/grafana/agent/internal/static/integrations/process_exporter" + "github.com/grafana/agent/internal/static/metrics/instance" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" diff --git a/pkg/config/agentmanagement.go b/internal/static/config/agentmanagement.go similarity index 99% rename from pkg/config/agentmanagement.go rename to internal/static/config/agentmanagement.go index 1f50ccc639..9f91ba21a7 100644 --- a/pkg/config/agentmanagement.go +++ b/internal/static/config/agentmanagement.go @@ -14,8 +14,8 @@ import ( "time" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/config/instrumentation" - "github.com/grafana/agent/pkg/server" + "github.com/grafana/agent/internal/static/config/instrumentation" + "github.com/grafana/agent/internal/static/server" "github.com/prometheus/common/config" "gopkg.in/yaml.v2" ) diff --git a/pkg/config/agentmanagement_remote_config.go b/internal/static/config/agentmanagement_remote_config.go similarity index 97% rename from pkg/config/agentmanagement_remote_config.go rename to internal/static/config/agentmanagement_remote_config.go index 8b50938613..6e658e7053 100644 --- a/pkg/config/agentmanagement_remote_config.go +++ b/internal/static/config/agentmanagement_remote_config.go @@ -4,9 +4,9 @@ import ( "bytes" "text/template" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/loki/clients/pkg/promtail/scrapeconfig" "github.com/prometheus/common/model" pc "github.com/prometheus/prometheus/config" diff --git a/pkg/config/agentmanagement_test.go b/internal/static/config/agentmanagement_test.go similarity index 99% rename from pkg/config/agentmanagement_test.go rename to internal/static/config/agentmanagement_test.go index 9ca5b453f7..2cae67cfa6 100644 --- a/pkg/config/agentmanagement_test.go +++ b/internal/static/config/agentmanagement_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/config/features" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/config/features" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/config/config.go b/internal/static/config/config.go similarity index 97% rename from pkg/config/config.go rename to internal/static/config/config.go index 5aa6d62002..d6f732c2af 100644 --- a/pkg/config/config.go +++ b/internal/static/config/config.go @@ -12,15 +12,15 @@ import ( "github.com/drone/envsubst/v2" "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/config/encoder" - "github.com/grafana/agent/pkg/config/features" - "github.com/grafana/agent/pkg/config/instrumentation" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/traces" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/config/encoder" + "github.com/grafana/agent/internal/static/config/features" + "github.com/grafana/agent/internal/static/config/instrumentation" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/static/traces" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/config" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" diff --git a/pkg/config/config_test.go b/internal/static/config/config_test.go similarity index 98% rename from pkg/config/config_test.go rename to internal/static/config/config_test.go index 57bf405237..8b7e7aef72 100644 --- a/pkg/config/config_test.go +++ b/internal/static/config/config_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/config/encoder" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/config/encoder" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/util" commonCfg "github.com/prometheus/common/config" "github.com/prometheus/common/model" promCfg "github.com/prometheus/prometheus/config" diff --git a/pkg/config/encoder/encoder.go b/internal/static/config/encoder/encoder.go similarity index 100% rename from pkg/config/encoder/encoder.go rename to internal/static/config/encoder/encoder.go diff --git a/pkg/config/encoder/test_encoding_unknown.txt b/internal/static/config/encoder/test_encoding_unknown.txt similarity index 100% rename from pkg/config/encoder/test_encoding_unknown.txt rename to internal/static/config/encoder/test_encoding_unknown.txt diff --git a/pkg/config/encoder/test_encoding_utf16be.txt b/internal/static/config/encoder/test_encoding_utf16be.txt similarity index 100% rename from pkg/config/encoder/test_encoding_utf16be.txt rename to internal/static/config/encoder/test_encoding_utf16be.txt diff --git a/pkg/config/encoder/test_encoding_utf16le.txt b/internal/static/config/encoder/test_encoding_utf16le.txt similarity index 100% rename from pkg/config/encoder/test_encoding_utf16le.txt rename to internal/static/config/encoder/test_encoding_utf16le.txt diff --git a/pkg/config/encoder/test_encoding_utf32be.txt b/internal/static/config/encoder/test_encoding_utf32be.txt similarity index 100% rename from pkg/config/encoder/test_encoding_utf32be.txt rename to internal/static/config/encoder/test_encoding_utf32be.txt diff --git a/pkg/config/encoder/test_encoding_utf32le.txt b/internal/static/config/encoder/test_encoding_utf32le.txt similarity index 100% rename from pkg/config/encoder/test_encoding_utf32le.txt rename to internal/static/config/encoder/test_encoding_utf32le.txt diff --git a/pkg/config/encoder/test_encoding_utf8.txt b/internal/static/config/encoder/test_encoding_utf8.txt similarity index 100% rename from pkg/config/encoder/test_encoding_utf8.txt rename to internal/static/config/encoder/test_encoding_utf8.txt diff --git a/pkg/config/encoder/test_encoding_utf8bom.txt b/internal/static/config/encoder/test_encoding_utf8bom.txt similarity index 100% rename from pkg/config/encoder/test_encoding_utf8bom.txt rename to internal/static/config/encoder/test_encoding_utf8bom.txt diff --git a/pkg/config/features/features.go b/internal/static/config/features/features.go similarity index 100% rename from pkg/config/features/features.go rename to internal/static/config/features/features.go diff --git a/pkg/config/features/features_test.go b/internal/static/config/features/features_test.go similarity index 100% rename from pkg/config/features/features_test.go rename to internal/static/config/features/features_test.go diff --git a/pkg/config/instrumentation/agent_management_metrics.go b/internal/static/config/instrumentation/agent_management_metrics.go similarity index 100% rename from pkg/config/instrumentation/agent_management_metrics.go rename to internal/static/config/instrumentation/agent_management_metrics.go diff --git a/pkg/config/instrumentation/config_metrics.go b/internal/static/config/instrumentation/config_metrics.go similarity index 100% rename from pkg/config/instrumentation/config_metrics.go rename to internal/static/config/instrumentation/config_metrics.go diff --git a/pkg/config/instrumentation/remote_config_metrics.go b/internal/static/config/instrumentation/remote_config_metrics.go similarity index 100% rename from pkg/config/instrumentation/remote_config_metrics.go rename to internal/static/config/instrumentation/remote_config_metrics.go diff --git a/pkg/config/integrations.go b/internal/static/config/integrations.go similarity index 95% rename from pkg/config/integrations.go rename to internal/static/config/integrations.go index 2edd0d75ab..c4ebb70ec3 100644 --- a/pkg/config/integrations.go +++ b/internal/static/config/integrations.go @@ -6,11 +6,11 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - v1 "github.com/grafana/agent/pkg/integrations" - v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/util" + v1 "github.com/grafana/agent/internal/static/integrations" + v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/util" "github.com/prometheus/statsd_exporter/pkg/level" "golang.org/x/exp/maps" "gopkg.in/yaml.v2" diff --git a/pkg/config/integrations_test.go b/internal/static/config/integrations_test.go similarity index 95% rename from pkg/config/integrations_test.go rename to internal/static/config/integrations_test.go index a099951a3a..b0854f3219 100644 --- a/pkg/config/integrations_test.go +++ b/internal/static/config/integrations_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" - _ "github.com/grafana/agent/pkg/integrations/install" // Install integrations for tests - "github.com/grafana/agent/pkg/util" + _ "github.com/grafana/agent/internal/static/integrations/install" // Install integrations for tests + "github.com/grafana/agent/internal/util" ) func TestIntegrations_v1(t *testing.T) { diff --git a/pkg/config/remote_config.go b/internal/static/config/remote_config.go similarity index 98% rename from pkg/config/remote_config.go rename to internal/static/config/remote_config.go index 9b272553cb..6b23c89ea1 100644 --- a/pkg/config/remote_config.go +++ b/internal/static/config/remote_config.go @@ -7,7 +7,7 @@ import ( "net/url" "time" - "github.com/grafana/agent/pkg/config/instrumentation" + "github.com/grafana/agent/internal/static/config/instrumentation" "github.com/prometheus/common/config" ) diff --git a/pkg/config/remote_config_test.go b/internal/static/config/remote_config_test.go similarity index 100% rename from pkg/config/remote_config_test.go rename to internal/static/config/remote_config_test.go diff --git a/pkg/config/testdata/server_empty.yml b/internal/static/config/testdata/server_empty.yml similarity index 100% rename from pkg/config/testdata/server_empty.yml rename to internal/static/config/testdata/server_empty.yml diff --git a/pkg/integrations/agent/agent.go b/internal/static/integrations/agent/agent.go similarity index 93% rename from pkg/integrations/agent/agent.go rename to internal/static/integrations/agent/agent.go index 3976f82795..4134dc13c3 100644 --- a/pkg/integrations/agent/agent.go +++ b/internal/static/integrations/agent/agent.go @@ -8,8 +8,8 @@ import ( "net/http" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/config" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/pkg/integrations/apache_http/apache_http.go b/internal/static/integrations/apache_http/apache_http.go similarity index 97% rename from pkg/integrations/apache_http/apache_http.go rename to internal/static/integrations/apache_http/apache_http.go index a0a8c647bb..522de99aef 100644 --- a/pkg/integrations/apache_http/apache_http.go +++ b/internal/static/integrations/apache_http/apache_http.go @@ -7,7 +7,7 @@ import ( ae "github.com/Lusitaniae/apache_exporter/collector" "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" ) // DefaultConfig holds the default settings for the apache_http integration diff --git a/pkg/integrations/azure_exporter/azure_exporter.go b/internal/static/integrations/azure_exporter/azure_exporter.go similarity index 98% rename from pkg/integrations/azure_exporter/azure_exporter.go rename to internal/static/integrations/azure_exporter/azure_exporter.go index 8f2996a65e..dd8e6b2677 100644 --- a/pkg/integrations/azure_exporter/azure_exporter.go +++ b/internal/static/integrations/azure_exporter/azure_exporter.go @@ -14,7 +14,7 @@ import ( "github.com/webdevops/azure-metrics-exporter/metrics" "github.com/webdevops/go-common/azuresdk/armclient" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) type Exporter struct { diff --git a/pkg/integrations/azure_exporter/config.go b/internal/static/integrations/azure_exporter/config.go similarity index 97% rename from pkg/integrations/azure_exporter/config.go rename to internal/static/integrations/azure_exporter/config.go index 17893dc435..3cef29da56 100644 --- a/pkg/integrations/azure_exporter/config.go +++ b/internal/static/integrations/azure_exporter/config.go @@ -16,10 +16,10 @@ import ( "github.com/webdevops/go-common/azuresdk/cloudconfig" "gopkg.in/yaml.v3" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/util/zapadapter" ) func init() { diff --git a/pkg/integrations/azure_exporter/config_test.go b/internal/static/integrations/azure_exporter/config_test.go similarity index 99% rename from pkg/integrations/azure_exporter/config_test.go rename to internal/static/integrations/azure_exporter/config_test.go index 4690184a59..1065286ffc 100644 --- a/pkg/integrations/azure_exporter/config_test.go +++ b/internal/static/integrations/azure_exporter/config_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" "github.com/webdevops/azure-metrics-exporter/metrics" - "github.com/grafana/agent/pkg/integrations/azure_exporter" + "github.com/grafana/agent/internal/static/integrations/azure_exporter" ) func TestConfig_ToScrapeSettings(t *testing.T) { diff --git a/pkg/integrations/blackbox_exporter/blackbox_exporter.go b/internal/static/integrations/blackbox_exporter/blackbox_exporter.go similarity index 96% rename from pkg/integrations/blackbox_exporter/blackbox_exporter.go rename to internal/static/integrations/blackbox_exporter/blackbox_exporter.go index 36634a5231..28ffdaf95c 100644 --- a/pkg/integrations/blackbox_exporter/blackbox_exporter.go +++ b/internal/static/integrations/blackbox_exporter/blackbox_exporter.go @@ -7,9 +7,9 @@ import ( "net/url" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/config" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/internal/util" blackbox_config "github.com/prometheus/blackbox_exporter/config" "github.com/prometheus/blackbox_exporter/prober" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/integrations/blackbox_exporter/blackbox_exporter_test.go b/internal/static/integrations/blackbox_exporter/blackbox_exporter_test.go similarity index 94% rename from pkg/integrations/blackbox_exporter/blackbox_exporter_test.go rename to internal/static/integrations/blackbox_exporter/blackbox_exporter_test.go index d6b06d20a7..eb3bfb22bc 100644 --- a/pkg/integrations/blackbox_exporter/blackbox_exporter_test.go +++ b/internal/static/integrations/blackbox_exporter/blackbox_exporter_test.go @@ -4,7 +4,7 @@ import ( "net/url" "testing" - integrations "github.com/grafana/agent/pkg/integrations/config" + integrations "github.com/grafana/agent/internal/static/integrations/config" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) diff --git a/pkg/integrations/cadvisor/cadvisor.go b/internal/static/integrations/cadvisor/cadvisor.go similarity index 99% rename from pkg/integrations/cadvisor/cadvisor.go rename to internal/static/integrations/cadvisor/cadvisor.go index cfe8380eb3..ec1094ab68 100644 --- a/pkg/integrations/cadvisor/cadvisor.go +++ b/internal/static/integrations/cadvisor/cadvisor.go @@ -20,7 +20,7 @@ import ( "k8s.io/klog/v2" "k8s.io/utils/clock" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" // Register container providers diff --git a/pkg/integrations/cadvisor/cadvisor_stub.go b/internal/static/integrations/cadvisor/cadvisor_stub.go similarity index 88% rename from pkg/integrations/cadvisor/cadvisor_stub.go rename to internal/static/integrations/cadvisor/cadvisor_stub.go index 032b8b5f38..80a038b85d 100644 --- a/pkg/integrations/cadvisor/cadvisor_stub.go +++ b/internal/static/integrations/cadvisor/cadvisor_stub.go @@ -3,7 +3,7 @@ package cadvisor //nolint:golint import ( - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" "github.com/go-kit/log" "github.com/go-kit/log/level" diff --git a/pkg/integrations/cadvisor/cadvisor_test.go b/internal/static/integrations/cadvisor/cadvisor_test.go similarity index 94% rename from pkg/integrations/cadvisor/cadvisor_test.go rename to internal/static/integrations/cadvisor/cadvisor_test.go index be481d28fc..17d2ebc49c 100644 --- a/pkg/integrations/cadvisor/cadvisor_test.go +++ b/internal/static/integrations/cadvisor/cadvisor_test.go @@ -6,7 +6,7 @@ import ( "context" "testing" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" "gopkg.in/yaml.v3" ) diff --git a/pkg/integrations/cadvisor/common.go b/internal/static/integrations/cadvisor/common.go similarity index 96% rename from pkg/integrations/cadvisor/common.go rename to internal/static/integrations/cadvisor/common.go index 0ce16d6c49..979f3e0f13 100644 --- a/pkg/integrations/cadvisor/common.go +++ b/internal/static/integrations/cadvisor/common.go @@ -4,9 +4,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" ) const name = "cadvisor" diff --git a/pkg/integrations/cloudwatch_exporter/cloudwatch_exporter.go b/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go similarity index 98% rename from pkg/integrations/cloudwatch_exporter/cloudwatch_exporter.go rename to internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go index 9ae44c9966..81a2d876be 100644 --- a/pkg/integrations/cloudwatch_exporter/cloudwatch_exporter.go +++ b/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go @@ -13,7 +13,7 @@ import ( "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) type cachingFactory interface { diff --git a/pkg/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go b/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go similarity index 98% rename from pkg/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go rename to internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go index 6142973679..cd418c4eeb 100644 --- a/pkg/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go +++ b/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go @@ -13,7 +13,7 @@ import ( "github.com/prometheus/client_golang/prometheus/promhttp" "go.uber.org/atomic" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) // asyncExporter wraps YACE entrypoint around an Integration implementation diff --git a/pkg/integrations/cloudwatch_exporter/config.go b/internal/static/integrations/cloudwatch_exporter/config.go similarity index 98% rename from pkg/integrations/cloudwatch_exporter/config.go rename to internal/static/integrations/cloudwatch_exporter/config.go index b3a326c65c..04390c1d36 100644 --- a/pkg/integrations/cloudwatch_exporter/config.go +++ b/internal/static/integrations/cloudwatch_exporter/config.go @@ -11,9 +11,9 @@ import ( yaceModel "github.com/nerdswords/yet-another-cloudwatch-exporter/pkg/model" "gopkg.in/yaml.v2" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" ) const ( diff --git a/pkg/integrations/cloudwatch_exporter/config_test.go b/internal/static/integrations/cloudwatch_exporter/config_test.go similarity index 100% rename from pkg/integrations/cloudwatch_exporter/config_test.go rename to internal/static/integrations/cloudwatch_exporter/config_test.go diff --git a/pkg/integrations/cloudwatch_exporter/docs/doc.go b/internal/static/integrations/cloudwatch_exporter/docs/doc.go similarity index 100% rename from pkg/integrations/cloudwatch_exporter/docs/doc.go rename to internal/static/integrations/cloudwatch_exporter/docs/doc.go diff --git a/pkg/integrations/cloudwatch_exporter/docs/template.md b/internal/static/integrations/cloudwatch_exporter/docs/template.md similarity index 100% rename from pkg/integrations/cloudwatch_exporter/docs/template.md rename to internal/static/integrations/cloudwatch_exporter/docs/template.md diff --git a/pkg/integrations/collector_integration.go b/internal/static/integrations/collector_integration.go similarity index 96% rename from pkg/integrations/collector_integration.go rename to internal/static/integrations/collector_integration.go index df6cce3eab..54c3e4ffed 100644 --- a/pkg/integrations/collector_integration.go +++ b/internal/static/integrations/collector_integration.go @@ -5,8 +5,8 @@ import ( "fmt" "net/http" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/integrations/config" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/pkg/integrations/config/config.go b/internal/static/integrations/config/config.go similarity index 100% rename from pkg/integrations/config/config.go rename to internal/static/integrations/config/config.go diff --git a/pkg/integrations/consul_exporter/consul_exporter.go b/internal/static/integrations/consul_exporter/consul_exporter.go similarity index 93% rename from pkg/integrations/consul_exporter/consul_exporter.go rename to internal/static/integrations/consul_exporter/consul_exporter.go index d76b4477ef..83518f5bb9 100644 --- a/pkg/integrations/consul_exporter/consul_exporter.go +++ b/internal/static/integrations/consul_exporter/consul_exporter.go @@ -7,9 +7,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" consul_api "github.com/hashicorp/consul/api" "github.com/prometheus/consul_exporter/pkg/exporter" ) diff --git a/pkg/integrations/dnsmasq_exporter/dnsmasq_exporter.go b/internal/static/integrations/dnsmasq_exporter/dnsmasq_exporter.go similarity index 91% rename from pkg/integrations/dnsmasq_exporter/dnsmasq_exporter.go rename to internal/static/integrations/dnsmasq_exporter/dnsmasq_exporter.go index 080134a144..67bdd03f6b 100644 --- a/pkg/integrations/dnsmasq_exporter/dnsmasq_exporter.go +++ b/internal/static/integrations/dnsmasq_exporter/dnsmasq_exporter.go @@ -4,9 +4,9 @@ package dnsmasq_exporter import ( "github.com/go-kit/log" "github.com/google/dnsmasq_exporter/collector" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/miekg/dns" ) diff --git a/pkg/integrations/elasticsearch_exporter/elasticsearch_exporter.go b/internal/static/integrations/elasticsearch_exporter/elasticsearch_exporter.go similarity index 97% rename from pkg/integrations/elasticsearch_exporter/elasticsearch_exporter.go rename to internal/static/integrations/elasticsearch_exporter/elasticsearch_exporter.go index d221a3521f..980d491cd0 100644 --- a/pkg/integrations/elasticsearch_exporter/elasticsearch_exporter.go +++ b/internal/static/integrations/elasticsearch_exporter/elasticsearch_exporter.go @@ -14,9 +14,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/prometheus/client_golang/prometheus" promCfg "github.com/prometheus/common/config" diff --git a/pkg/integrations/elasticsearch_exporter/tls.go b/internal/static/integrations/elasticsearch_exporter/tls.go similarity index 100% rename from pkg/integrations/elasticsearch_exporter/tls.go rename to internal/static/integrations/elasticsearch_exporter/tls.go diff --git a/pkg/integrations/gcp_exporter/gcp_exporter.go b/internal/static/integrations/gcp_exporter/gcp_exporter.go similarity index 96% rename from pkg/integrations/gcp_exporter/gcp_exporter.go rename to internal/static/integrations/gcp_exporter/gcp_exporter.go index 302fa17294..acfea2d36f 100644 --- a/pkg/integrations/gcp_exporter/gcp_exporter.go +++ b/internal/static/integrations/gcp_exporter/gcp_exporter.go @@ -21,9 +21,9 @@ import ( "google.golang.org/api/option" "gopkg.in/yaml.v2" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" ) func init() { diff --git a/pkg/integrations/gcp_exporter/gcp_exporter_test.go b/internal/static/integrations/gcp_exporter/gcp_exporter_test.go similarity index 98% rename from pkg/integrations/gcp_exporter/gcp_exporter_test.go rename to internal/static/integrations/gcp_exporter/gcp_exporter_test.go index 707ce10d19..075fd267b6 100644 --- a/pkg/integrations/gcp_exporter/gcp_exporter_test.go +++ b/internal/static/integrations/gcp_exporter/gcp_exporter_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/agent/pkg/integrations/gcp_exporter" + "github.com/grafana/agent/internal/static/integrations/gcp_exporter" ) func TestConfig_Validate(t *testing.T) { diff --git a/pkg/integrations/github_exporter/github_exporter.go b/internal/static/integrations/github_exporter/github_exporter.go similarity index 93% rename from pkg/integrations/github_exporter/github_exporter.go rename to internal/static/integrations/github_exporter/github_exporter.go index 580375b78c..a28e8226ab 100644 --- a/pkg/integrations/github_exporter/github_exporter.go +++ b/internal/static/integrations/github_exporter/github_exporter.go @@ -8,9 +8,9 @@ import ( "github.com/githubexporter/github-exporter/exporter" "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" config_util "github.com/prometheus/common/config" ) diff --git a/pkg/integrations/github_exporter/github_test.go b/internal/static/integrations/github_exporter/github_test.go similarity index 86% rename from pkg/integrations/github_exporter/github_test.go rename to internal/static/integrations/github_exporter/github_test.go index 8f90e1ac21..146db3f660 100644 --- a/pkg/integrations/github_exporter/github_test.go +++ b/internal/static/integrations/github_exporter/github_test.go @@ -3,7 +3,7 @@ package github_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/pkg/config" + "github.com/grafana/agent/internal/static/config" // register github_exporter ) diff --git a/pkg/integrations/handler_integration.go b/internal/static/integrations/handler_integration.go similarity index 91% rename from pkg/integrations/handler_integration.go rename to internal/static/integrations/handler_integration.go index 10e2749aba..c3d02388d4 100644 --- a/pkg/integrations/handler_integration.go +++ b/internal/static/integrations/handler_integration.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) // NewHandlerIntegration creates a new named integration that will call handler diff --git a/internal/static/integrations/install/install.go b/internal/static/integrations/install/install.go new file mode 100644 index 0000000000..8ce2be4a3b --- /dev/null +++ b/internal/static/integrations/install/install.go @@ -0,0 +1,48 @@ +// Package install registers all in-source integrations for use. +package install + +import ( + // + // v1 integrations + // + + _ "github.com/grafana/agent/internal/static/integrations/agent" // register agent + _ "github.com/grafana/agent/internal/static/integrations/apache_http" // register apache_exporter + _ "github.com/grafana/agent/internal/static/integrations/azure_exporter" // register azure_exporter + _ "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" // register blackbox_exporter + _ "github.com/grafana/agent/internal/static/integrations/cadvisor" // register cadvisor + _ "github.com/grafana/agent/internal/static/integrations/cloudwatch_exporter" // register cloudwatch_exporter + _ "github.com/grafana/agent/internal/static/integrations/consul_exporter" // register consul_exporter + _ "github.com/grafana/agent/internal/static/integrations/dnsmasq_exporter" // register dnsmasq_exporter + _ "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" // register elasticsearch_exporter + _ "github.com/grafana/agent/internal/static/integrations/gcp_exporter" // register gcp_exporter + _ "github.com/grafana/agent/internal/static/integrations/github_exporter" // register github_exporter + _ "github.com/grafana/agent/internal/static/integrations/kafka_exporter" // register kafka_exporter + _ "github.com/grafana/agent/internal/static/integrations/memcached_exporter" // register memcached_exporter + _ "github.com/grafana/agent/internal/static/integrations/mongodb_exporter" // register mongodb_exporter + _ "github.com/grafana/agent/internal/static/integrations/mssql" // register mssql + _ "github.com/grafana/agent/internal/static/integrations/mysqld_exporter" // register mysqld_exporter + _ "github.com/grafana/agent/internal/static/integrations/node_exporter" // register node_exporter + _ "github.com/grafana/agent/internal/static/integrations/oracledb_exporter" // register oracledb_exporter + _ "github.com/grafana/agent/internal/static/integrations/postgres_exporter" // register postgres_exporter + _ "github.com/grafana/agent/internal/static/integrations/process_exporter" // register process_exporter + _ "github.com/grafana/agent/internal/static/integrations/redis_exporter" // register redis_exporter + _ "github.com/grafana/agent/internal/static/integrations/snmp_exporter" // register snmp_exporter + _ "github.com/grafana/agent/internal/static/integrations/snowflake_exporter" // register snowflake_exporter + _ "github.com/grafana/agent/internal/static/integrations/squid_exporter" // register squid_exporter + _ "github.com/grafana/agent/internal/static/integrations/statsd_exporter" // register statsd_exporter + _ "github.com/grafana/agent/internal/static/integrations/vmware_exporter" // register vmware_exporter + _ "github.com/grafana/agent/internal/static/integrations/windows_exporter" // register windows_exporter + + // + // v2 integrations + // + + _ "github.com/grafana/agent/internal/static/integrations/v2/agent" // register agent + _ "github.com/grafana/agent/internal/static/integrations/v2/apache_http" // register apache_exporter + _ "github.com/grafana/agent/internal/static/integrations/v2/app_agent_receiver" // register app_agent_receiver + _ "github.com/grafana/agent/internal/static/integrations/v2/blackbox_exporter" // register blackbox_exporter + _ "github.com/grafana/agent/internal/static/integrations/v2/eventhandler" // register eventhandler + _ "github.com/grafana/agent/internal/static/integrations/v2/snmp_exporter" // register snmp_exporter + _ "github.com/grafana/agent/internal/static/integrations/v2/vmware_exporter" // register vmware_exporter +) diff --git a/pkg/integrations/install/install_test.go b/internal/static/integrations/install/install_test.go similarity index 94% rename from pkg/integrations/install/install_test.go rename to internal/static/integrations/install/install_test.go index 6625b4c19a..fd7c2da767 100644 --- a/pkg/integrations/install/install_test.go +++ b/internal/static/integrations/install/install_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - v1 "github.com/grafana/agent/pkg/integrations" - v2 "github.com/grafana/agent/pkg/integrations/v2" + v1 "github.com/grafana/agent/internal/static/integrations" + v2 "github.com/grafana/agent/internal/static/integrations/v2" "github.com/stretchr/testify/require" ) diff --git a/pkg/integrations/integration.go b/internal/static/integrations/integration.go similarity index 97% rename from pkg/integrations/integration.go rename to internal/static/integrations/integration.go index b5891d8d15..d8ebe03875 100644 --- a/pkg/integrations/integration.go +++ b/internal/static/integrations/integration.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) // Config provides the configuration and constructor for an integration. diff --git a/pkg/integrations/kafka_exporter/kafka_exporter.go b/internal/static/integrations/kafka_exporter/kafka_exporter.go similarity index 96% rename from pkg/integrations/kafka_exporter/kafka_exporter.go rename to internal/static/integrations/kafka_exporter/kafka_exporter.go index 5d50fe1452..e0e354f74c 100644 --- a/pkg/integrations/kafka_exporter/kafka_exporter.go +++ b/internal/static/integrations/kafka_exporter/kafka_exporter.go @@ -8,9 +8,9 @@ import ( "github.com/IBM/sarama" kafka_exporter "github.com/davidmparrott/kafka_exporter/v2/exporter" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" ) // DefaultConfig holds the default settings for the kafka_lag_exporter diff --git a/pkg/integrations/kafka_exporter/kafka_test.go b/internal/static/integrations/kafka_exporter/kafka_test.go similarity index 86% rename from pkg/integrations/kafka_exporter/kafka_test.go rename to internal/static/integrations/kafka_exporter/kafka_test.go index ffe2b4e87c..f8a67d2658 100644 --- a/pkg/integrations/kafka_exporter/kafka_test.go +++ b/internal/static/integrations/kafka_exporter/kafka_test.go @@ -3,7 +3,7 @@ package kafka_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/pkg/config" + "github.com/grafana/agent/internal/static/config" ) func TestConfig_SecretKafkaPassword(t *testing.T) { diff --git a/pkg/integrations/logruskit.go b/internal/static/integrations/logruskit.go similarity index 100% rename from pkg/integrations/logruskit.go rename to internal/static/integrations/logruskit.go diff --git a/pkg/integrations/manager.go b/internal/static/integrations/manager.go similarity index 98% rename from pkg/integrations/manager.go rename to internal/static/integrations/manager.go index 6b362f5742..de22be37e8 100644 --- a/pkg/integrations/manager.go +++ b/internal/static/integrations/manager.go @@ -14,11 +14,11 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/metrics/instance/configstore" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance/configstore" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" diff --git a/pkg/integrations/manager_test.go b/internal/static/integrations/manager_test.go similarity index 98% rename from pkg/integrations/manager_test.go rename to internal/static/integrations/manager_test.go index 14fe818007..e44dfb6c09 100644 --- a/pkg/integrations/manager_test.go +++ b/internal/static/integrations/manager_test.go @@ -8,9 +8,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/config" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/model" promConfig "github.com/prometheus/prometheus/config" diff --git a/pkg/integrations/memcached_exporter/memcached_exporter.go b/internal/static/integrations/memcached_exporter/memcached_exporter.go similarity index 92% rename from pkg/integrations/memcached_exporter/memcached_exporter.go rename to internal/static/integrations/memcached_exporter/memcached_exporter.go index 699074149f..8d8e591568 100644 --- a/pkg/integrations/memcached_exporter/memcached_exporter.go +++ b/internal/static/integrations/memcached_exporter/memcached_exporter.go @@ -10,9 +10,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/prometheus/memcached_exporter/pkg/exporter" ) diff --git a/pkg/integrations/mongodb_exporter/mongodb_exporter.go b/internal/static/integrations/mongodb_exporter/mongodb_exporter.go similarity index 93% rename from pkg/integrations/mongodb_exporter/mongodb_exporter.go rename to internal/static/integrations/mongodb_exporter/mongodb_exporter.go index a9899b775d..a07c45071d 100644 --- a/pkg/integrations/mongodb_exporter/mongodb_exporter.go +++ b/internal/static/integrations/mongodb_exporter/mongodb_exporter.go @@ -10,9 +10,9 @@ import ( "github.com/percona/mongodb_exporter/exporter" config_util "github.com/prometheus/common/config" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" ) var DefaultConfig = Config{ diff --git a/pkg/integrations/mongodb_exporter/mongodb_test.go b/internal/static/integrations/mongodb_exporter/mongodb_test.go similarity index 86% rename from pkg/integrations/mongodb_exporter/mongodb_test.go rename to internal/static/integrations/mongodb_exporter/mongodb_test.go index c654eb249a..b1fac94934 100644 --- a/pkg/integrations/mongodb_exporter/mongodb_test.go +++ b/internal/static/integrations/mongodb_exporter/mongodb_test.go @@ -3,7 +3,7 @@ package mongodb_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/pkg/config" + "github.com/grafana/agent/internal/static/config" ) func TestConfig_SecretMongoDB(t *testing.T) { diff --git a/pkg/integrations/mssql/collector.go b/internal/static/integrations/mssql/collector.go similarity index 100% rename from pkg/integrations/mssql/collector.go rename to internal/static/integrations/mssql/collector.go diff --git a/pkg/integrations/mssql/collector_config.yaml b/internal/static/integrations/mssql/collector_config.yaml similarity index 100% rename from pkg/integrations/mssql/collector_config.yaml rename to internal/static/integrations/mssql/collector_config.yaml diff --git a/pkg/integrations/mssql/collector_test.go b/internal/static/integrations/mssql/collector_test.go similarity index 100% rename from pkg/integrations/mssql/collector_test.go rename to internal/static/integrations/mssql/collector_test.go diff --git a/pkg/integrations/mssql/sql_exporter.go b/internal/static/integrations/mssql/sql_exporter.go similarity index 94% rename from pkg/integrations/mssql/sql_exporter.go rename to internal/static/integrations/mssql/sql_exporter.go index 84d930d35a..f378b7f90f 100644 --- a/pkg/integrations/mssql/sql_exporter.go +++ b/internal/static/integrations/mssql/sql_exporter.go @@ -13,10 +13,10 @@ import ( "github.com/burningalchemist/sql_exporter" "github.com/burningalchemist/sql_exporter/config" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/model" ) diff --git a/pkg/integrations/mssql/sql_exporter_test.go b/internal/static/integrations/mssql/sql_exporter_test.go similarity index 100% rename from pkg/integrations/mssql/sql_exporter_test.go rename to internal/static/integrations/mssql/sql_exporter_test.go diff --git a/pkg/integrations/mysqld_exporter/mysqld-exporter.go b/internal/static/integrations/mysqld_exporter/mysqld-exporter.go similarity index 97% rename from pkg/integrations/mysqld_exporter/mysqld-exporter.go rename to internal/static/integrations/mysqld_exporter/mysqld-exporter.go index f0de51fa51..eae4294fda 100644 --- a/pkg/integrations/mysqld_exporter/mysqld-exporter.go +++ b/internal/static/integrations/mysqld_exporter/mysqld-exporter.go @@ -11,9 +11,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/go-sql-driver/mysql" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/prometheus/mysqld_exporter/collector" ) diff --git a/pkg/integrations/mysqld_exporter/mysqld_test.go b/internal/static/integrations/mysqld_exporter/mysqld_test.go similarity index 86% rename from pkg/integrations/mysqld_exporter/mysqld_test.go rename to internal/static/integrations/mysqld_exporter/mysqld_test.go index 812fd3637b..7c620ee409 100644 --- a/pkg/integrations/mysqld_exporter/mysqld_test.go +++ b/internal/static/integrations/mysqld_exporter/mysqld_test.go @@ -3,7 +3,7 @@ package mysqld_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/pkg/config" + "github.com/grafana/agent/internal/static/config" ) func TestConfig_SecretMysqlD(t *testing.T) { diff --git a/pkg/integrations/node_exporter/collectors.go b/internal/static/integrations/node_exporter/collectors.go similarity index 100% rename from pkg/integrations/node_exporter/collectors.go rename to internal/static/integrations/node_exporter/collectors.go diff --git a/pkg/integrations/node_exporter/config.go b/internal/static/integrations/node_exporter/config.go similarity index 98% rename from pkg/integrations/node_exporter/config.go rename to internal/static/integrations/node_exporter/config.go index ae7068a59a..4dda0d7266 100644 --- a/pkg/integrations/node_exporter/config.go +++ b/internal/static/integrations/node_exporter/config.go @@ -8,9 +8,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/grafana/dskit/flagext" "github.com/prometheus/node_exporter/collector" "github.com/prometheus/procfs" diff --git a/pkg/integrations/node_exporter/config_test.go b/internal/static/integrations/node_exporter/config_test.go similarity index 100% rename from pkg/integrations/node_exporter/config_test.go rename to internal/static/integrations/node_exporter/config_test.go diff --git a/pkg/integrations/node_exporter/node_exporter.go b/internal/static/integrations/node_exporter/node_exporter.go similarity index 96% rename from pkg/integrations/node_exporter/node_exporter.go rename to internal/static/integrations/node_exporter/node_exporter.go index 6e9e8dd3ce..3833c5103e 100644 --- a/pkg/integrations/node_exporter/node_exporter.go +++ b/internal/static/integrations/node_exporter/node_exporter.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/integrations/config" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/node_exporter/collector" diff --git a/pkg/integrations/node_exporter/node_exporter_linux.go b/internal/static/integrations/node_exporter/node_exporter_linux.go similarity index 100% rename from pkg/integrations/node_exporter/node_exporter_linux.go rename to internal/static/integrations/node_exporter/node_exporter_linux.go diff --git a/pkg/integrations/node_exporter/node_exporter_test.go b/internal/static/integrations/node_exporter/node_exporter_test.go similarity index 100% rename from pkg/integrations/node_exporter/node_exporter_test.go rename to internal/static/integrations/node_exporter/node_exporter_test.go diff --git a/pkg/integrations/node_exporter/node_exporter_windows.go b/internal/static/integrations/node_exporter/node_exporter_windows.go similarity index 94% rename from pkg/integrations/node_exporter/node_exporter_windows.go rename to internal/static/integrations/node_exporter/node_exporter_windows.go index 275bd9f6cb..0dfdf44601 100644 --- a/pkg/integrations/node_exporter/node_exporter_windows.go +++ b/internal/static/integrations/node_exporter/node_exporter_windows.go @@ -6,7 +6,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) // Integration is the node_exporter integration. On Windows platforms, diff --git a/pkg/integrations/oracledb_exporter/oracledb_exporter.go b/internal/static/integrations/oracledb_exporter/oracledb_exporter.go similarity index 94% rename from pkg/integrations/oracledb_exporter/oracledb_exporter.go rename to internal/static/integrations/oracledb_exporter/oracledb_exporter.go index 58d6f2dacb..c4385e5aa2 100644 --- a/pkg/integrations/oracledb_exporter/oracledb_exporter.go +++ b/internal/static/integrations/oracledb_exporter/oracledb_exporter.go @@ -7,14 +7,14 @@ import ( "os" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" oe "github.com/iamseth/oracledb_exporter/collector" // required driver for integration _ "github.com/sijms/go-ora/v2" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" config_util "github.com/prometheus/common/config" ) diff --git a/pkg/integrations/oracledb_exporter/oracledb_exporter_test.go b/internal/static/integrations/oracledb_exporter/oracledb_exporter_test.go similarity index 100% rename from pkg/integrations/oracledb_exporter/oracledb_exporter_test.go rename to internal/static/integrations/oracledb_exporter/oracledb_exporter_test.go diff --git a/pkg/integrations/postgres_exporter/postgres_exporter.go b/internal/static/integrations/postgres_exporter/postgres_exporter.go similarity index 95% rename from pkg/integrations/postgres_exporter/postgres_exporter.go rename to internal/static/integrations/postgres_exporter/postgres_exporter.go index 8bb71b4643..aa375be8c4 100644 --- a/pkg/integrations/postgres_exporter/postgres_exporter.go +++ b/internal/static/integrations/postgres_exporter/postgres_exporter.go @@ -9,9 +9,9 @@ import ( config_util "github.com/prometheus/common/config" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/lib/pq" "github.com/prometheus-community/postgres_exporter/exporter" ) diff --git a/pkg/integrations/postgres_exporter/postgres_exporter_test.go b/internal/static/integrations/postgres_exporter/postgres_exporter_test.go similarity index 100% rename from pkg/integrations/postgres_exporter/postgres_exporter_test.go rename to internal/static/integrations/postgres_exporter/postgres_exporter_test.go diff --git a/pkg/integrations/postgres_exporter/postgres_test.go b/internal/static/integrations/postgres_exporter/postgres_test.go similarity index 89% rename from pkg/integrations/postgres_exporter/postgres_test.go rename to internal/static/integrations/postgres_exporter/postgres_test.go index e3a74f7bbc..cb189ee719 100644 --- a/pkg/integrations/postgres_exporter/postgres_test.go +++ b/internal/static/integrations/postgres_exporter/postgres_test.go @@ -3,7 +3,7 @@ package postgres_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/pkg/config" + "github.com/grafana/agent/internal/static/config" ) func TestConfig_SecretPostgres(t *testing.T) { diff --git a/pkg/integrations/process_exporter/config.go b/internal/static/integrations/process_exporter/config.go similarity index 89% rename from pkg/integrations/process_exporter/config.go rename to internal/static/integrations/process_exporter/config.go index 58dc1df109..a43bb45074 100644 --- a/pkg/integrations/process_exporter/config.go +++ b/internal/static/integrations/process_exporter/config.go @@ -3,9 +3,9 @@ package process_exporter //nolint:golint import ( "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" exporter_config "github.com/ncabatoff/process-exporter/config" ) diff --git a/pkg/integrations/process_exporter/process-exporter.go b/internal/static/integrations/process_exporter/process-exporter.go similarity index 95% rename from pkg/integrations/process_exporter/process-exporter.go rename to internal/static/integrations/process_exporter/process-exporter.go index 60b719b10d..14f9d14db9 100644 --- a/pkg/integrations/process_exporter/process-exporter.go +++ b/internal/static/integrations/process_exporter/process-exporter.go @@ -9,7 +9,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) // Integration is the process_exporter integration. On non-Linux platforms, diff --git a/pkg/integrations/process_exporter/process-exporter_linux.go b/internal/static/integrations/process_exporter/process-exporter_linux.go similarity index 95% rename from pkg/integrations/process_exporter/process-exporter_linux.go rename to internal/static/integrations/process_exporter/process-exporter_linux.go index 131b6a5934..1194f7e11c 100644 --- a/pkg/integrations/process_exporter/process-exporter_linux.go +++ b/internal/static/integrations/process_exporter/process-exporter_linux.go @@ -7,8 +7,8 @@ import ( "net/http" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/integrations/config" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/pkg/integrations/redis_exporter/redis_exporter.go b/internal/static/integrations/redis_exporter/redis_exporter.go similarity index 97% rename from pkg/integrations/redis_exporter/redis_exporter.go rename to internal/static/integrations/redis_exporter/redis_exporter.go index a1baacfd45..3b34b20079 100644 --- a/pkg/integrations/redis_exporter/redis_exporter.go +++ b/internal/static/integrations/redis_exporter/redis_exporter.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/go-kit/log" "github.com/go-kit/log/level" diff --git a/pkg/integrations/redis_exporter/redis_exporter_test.go b/internal/static/integrations/redis_exporter/redis_exporter_test.go similarity index 99% rename from pkg/integrations/redis_exporter/redis_exporter_test.go rename to internal/static/integrations/redis_exporter/redis_exporter_test.go index 196f9bcfc2..6b10be315f 100644 --- a/pkg/integrations/redis_exporter/redis_exporter_test.go +++ b/internal/static/integrations/redis_exporter/redis_exporter_test.go @@ -8,7 +8,7 @@ import ( "net/http/httptest" "testing" - "github.com/grafana/agent/pkg/config" + "github.com/grafana/agent/internal/static/config" "gopkg.in/yaml.v2" "github.com/go-kit/log" diff --git a/pkg/integrations/redis_exporter/testdata/password_map_file.json b/internal/static/integrations/redis_exporter/testdata/password_map_file.json similarity index 100% rename from pkg/integrations/redis_exporter/testdata/password_map_file.json rename to internal/static/integrations/redis_exporter/testdata/password_map_file.json diff --git a/pkg/integrations/register.go b/internal/static/integrations/register.go similarity index 98% rename from pkg/integrations/register.go rename to internal/static/integrations/register.go index 2b39d33967..9a5c4734ee 100644 --- a/pkg/integrations/register.go +++ b/internal/static/integrations/register.go @@ -5,8 +5,8 @@ import ( "reflect" "strings" - "github.com/grafana/agent/pkg/integrations/config" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/internal/util" "gopkg.in/yaml.v2" ) diff --git a/pkg/integrations/register_test.go b/internal/static/integrations/register_test.go similarity index 100% rename from pkg/integrations/register_test.go rename to internal/static/integrations/register_test.go diff --git a/pkg/integrations/snmp_exporter/common/common.go b/internal/static/integrations/snmp_exporter/common/common.go similarity index 100% rename from pkg/integrations/snmp_exporter/common/common.go rename to internal/static/integrations/snmp_exporter/common/common.go diff --git a/pkg/integrations/snmp_exporter/common/snmp.yml b/internal/static/integrations/snmp_exporter/common/snmp.yml similarity index 100% rename from pkg/integrations/snmp_exporter/common/snmp.yml rename to internal/static/integrations/snmp_exporter/common/snmp.yml diff --git a/pkg/integrations/snmp_exporter/common/snmp.yml.gz b/internal/static/integrations/snmp_exporter/common/snmp.yml.gz similarity index 100% rename from pkg/integrations/snmp_exporter/common/snmp.yml.gz rename to internal/static/integrations/snmp_exporter/common/snmp.yml.gz diff --git a/pkg/integrations/snmp_exporter/snmp.go b/internal/static/integrations/snmp_exporter/snmp.go similarity index 100% rename from pkg/integrations/snmp_exporter/snmp.go rename to internal/static/integrations/snmp_exporter/snmp.go diff --git a/pkg/integrations/snmp_exporter/snmp_exporter.go b/internal/static/integrations/snmp_exporter/snmp_exporter.go similarity index 96% rename from pkg/integrations/snmp_exporter/snmp_exporter.go rename to internal/static/integrations/snmp_exporter/snmp_exporter.go index dce69dd878..c03ead4a47 100644 --- a/pkg/integrations/snmp_exporter/snmp_exporter.go +++ b/internal/static/integrations/snmp_exporter/snmp_exporter.go @@ -8,9 +8,9 @@ import ( "net/url" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/config" - snmp_common "github.com/grafana/agent/pkg/integrations/snmp_exporter/common" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/config" + snmp_common "github.com/grafana/agent/internal/static/integrations/snmp_exporter/common" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/snmp_exporter/collector" diff --git a/pkg/integrations/snmp_exporter/snmp_exporter_test.go b/internal/static/integrations/snmp_exporter/snmp_exporter_test.go similarity index 100% rename from pkg/integrations/snmp_exporter/snmp_exporter_test.go rename to internal/static/integrations/snmp_exporter/snmp_exporter_test.go diff --git a/pkg/integrations/snowflake_exporter/snowflake_exporter.go b/internal/static/integrations/snowflake_exporter/snowflake_exporter.go similarity index 90% rename from pkg/integrations/snowflake_exporter/snowflake_exporter.go rename to internal/static/integrations/snowflake_exporter/snowflake_exporter.go index 8084157e32..ef01a7cf38 100644 --- a/pkg/integrations/snowflake_exporter/snowflake_exporter.go +++ b/internal/static/integrations/snowflake_exporter/snowflake_exporter.go @@ -2,9 +2,9 @@ package snowflake_exporter import ( "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/grafana/snowflake-prometheus-exporter/collector" config_util "github.com/prometheus/common/config" ) diff --git a/pkg/integrations/snowflake_exporter/snowflake_exporter_test.go b/internal/static/integrations/snowflake_exporter/snowflake_exporter_test.go similarity index 100% rename from pkg/integrations/snowflake_exporter/snowflake_exporter_test.go rename to internal/static/integrations/snowflake_exporter/snowflake_exporter_test.go diff --git a/pkg/integrations/squid_exporter/squid_exporter.go b/internal/static/integrations/squid_exporter/squid_exporter.go similarity index 92% rename from pkg/integrations/squid_exporter/squid_exporter.go rename to internal/static/integrations/squid_exporter/squid_exporter.go index 1f6ba2d932..9ec368f70b 100644 --- a/pkg/integrations/squid_exporter/squid_exporter.go +++ b/internal/static/integrations/squid_exporter/squid_exporter.go @@ -8,11 +8,11 @@ import ( se "github.com/boynux/squid-exporter/collector" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" config_util "github.com/prometheus/common/config" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" ) var ( diff --git a/pkg/integrations/squid_exporter/squid_exporter_test.go b/internal/static/integrations/squid_exporter/squid_exporter_test.go similarity index 100% rename from pkg/integrations/squid_exporter/squid_exporter_test.go rename to internal/static/integrations/squid_exporter/squid_exporter_test.go diff --git a/pkg/integrations/statsd_exporter/metrics.go b/internal/static/integrations/statsd_exporter/metrics.go similarity index 100% rename from pkg/integrations/statsd_exporter/metrics.go rename to internal/static/integrations/statsd_exporter/metrics.go diff --git a/pkg/integrations/statsd_exporter/statsd_exporter.go b/internal/static/integrations/statsd_exporter/statsd_exporter.go similarity index 97% rename from pkg/integrations/statsd_exporter/statsd_exporter.go rename to internal/static/integrations/statsd_exporter/statsd_exporter.go index 03ef5a6cd0..6b0f7a8fbe 100644 --- a/pkg/integrations/statsd_exporter/statsd_exporter.go +++ b/internal/static/integrations/statsd_exporter/statsd_exporter.go @@ -12,11 +12,11 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/config" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/config" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/statsd_exporter/pkg/address" diff --git a/pkg/integrations/stub_integration.go b/internal/static/integrations/stub_integration.go similarity index 91% rename from pkg/integrations/stub_integration.go rename to internal/static/integrations/stub_integration.go index 80a688e117..2d118ff82c 100644 --- a/pkg/integrations/stub_integration.go +++ b/internal/static/integrations/stub_integration.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) // StubIntegration implements a no-op integration for use on platforms not supported by an integration diff --git a/pkg/integrations/v2/agent/agent.go b/internal/static/integrations/v2/agent/agent.go similarity index 88% rename from pkg/integrations/v2/agent/agent.go rename to internal/static/integrations/v2/agent/agent.go index e151998572..deeaa1d8ca 100644 --- a/pkg/integrations/v2/agent/agent.go +++ b/internal/static/integrations/v2/agent/agent.go @@ -5,9 +5,9 @@ package agent import ( "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/pkg/integrations/v2/apache_http/apache_http.go b/internal/static/integrations/v2/apache_http/apache_http.go similarity index 93% rename from pkg/integrations/v2/apache_http/apache_http.go rename to internal/static/integrations/v2/apache_http/apache_http.go index 51d8b10198..cdffaebab2 100644 --- a/pkg/integrations/v2/apache_http/apache_http.go +++ b/internal/static/integrations/v2/apache_http/apache_http.go @@ -8,9 +8,9 @@ import ( ae "github.com/Lusitaniae/apache_exporter/collector" "github.com/go-kit/log" "github.com/go-kit/log/level" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/pkg/integrations/v2/apache_http/apache_http_test.go b/internal/static/integrations/v2/apache_http/apache_http_test.go similarity index 86% rename from pkg/integrations/v2/apache_http/apache_http_test.go rename to internal/static/integrations/v2/apache_http/apache_http_test.go index 58cff84966..8480eb1b56 100644 --- a/pkg/integrations/v2/apache_http/apache_http_test.go +++ b/internal/static/integrations/v2/apache_http/apache_http_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" "github.com/stretchr/testify/require" ) diff --git a/pkg/integrations/v2/app_agent_receiver/app_agent_receiver.go b/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver.go similarity index 96% rename from pkg/integrations/v2/app_agent_receiver/app_agent_receiver.go rename to internal/static/integrations/v2/app_agent_receiver/app_agent_receiver.go index 6538213f30..f1bdd00adb 100644 --- a/pkg/integrations/v2/app_agent_receiver/app_agent_receiver.go +++ b/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" - "github.com/grafana/agent/pkg/traces/pushreceiver" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/traces/pushreceiver" "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/middleware" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/integrations/v2/app_agent_receiver/app_agent_receiver_test.go b/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go similarity index 92% rename from pkg/integrations/v2/app_agent_receiver/app_agent_receiver_test.go rename to internal/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go index 46cfba9370..f44db4c038 100644 --- a/pkg/integrations/v2/app_agent_receiver/app_agent_receiver_test.go +++ b/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/traces" - "github.com/grafana/agent/pkg/traces/traceutils" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/static/traces" + "github.com/grafana/agent/internal/static/traces/traceutils" + "github.com/grafana/agent/internal/util" "github.com/phayes/freeport" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" diff --git a/pkg/integrations/v2/app_agent_receiver/config.go b/internal/static/integrations/v2/app_agent_receiver/config.go similarity index 96% rename from pkg/integrations/v2/app_agent_receiver/config.go rename to internal/static/integrations/v2/app_agent_receiver/config.go index 7c5696dbd6..32d1b12389 100644 --- a/pkg/integrations/v2/app_agent_receiver/config.go +++ b/internal/static/integrations/v2/app_agent_receiver/config.go @@ -3,8 +3,8 @@ package app_agent_receiver import ( "time" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" ) const ( diff --git a/pkg/integrations/v2/app_agent_receiver/config_test.go b/internal/static/integrations/v2/app_agent_receiver/config_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/config_test.go rename to internal/static/integrations/v2/app_agent_receiver/config_test.go diff --git a/pkg/integrations/v2/app_agent_receiver/handler.go b/internal/static/integrations/v2/app_agent_receiver/handler.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/handler.go rename to internal/static/integrations/v2/app_agent_receiver/handler.go diff --git a/pkg/integrations/v2/app_agent_receiver/handler_test.go b/internal/static/integrations/v2/app_agent_receiver/handler_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/handler_test.go rename to internal/static/integrations/v2/app_agent_receiver/handler_test.go diff --git a/pkg/integrations/v2/app_agent_receiver/logs_exporter.go b/internal/static/integrations/v2/app_agent_receiver/logs_exporter.go similarity index 98% rename from pkg/integrations/v2/app_agent_receiver/logs_exporter.go rename to internal/static/integrations/v2/app_agent_receiver/logs_exporter.go index fdb664f165..31295a5060 100644 --- a/pkg/integrations/v2/app_agent_receiver/logs_exporter.go +++ b/internal/static/integrations/v2/app_agent_receiver/logs_exporter.go @@ -8,7 +8,7 @@ import ( kitlog "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/go-logfmt/logfmt" - "github.com/grafana/agent/pkg/logs" + "github.com/grafana/agent/internal/static/logs" "github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/pkg/logproto" prommodel "github.com/prometheus/common/model" diff --git a/pkg/integrations/v2/app_agent_receiver/logs_exporter_test.go b/internal/static/integrations/v2/app_agent_receiver/logs_exporter_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/logs_exporter_test.go rename to internal/static/integrations/v2/app_agent_receiver/logs_exporter_test.go diff --git a/pkg/integrations/v2/app_agent_receiver/payload.go b/internal/static/integrations/v2/app_agent_receiver/payload.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/payload.go rename to internal/static/integrations/v2/app_agent_receiver/payload.go diff --git a/pkg/integrations/v2/app_agent_receiver/payload_test.go b/internal/static/integrations/v2/app_agent_receiver/payload_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/payload_test.go rename to internal/static/integrations/v2/app_agent_receiver/payload_test.go diff --git a/pkg/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go b/internal/static/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go rename to internal/static/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go diff --git a/pkg/integrations/v2/app_agent_receiver/receiver_metrics_test.go b/internal/static/integrations/v2/app_agent_receiver/receiver_metrics_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/receiver_metrics_test.go rename to internal/static/integrations/v2/app_agent_receiver/receiver_metrics_test.go diff --git a/pkg/integrations/v2/app_agent_receiver/sourcemaps.go b/internal/static/integrations/v2/app_agent_receiver/sourcemaps.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/sourcemaps.go rename to internal/static/integrations/v2/app_agent_receiver/sourcemaps.go diff --git a/pkg/integrations/v2/app_agent_receiver/sourcemaps_test.go b/internal/static/integrations/v2/app_agent_receiver/sourcemaps_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/sourcemaps_test.go rename to internal/static/integrations/v2/app_agent_receiver/sourcemaps_test.go diff --git a/pkg/integrations/v2/app_agent_receiver/testdata/foo.js b/internal/static/integrations/v2/app_agent_receiver/testdata/foo.js similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/testdata/foo.js rename to internal/static/integrations/v2/app_agent_receiver/testdata/foo.js diff --git a/pkg/integrations/v2/app_agent_receiver/testdata/foo.js.map b/internal/static/integrations/v2/app_agent_receiver/testdata/foo.js.map similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/testdata/foo.js.map rename to internal/static/integrations/v2/app_agent_receiver/testdata/foo.js.map diff --git a/pkg/integrations/v2/app_agent_receiver/testdata/payload.json b/internal/static/integrations/v2/app_agent_receiver/testdata/payload.json similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/testdata/payload.json rename to internal/static/integrations/v2/app_agent_receiver/testdata/payload.json diff --git a/pkg/integrations/v2/app_agent_receiver/testdata/payload_2.json b/internal/static/integrations/v2/app_agent_receiver/testdata/payload_2.json similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/testdata/payload_2.json rename to internal/static/integrations/v2/app_agent_receiver/testdata/payload_2.json diff --git a/pkg/integrations/v2/app_agent_receiver/traces_exporter.go b/internal/static/integrations/v2/app_agent_receiver/traces_exporter.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/traces_exporter.go rename to internal/static/integrations/v2/app_agent_receiver/traces_exporter.go diff --git a/pkg/integrations/v2/app_agent_receiver/traces_test.go b/internal/static/integrations/v2/app_agent_receiver/traces_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/traces_test.go rename to internal/static/integrations/v2/app_agent_receiver/traces_test.go diff --git a/pkg/integrations/v2/app_agent_receiver/utils.go b/internal/static/integrations/v2/app_agent_receiver/utils.go similarity index 97% rename from pkg/integrations/v2/app_agent_receiver/utils.go rename to internal/static/integrations/v2/app_agent_receiver/utils.go index 9ea0d19d95..e716cb2043 100644 --- a/pkg/integrations/v2/app_agent_receiver/utils.go +++ b/internal/static/integrations/v2/app_agent_receiver/utils.go @@ -4,7 +4,7 @@ import ( "fmt" "sort" - "github.com/grafana/agent/pkg/util/wildcard" + "github.com/grafana/agent/internal/util/wildcard" om "github.com/wk8/go-ordered-map" ) diff --git a/pkg/integrations/v2/app_agent_receiver/utils_test.go b/internal/static/integrations/v2/app_agent_receiver/utils_test.go similarity index 100% rename from pkg/integrations/v2/app_agent_receiver/utils_test.go rename to internal/static/integrations/v2/app_agent_receiver/utils_test.go diff --git a/pkg/integrations/v2/autoscrape/appender.go b/internal/static/integrations/v2/autoscrape/appender.go similarity index 100% rename from pkg/integrations/v2/autoscrape/appender.go rename to internal/static/integrations/v2/autoscrape/appender.go diff --git a/pkg/integrations/v2/autoscrape/autoscrape.go b/internal/static/integrations/v2/autoscrape/autoscrape.go similarity index 98% rename from pkg/integrations/v2/autoscrape/autoscrape.go rename to internal/static/integrations/v2/autoscrape/autoscrape.go index 9931d5f0a8..8d1bd02ae0 100644 --- a/pkg/integrations/v2/autoscrape/autoscrape.go +++ b/internal/static/integrations/v2/autoscrape/autoscrape.go @@ -7,9 +7,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/server" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/server" "github.com/oklog/run" config_util "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/pkg/integrations/v2/autoscrape/autoscrape_test.go b/internal/static/integrations/v2/autoscrape/autoscrape_test.go similarity index 97% rename from pkg/integrations/v2/autoscrape/autoscrape_test.go rename to internal/static/integrations/v2/autoscrape/autoscrape_test.go index e05e783fe8..9aaa148ecd 100644 --- a/pkg/integrations/v2/autoscrape/autoscrape_test.go +++ b/internal/static/integrations/v2/autoscrape/autoscrape_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/model" prom_config "github.com/prometheus/prometheus/config" diff --git a/pkg/integrations/v2/blackbox_exporter/blackbox.go b/internal/static/integrations/v2/blackbox_exporter/blackbox.go similarity index 93% rename from pkg/integrations/v2/blackbox_exporter/blackbox.go rename to internal/static/integrations/v2/blackbox_exporter/blackbox.go index 11b4a5aff3..e06a20d968 100644 --- a/pkg/integrations/v2/blackbox_exporter/blackbox.go +++ b/internal/static/integrations/v2/blackbox_exporter/blackbox.go @@ -8,10 +8,10 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/integrations/blackbox_exporter" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" blackbox_config "github.com/prometheus/blackbox_exporter/config" "github.com/prometheus/blackbox_exporter/prober" "github.com/prometheus/common/model" diff --git a/pkg/integrations/v2/blackbox_exporter/blackbox_exporter.go b/internal/static/integrations/v2/blackbox_exporter/blackbox_exporter.go similarity index 90% rename from pkg/integrations/v2/blackbox_exporter/blackbox_exporter.go rename to internal/static/integrations/v2/blackbox_exporter/blackbox_exporter.go index 5c2791aaaa..1f4ffdc489 100644 --- a/pkg/integrations/v2/blackbox_exporter/blackbox_exporter.go +++ b/internal/static/integrations/v2/blackbox_exporter/blackbox_exporter.go @@ -2,10 +2,10 @@ package blackbox_exporter_v2 import ( "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/blackbox_exporter" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/internal/util" blackbox_config "github.com/prometheus/blackbox_exporter/config" "gopkg.in/yaml.v3" ) diff --git a/pkg/integrations/v2/blackbox_exporter/blackbox_test.go b/internal/static/integrations/v2/blackbox_exporter/blackbox_test.go similarity index 80% rename from pkg/integrations/v2/blackbox_exporter/blackbox_test.go rename to internal/static/integrations/v2/blackbox_exporter/blackbox_test.go index f7176eda9a..9b798f1ad3 100644 --- a/pkg/integrations/v2/blackbox_exporter/blackbox_test.go +++ b/internal/static/integrations/v2/blackbox_exporter/blackbox_test.go @@ -3,11 +3,11 @@ package blackbox_exporter_v2 import ( "testing" - "github.com/grafana/agent/pkg/integrations/blackbox_exporter" - "github.com/grafana/agent/pkg/integrations/v2" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - autoscrape "github.com/grafana/agent/pkg/integrations/v2/autoscrape" - "github.com/grafana/agent/pkg/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" + "github.com/grafana/agent/internal/static/integrations/v2" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + autoscrape "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/integrations/v2/common" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/stretchr/testify/require" diff --git a/pkg/integrations/v2/common/metrics.go b/internal/static/integrations/v2/common/metrics.go similarity index 93% rename from pkg/integrations/v2/common/metrics.go rename to internal/static/integrations/v2/common/metrics.go index 54ef40dbc2..1e83a8bb94 100644 --- a/pkg/integrations/v2/common/metrics.go +++ b/internal/static/integrations/v2/common/metrics.go @@ -1,7 +1,7 @@ package common import ( - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" "github.com/prometheus/prometheus/model/labels" ) diff --git a/pkg/integrations/v2/controller.go b/internal/static/integrations/v2/controller.go similarity index 99% rename from pkg/integrations/v2/controller.go rename to internal/static/integrations/v2/controller.go index b94ff16c4e..b01a666119 100644 --- a/pkg/integrations/v2/controller.go +++ b/internal/static/integrations/v2/controller.go @@ -14,7 +14,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" "github.com/prometheus/prometheus/discovery" http_sd "github.com/prometheus/prometheus/discovery/http" "go.uber.org/atomic" diff --git a/pkg/integrations/v2/controller_httpintegration_test.go b/internal/static/integrations/v2/controller_httpintegration_test.go similarity index 99% rename from pkg/integrations/v2/controller_httpintegration_test.go rename to internal/static/integrations/v2/controller_httpintegration_test.go index 4f56af7cc5..ee817a1c53 100644 --- a/pkg/integrations/v2/controller_httpintegration_test.go +++ b/internal/static/integrations/v2/controller_httpintegration_test.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" ) diff --git a/pkg/integrations/v2/controller_metricsintegration_test.go b/internal/static/integrations/v2/controller_metricsintegration_test.go similarity index 97% rename from pkg/integrations/v2/controller_metricsintegration_test.go rename to internal/static/integrations/v2/controller_metricsintegration_test.go index d6a4e0c13c..67222e61fe 100644 --- a/pkg/integrations/v2/controller_metricsintegration_test.go +++ b/internal/static/integrations/v2/controller_metricsintegration_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/model" prom_config "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/pkg/integrations/v2/controller_test.go b/internal/static/integrations/v2/controller_test.go similarity index 99% rename from pkg/integrations/v2/controller_test.go rename to internal/static/integrations/v2/controller_test.go index d8a11d4094..dcae71c56f 100644 --- a/pkg/integrations/v2/controller_test.go +++ b/internal/static/integrations/v2/controller_test.go @@ -7,7 +7,7 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" "go.uber.org/atomic" ) diff --git a/pkg/integrations/v2/controller_updateintegration_test.go b/internal/static/integrations/v2/controller_updateintegration_test.go similarity index 97% rename from pkg/integrations/v2/controller_updateintegration_test.go rename to internal/static/integrations/v2/controller_updateintegration_test.go index 79720a0129..4f0940ed6d 100644 --- a/pkg/integrations/v2/controller_updateintegration_test.go +++ b/internal/static/integrations/v2/controller_updateintegration_test.go @@ -6,7 +6,7 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" "go.uber.org/atomic" ) diff --git a/pkg/integrations/v2/eventhandler/eventhandler.go b/internal/static/integrations/v2/eventhandler/eventhandler.go similarity index 99% rename from pkg/integrations/v2/eventhandler/eventhandler.go rename to internal/static/integrations/v2/eventhandler/eventhandler.go index cd729179ea..efb94e206d 100644 --- a/pkg/integrations/v2/eventhandler/eventhandler.go +++ b/internal/static/integrations/v2/eventhandler/eventhandler.go @@ -22,8 +22,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/logs" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/logs" "github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" diff --git a/pkg/integrations/v2/eventhandler/eventhandler_test.go b/internal/static/integrations/v2/eventhandler/eventhandler_test.go similarity index 100% rename from pkg/integrations/v2/eventhandler/eventhandler_test.go rename to internal/static/integrations/v2/eventhandler/eventhandler_test.go diff --git a/pkg/integrations/v2/eventhandler/integration.go b/internal/static/integrations/v2/eventhandler/integration.go similarity index 98% rename from pkg/integrations/v2/eventhandler/integration.go rename to internal/static/integrations/v2/eventhandler/integration.go index eb0208d0de..caba0084e2 100644 --- a/pkg/integrations/v2/eventhandler/integration.go +++ b/internal/static/integrations/v2/eventhandler/integration.go @@ -2,7 +2,7 @@ package eventhandler import ( "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2" "github.com/prometheus/prometheus/model/labels" ) diff --git a/pkg/integrations/v2/eventhandler/testdata/eventhandler.cache b/internal/static/integrations/v2/eventhandler/testdata/eventhandler.cache similarity index 100% rename from pkg/integrations/v2/eventhandler/testdata/eventhandler.cache rename to internal/static/integrations/v2/eventhandler/testdata/eventhandler.cache diff --git a/pkg/integrations/v2/integrations.go b/internal/static/integrations/v2/integrations.go similarity index 96% rename from pkg/integrations/v2/integrations.go rename to internal/static/integrations/v2/integrations.go index e18f7cbac3..1896280e3f 100644 --- a/pkg/integrations/v2/integrations.go +++ b/internal/static/integrations/v2/integrations.go @@ -25,11 +25,11 @@ import ( "net/url" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/metrics" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/traces" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/static/traces" "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/targetgroup" ) diff --git a/pkg/integrations/v2/metricsutils/metricshandler_integration.go b/internal/static/integrations/v2/metricsutils/metricshandler_integration.go similarity index 95% rename from pkg/integrations/v2/metricsutils/metricshandler_integration.go rename to internal/static/integrations/v2/metricsutils/metricshandler_integration.go index 801dadcb5b..1978619091 100644 --- a/pkg/integrations/v2/metricsutils/metricshandler_integration.go +++ b/internal/static/integrations/v2/metricsutils/metricshandler_integration.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" - "github.com/grafana/agent/pkg/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/integrations/v2/common" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/pkg/integrations/v2/metricsutils/metricshandler_integration_test.go b/internal/static/integrations/v2/metricsutils/metricshandler_integration_test.go similarity index 95% rename from pkg/integrations/v2/metricsutils/metricshandler_integration_test.go rename to internal/static/integrations/v2/metricsutils/metricshandler_integration_test.go index 6523510ac8..643b2ff25b 100644 --- a/pkg/integrations/v2/metricsutils/metricshandler_integration_test.go +++ b/internal/static/integrations/v2/metricsutils/metricshandler_integration_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/model/labels" diff --git a/pkg/integrations/v2/metricsutils/versionshim.go b/internal/static/integrations/v2/metricsutils/versionshim.go similarity index 94% rename from pkg/integrations/v2/metricsutils/versionshim.go rename to internal/static/integrations/v2/metricsutils/versionshim.go index 5a4db10efd..75908ec9ce 100644 --- a/pkg/integrations/v2/metricsutils/versionshim.go +++ b/internal/static/integrations/v2/metricsutils/versionshim.go @@ -9,10 +9,10 @@ import ( "github.com/go-kit/log" "github.com/prometheus/common/model" - v1 "github.com/grafana/agent/pkg/integrations" - v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" - "github.com/grafana/agent/pkg/util" + v1 "github.com/grafana/agent/internal/static/integrations" + v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/internal/util" ) // NewNamedShim returns a v2.UpgradeFunc which will upgrade a v1.Config to a diff --git a/pkg/integrations/v2/register.go b/internal/static/integrations/v2/register.go similarity index 98% rename from pkg/integrations/v2/register.go rename to internal/static/integrations/v2/register.go index 52b26b7794..30e8064174 100644 --- a/pkg/integrations/v2/register.go +++ b/internal/static/integrations/v2/register.go @@ -8,9 +8,9 @@ import ( "gopkg.in/yaml.v2" - v1 "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/v2/common" - "github.com/grafana/agent/pkg/util" + v1 "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/internal/util" ) var ( diff --git a/pkg/integrations/v2/register_test.go b/internal/static/integrations/v2/register_test.go similarity index 98% rename from pkg/integrations/v2/register_test.go rename to internal/static/integrations/v2/register_test.go index df99cf50b4..5515910229 100644 --- a/pkg/integrations/v2/register_test.go +++ b/internal/static/integrations/v2/register_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/go-kit/log" - v1 "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/v2/common" + v1 "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/v2/common" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) diff --git a/pkg/integrations/v2/snmp_exporter/snmp.go b/internal/static/integrations/v2/snmp_exporter/snmp.go similarity index 92% rename from pkg/integrations/v2/snmp_exporter/snmp.go rename to internal/static/integrations/v2/snmp_exporter/snmp.go index 2252e84e2f..dc78dad5ed 100644 --- a/pkg/integrations/v2/snmp_exporter/snmp.go +++ b/internal/static/integrations/v2/snmp_exporter/snmp.go @@ -7,10 +7,10 @@ import ( "path" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/integrations/snmp_exporter" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations/snmp_exporter" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/pkg/integrations/v2/snmp_exporter/snmp_exporter.go b/internal/static/integrations/v2/snmp_exporter/snmp_exporter.go similarity index 91% rename from pkg/integrations/v2/snmp_exporter/snmp_exporter.go rename to internal/static/integrations/v2/snmp_exporter/snmp_exporter.go index 4d5109ae4c..bea9d944de 100644 --- a/pkg/integrations/v2/snmp_exporter/snmp_exporter.go +++ b/internal/static/integrations/v2/snmp_exporter/snmp_exporter.go @@ -3,9 +3,9 @@ package snmp_exporter_v2 import ( "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/snmp_exporter" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/snmp_exporter" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" snmp_config "github.com/prometheus/snmp_exporter/config" ) diff --git a/pkg/integrations/v2/snmp_exporter/snmp_exporter_test.go b/internal/static/integrations/v2/snmp_exporter/snmp_exporter_test.go similarity index 100% rename from pkg/integrations/v2/snmp_exporter/snmp_exporter_test.go rename to internal/static/integrations/v2/snmp_exporter/snmp_exporter_test.go diff --git a/pkg/integrations/v2/subsystem.go b/internal/static/integrations/v2/subsystem.go similarity index 98% rename from pkg/integrations/v2/subsystem.go rename to internal/static/integrations/v2/subsystem.go index 5974211280..ca128a1926 100644 --- a/pkg/integrations/v2/subsystem.go +++ b/internal/static/integrations/v2/subsystem.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/integrations/v2/autoscrape" - "github.com/grafana/agent/pkg/metrics" + "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/internal/static/metrics" "github.com/prometheus/common/model" http_sd "github.com/prometheus/prometheus/discovery/http" ) diff --git a/pkg/integrations/v2/subsystem_test.go b/internal/static/integrations/v2/subsystem_test.go similarity index 91% rename from pkg/integrations/v2/subsystem_test.go rename to internal/static/integrations/v2/subsystem_test.go index 71427b15e1..ddc223b736 100644 --- a/pkg/integrations/v2/subsystem_test.go +++ b/internal/static/integrations/v2/subsystem_test.go @@ -3,8 +3,8 @@ package integrations import ( "testing" - v1 "github.com/grafana/agent/pkg/integrations" - "github.com/grafana/agent/pkg/integrations/v2/common" + v1 "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/internal/static/integrations/v2/common" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) diff --git a/pkg/integrations/v2/targetgroup.go b/internal/static/integrations/v2/targetgroup.go similarity index 100% rename from pkg/integrations/v2/targetgroup.go rename to internal/static/integrations/v2/targetgroup.go diff --git a/pkg/integrations/v2/utils.go b/internal/static/integrations/v2/utils.go similarity index 95% rename from pkg/integrations/v2/utils.go rename to internal/static/integrations/v2/utils.go index d3e1cc732a..138cf18b0c 100644 --- a/pkg/integrations/v2/utils.go +++ b/internal/static/integrations/v2/utils.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" ) // FuncIntegration is a function that implements Integration. diff --git a/pkg/integrations/v2/vmware_exporter/vmware_exporter.go b/internal/static/integrations/v2/vmware_exporter/vmware_exporter.go similarity index 93% rename from pkg/integrations/v2/vmware_exporter/vmware_exporter.go rename to internal/static/integrations/v2/vmware_exporter/vmware_exporter.go index 2306276c54..257ed80812 100644 --- a/pkg/integrations/v2/vmware_exporter/vmware_exporter.go +++ b/internal/static/integrations/v2/vmware_exporter/vmware_exporter.go @@ -6,9 +6,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/common" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" "github.com/grafana/vmware_exporter/vsphere" config_util "github.com/prometheus/common/config" ) diff --git a/pkg/integrations/v2/workers.go b/internal/static/integrations/v2/workers.go similarity index 100% rename from pkg/integrations/v2/workers.go rename to internal/static/integrations/v2/workers.go diff --git a/pkg/integrations/vmware_exporter/vmware_exporter.go b/internal/static/integrations/vmware_exporter/vmware_exporter.go similarity index 97% rename from pkg/integrations/vmware_exporter/vmware_exporter.go rename to internal/static/integrations/vmware_exporter/vmware_exporter.go index 6086b97c61..b84e209d97 100644 --- a/pkg/integrations/vmware_exporter/vmware_exporter.go +++ b/internal/static/integrations/vmware_exporter/vmware_exporter.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" + "github.com/grafana/agent/internal/static/integrations" "github.com/grafana/vmware_exporter/vsphere" config_util "github.com/prometheus/common/config" ) diff --git a/pkg/integrations/windows_exporter/config.go b/internal/static/integrations/windows_exporter/config.go similarity index 95% rename from pkg/integrations/windows_exporter/config.go rename to internal/static/integrations/windows_exporter/config.go index a8bdba7317..f3c3cadafe 100644 --- a/pkg/integrations/windows_exporter/config.go +++ b/internal/static/integrations/windows_exporter/config.go @@ -2,9 +2,9 @@ package windows_exporter //nolint:golint import ( "github.com/go-kit/log" - "github.com/grafana/agent/pkg/integrations" - integrations_v2 "github.com/grafana/agent/pkg/integrations/v2" - "github.com/grafana/agent/pkg/integrations/v2/metricsutils" + "github.com/grafana/agent/internal/static/integrations" + integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" ) func init() { diff --git a/pkg/integrations/windows_exporter/config_windows.go b/internal/static/integrations/windows_exporter/config_windows.go similarity index 100% rename from pkg/integrations/windows_exporter/config_windows.go rename to internal/static/integrations/windows_exporter/config_windows.go diff --git a/pkg/integrations/windows_exporter/windows_exporter.go b/internal/static/integrations/windows_exporter/windows_exporter.go similarity index 94% rename from pkg/integrations/windows_exporter/windows_exporter.go rename to internal/static/integrations/windows_exporter/windows_exporter.go index c0d2e13214..55d02ac496 100644 --- a/pkg/integrations/windows_exporter/windows_exporter.go +++ b/internal/static/integrations/windows_exporter/windows_exporter.go @@ -8,7 +8,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations/config" + "github.com/grafana/agent/internal/static/integrations/config" ) // Integration is the windows_exporter integration. On non-Windows platforms, diff --git a/pkg/integrations/windows_exporter/windows_exporter_windows.go b/internal/static/integrations/windows_exporter/windows_exporter_windows.go similarity index 96% rename from pkg/integrations/windows_exporter/windows_exporter_windows.go rename to internal/static/integrations/windows_exporter/windows_exporter_windows.go index 94e05f1121..83faf6c27d 100644 --- a/pkg/integrations/windows_exporter/windows_exporter_windows.go +++ b/internal/static/integrations/windows_exporter/windows_exporter_windows.go @@ -1,13 +1,14 @@ package windows_exporter //nolint:golint import ( - "github.com/go-kit/log" - "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/integrations" - "github.com/prometheus-community/windows_exporter/pkg/collector" "sort" "strings" "time" + + "github.com/go-kit/log" + "github.com/go-kit/log/level" + "github.com/grafana/agent/internal/static/integrations" + "github.com/prometheus-community/windows_exporter/pkg/collector" ) // New creates a new windows_exporter integration. diff --git a/pkg/logs/config.go b/internal/static/logs/config.go similarity index 100% rename from pkg/logs/config.go rename to internal/static/logs/config.go diff --git a/pkg/logs/config_test.go b/internal/static/logs/config_test.go similarity index 100% rename from pkg/logs/config_test.go rename to internal/static/logs/config_test.go diff --git a/pkg/logs/global.go b/internal/static/logs/global.go similarity index 100% rename from pkg/logs/global.go rename to internal/static/logs/global.go diff --git a/pkg/logs/http.go b/internal/static/logs/http.go similarity index 97% rename from pkg/logs/http.go rename to internal/static/logs/http.go index 6cd25e0e2b..b3e7a00d88 100644 --- a/pkg/logs/http.go +++ b/internal/static/logs/http.go @@ -6,7 +6,7 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/metrics/cluster/configapi" + "github.com/grafana/agent/internal/static/metrics/cluster/configapi" "github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/prometheus/common/model" ) diff --git a/pkg/logs/http_test.go b/internal/static/logs/http_test.go similarity index 99% rename from pkg/logs/http_test.go rename to internal/static/logs/http_test.go index 7e3b5433b0..e37110f205 100644 --- a/pkg/logs/http_test.go +++ b/internal/static/logs/http_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" diff --git a/pkg/logs/logs.go b/internal/static/logs/logs.go similarity index 99% rename from pkg/logs/logs.go rename to internal/static/logs/logs.go index 8e09e002ac..2d6c478fe5 100644 --- a/pkg/logs/logs.go +++ b/internal/static/logs/logs.go @@ -13,7 +13,7 @@ import ( "github.com/go-kit/log/level" "github.com/grafana/agent/internal/agentseed" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/clients/pkg/promtail" "github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/clients/pkg/promtail/client" diff --git a/pkg/logs/logs_test.go b/internal/static/logs/logs_test.go similarity index 99% rename from pkg/logs/logs_test.go rename to internal/static/logs/logs_test.go index ca25a50905..255c99b55f 100644 --- a/pkg/logs/logs_test.go +++ b/internal/static/logs/logs_test.go @@ -15,7 +15,7 @@ import ( "github.com/grafana/loki/pkg/loghttp/push" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" diff --git a/pkg/metrics/agent.go b/internal/static/metrics/agent.go similarity index 97% rename from pkg/metrics/agent.go rename to internal/static/metrics/agent.go index 0e57e1e9b1..0c2c745300 100644 --- a/pkg/metrics/agent.go +++ b/internal/static/metrics/agent.go @@ -16,10 +16,10 @@ import ( "go.uber.org/atomic" "google.golang.org/grpc" - "github.com/grafana/agent/pkg/metrics/cluster" - "github.com/grafana/agent/pkg/metrics/cluster/client" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/cluster" + "github.com/grafana/agent/internal/static/metrics/cluster/client" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/prometheus/prometheus/discovery" ) diff --git a/pkg/metrics/agent_test.go b/internal/static/metrics/agent_test.go similarity index 98% rename from pkg/metrics/agent_test.go rename to internal/static/metrics/agent_test.go index 05f547c553..bd311a07cd 100644 --- a/pkg/metrics/agent_test.go +++ b/internal/static/metrics/agent_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/storage" diff --git a/pkg/metrics/cleaner.go b/internal/static/metrics/cleaner.go similarity index 98% rename from pkg/metrics/cleaner.go rename to internal/static/metrics/cleaner.go index 1fae9a58e9..0bf577a5b6 100644 --- a/pkg/metrics/cleaner.go +++ b/internal/static/metrics/cleaner.go @@ -8,8 +8,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/metrics/wal" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/wal" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" promwal "github.com/prometheus/prometheus/tsdb/wlog" diff --git a/pkg/metrics/cleaner_test.go b/internal/static/metrics/cleaner_test.go similarity index 98% rename from pkg/metrics/cleaner_test.go rename to internal/static/metrics/cleaner_test.go index d1ac12d25a..f8aeac7fa7 100644 --- a/pkg/metrics/cleaner_test.go +++ b/internal/static/metrics/cleaner_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance" "github.com/stretchr/testify/require" ) diff --git a/pkg/metrics/cluster/client/client.go b/internal/static/metrics/cluster/client/client.go similarity index 96% rename from pkg/metrics/cluster/client/client.go rename to internal/static/metrics/cluster/client/client.go index b30de93158..1b90feb99f 100644 --- a/pkg/metrics/cluster/client/client.go +++ b/internal/static/metrics/cluster/client/client.go @@ -5,8 +5,8 @@ import ( "io" "reflect" - "github.com/grafana/agent/pkg/agentproto" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/agentproto" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/grpcclient" "github.com/grafana/dskit/middleware" otgrpc "github.com/opentracing-contrib/go-grpc" diff --git a/pkg/metrics/cluster/cluster.go b/internal/static/metrics/cluster/cluster.go similarity index 95% rename from pkg/metrics/cluster/cluster.go rename to internal/static/metrics/cluster/cluster.go index 6b1b06a7c8..9ab498f7e4 100644 --- a/pkg/metrics/cluster/cluster.go +++ b/internal/static/metrics/cluster/cluster.go @@ -9,10 +9,10 @@ import ( "github.com/go-kit/log/level" "github.com/golang/protobuf/ptypes/empty" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/agentproto" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/metrics/instance/configstore" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/agentproto" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance/configstore" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "google.golang.org/grpc" ) diff --git a/pkg/metrics/cluster/config.go b/internal/static/metrics/cluster/config.go similarity index 95% rename from pkg/metrics/cluster/config.go rename to internal/static/metrics/cluster/config.go index 909c5565b0..f51a529c04 100644 --- a/pkg/metrics/cluster/config.go +++ b/internal/static/metrics/cluster/config.go @@ -6,9 +6,9 @@ import ( "strings" "time" - "github.com/grafana/agent/pkg/metrics/cluster/client" - flagutil "github.com/grafana/agent/pkg/util" - util_log "github.com/grafana/agent/pkg/util/log" + "github.com/grafana/agent/internal/static/metrics/cluster/client" + flagutil "github.com/grafana/agent/internal/util" + util_log "github.com/grafana/agent/internal/util/log" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/ring" ) diff --git a/pkg/metrics/cluster/config_test.go b/internal/static/metrics/cluster/config_test.go similarity index 100% rename from pkg/metrics/cluster/config_test.go rename to internal/static/metrics/cluster/config_test.go diff --git a/pkg/metrics/cluster/config_watcher.go b/internal/static/metrics/cluster/config_watcher.go similarity index 98% rename from pkg/metrics/cluster/config_watcher.go rename to internal/static/metrics/cluster/config_watcher.go index 10c6928649..2544975c8d 100644 --- a/pkg/metrics/cluster/config_watcher.go +++ b/internal/static/metrics/cluster/config_watcher.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/metrics/instance/configstore" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance/configstore" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" ) diff --git a/pkg/metrics/cluster/config_watcher_test.go b/internal/static/metrics/cluster/config_watcher_test.go similarity index 97% rename from pkg/metrics/cluster/config_watcher_test.go rename to internal/static/metrics/cluster/config_watcher_test.go index e365cb2f5f..e91bffe5d8 100644 --- a/pkg/metrics/cluster/config_watcher_test.go +++ b/internal/static/metrics/cluster/config_watcher_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/metrics/instance/configstore" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance/configstore" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/pkg/metrics/cluster/configapi/types.go b/internal/static/metrics/cluster/configapi/types.go similarity index 100% rename from pkg/metrics/cluster/configapi/types.go rename to internal/static/metrics/cluster/configapi/types.go diff --git a/pkg/metrics/cluster/node.go b/internal/static/metrics/cluster/node.go similarity index 98% rename from pkg/metrics/cluster/node.go rename to internal/static/metrics/cluster/node.go index c1bd5e3449..fab9bc6b94 100644 --- a/pkg/metrics/cluster/node.go +++ b/internal/static/metrics/cluster/node.go @@ -11,9 +11,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gorilla/mux" - pb "github.com/grafana/agent/pkg/agentproto" - "github.com/grafana/agent/pkg/metrics/cluster/client" - "github.com/grafana/agent/pkg/util" + pb "github.com/grafana/agent/internal/static/agentproto" + "github.com/grafana/agent/internal/static/metrics/cluster/client" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/ring" diff --git a/pkg/metrics/cluster/node_test.go b/internal/static/metrics/cluster/node_test.go similarity index 98% rename from pkg/metrics/cluster/node_test.go rename to internal/static/metrics/cluster/node_test.go index 279c8d47fd..15df4ab7fb 100644 --- a/pkg/metrics/cluster/node_test.go +++ b/internal/static/metrics/cluster/node_test.go @@ -12,8 +12,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/golang/protobuf/ptypes/empty" - "github.com/grafana/agent/pkg/agentproto" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/agentproto" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/metrics/cluster/validation.go b/internal/static/metrics/cluster/validation.go similarity index 98% rename from pkg/metrics/cluster/validation.go rename to internal/static/metrics/cluster/validation.go index c2c872d974..6821a8beeb 100644 --- a/pkg/metrics/cluster/validation.go +++ b/internal/static/metrics/cluster/validation.go @@ -3,7 +3,7 @@ package cluster import ( "fmt" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/loki/clients/pkg/promtail/discovery/consulagent" "github.com/prometheus/common/config" "github.com/prometheus/prometheus/discovery" diff --git a/pkg/metrics/cluster/validation_test.go b/internal/static/metrics/cluster/validation_test.go similarity index 96% rename from pkg/metrics/cluster/validation_test.go rename to internal/static/metrics/cluster/validation_test.go index 5ef31cc822..180a0bfabb 100644 --- a/pkg/metrics/cluster/validation_test.go +++ b/internal/static/metrics/cluster/validation_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" ) diff --git a/pkg/metrics/http.go b/internal/static/metrics/http.go similarity index 98% rename from pkg/metrics/http.go rename to internal/static/metrics/http.go index 01d185f968..51e5aa64e6 100644 --- a/pkg/metrics/http.go +++ b/internal/static/metrics/http.go @@ -9,7 +9,7 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/metrics/cluster/configapi" + "github.com/grafana/agent/internal/static/metrics/cluster/configapi" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/scrape" diff --git a/pkg/metrics/http_test.go b/internal/static/metrics/http_test.go similarity index 97% rename from pkg/metrics/http_test.go rename to internal/static/metrics/http_test.go index 2beed32a33..7f557a5a40 100644 --- a/pkg/metrics/http_test.go +++ b/internal/static/metrics/http_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/pkg/metrics/instance/configstore/api.go b/internal/static/metrics/instance/configstore/api.go similarity index 98% rename from pkg/metrics/instance/configstore/api.go rename to internal/static/metrics/instance/configstore/api.go index 06d338ea91..552b6ba404 100644 --- a/pkg/metrics/instance/configstore/api.go +++ b/internal/static/metrics/instance/configstore/api.go @@ -12,8 +12,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/metrics/cluster/configapi" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/cluster/configapi" + "github.com/grafana/agent/internal/static/metrics/instance" "github.com/prometheus/client_golang/prometheus" ) diff --git a/pkg/metrics/instance/configstore/api_test.go b/internal/static/metrics/instance/configstore/api_test.go similarity index 98% rename from pkg/metrics/instance/configstore/api_test.go rename to internal/static/metrics/instance/configstore/api_test.go index 84c0198dee..71bd558810 100644 --- a/pkg/metrics/instance/configstore/api_test.go +++ b/internal/static/metrics/instance/configstore/api_test.go @@ -14,9 +14,9 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/client" - "github.com/grafana/agent/pkg/metrics/cluster/configapi" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/client" + "github.com/grafana/agent/internal/static/metrics/cluster/configapi" + "github.com/grafana/agent/internal/static/metrics/instance" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/pkg/metrics/instance/configstore/codec.go b/internal/static/metrics/instance/configstore/codec.go similarity index 100% rename from pkg/metrics/instance/configstore/codec.go rename to internal/static/metrics/instance/configstore/codec.go diff --git a/pkg/metrics/instance/configstore/codec_test.go b/internal/static/metrics/instance/configstore/codec_test.go similarity index 100% rename from pkg/metrics/instance/configstore/codec_test.go rename to internal/static/metrics/instance/configstore/codec_test.go diff --git a/pkg/metrics/instance/configstore/errors.go b/internal/static/metrics/instance/configstore/errors.go similarity index 100% rename from pkg/metrics/instance/configstore/errors.go rename to internal/static/metrics/instance/configstore/errors.go diff --git a/pkg/metrics/instance/configstore/mock.go b/internal/static/metrics/instance/configstore/mock.go similarity index 96% rename from pkg/metrics/instance/configstore/mock.go rename to internal/static/metrics/instance/configstore/mock.go index d772cb3e54..5ff303669c 100644 --- a/pkg/metrics/instance/configstore/mock.go +++ b/internal/static/metrics/instance/configstore/mock.go @@ -3,7 +3,7 @@ package configstore import ( "context" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance" ) // Mock is a Mock Store. Useful primarily for testing. diff --git a/pkg/metrics/instance/configstore/remote.go b/internal/static/metrics/instance/configstore/remote.go similarity index 99% rename from pkg/metrics/instance/configstore/remote.go rename to internal/static/metrics/instance/configstore/remote.go index 51d9e9f002..a97df01e25 100644 --- a/pkg/metrics/instance/configstore/remote.go +++ b/internal/static/metrics/instance/configstore/remote.go @@ -16,8 +16,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/kv" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" diff --git a/pkg/metrics/instance/configstore/remote_test.go b/internal/static/metrics/instance/configstore/remote_test.go similarity index 98% rename from pkg/metrics/instance/configstore/remote_test.go rename to internal/static/metrics/instance/configstore/remote_test.go index 5ab1b8c62e..682438dd27 100644 --- a/pkg/metrics/instance/configstore/remote_test.go +++ b/internal/static/metrics/instance/configstore/remote_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/kv" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" diff --git a/pkg/metrics/instance/configstore/store.go b/internal/static/metrics/instance/configstore/store.go similarity index 96% rename from pkg/metrics/instance/configstore/store.go rename to internal/static/metrics/instance/configstore/store.go index fc073bfc52..799bafc882 100644 --- a/pkg/metrics/instance/configstore/store.go +++ b/internal/static/metrics/instance/configstore/store.go @@ -5,7 +5,7 @@ package configstore import ( "context" - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance" ) // Store is some interface to retrieving instance configurations. diff --git a/pkg/metrics/instance/configstore/unique.go b/internal/static/metrics/instance/configstore/unique.go similarity index 93% rename from pkg/metrics/instance/configstore/unique.go rename to internal/static/metrics/instance/configstore/unique.go index ca36da2ccd..203b77ba45 100644 --- a/pkg/metrics/instance/configstore/unique.go +++ b/internal/static/metrics/instance/configstore/unique.go @@ -1,7 +1,7 @@ package configstore import ( - "github.com/grafana/agent/pkg/metrics/instance" + "github.com/grafana/agent/internal/static/metrics/instance" ) // checkUnique validates that cfg is unique from all, ensuring that no two diff --git a/pkg/metrics/instance/errors.go b/internal/static/metrics/instance/errors.go similarity index 100% rename from pkg/metrics/instance/errors.go rename to internal/static/metrics/instance/errors.go diff --git a/pkg/metrics/instance/global.go b/internal/static/metrics/instance/global.go similarity index 100% rename from pkg/metrics/instance/global.go rename to internal/static/metrics/instance/global.go diff --git a/pkg/metrics/instance/group_manager.go b/internal/static/metrics/instance/group_manager.go similarity index 100% rename from pkg/metrics/instance/group_manager.go rename to internal/static/metrics/instance/group_manager.go diff --git a/pkg/metrics/instance/group_manager_test.go b/internal/static/metrics/instance/group_manager_test.go similarity index 100% rename from pkg/metrics/instance/group_manager_test.go rename to internal/static/metrics/instance/group_manager_test.go diff --git a/pkg/metrics/instance/host_filter.go b/internal/static/metrics/instance/host_filter.go similarity index 100% rename from pkg/metrics/instance/host_filter.go rename to internal/static/metrics/instance/host_filter.go diff --git a/pkg/metrics/instance/host_filter_test.go b/internal/static/metrics/instance/host_filter_test.go similarity index 99% rename from pkg/metrics/instance/host_filter_test.go rename to internal/static/metrics/instance/host_filter_test.go index 8a24373594..8eca3a3f51 100644 --- a/pkg/metrics/instance/host_filter_test.go +++ b/internal/static/metrics/instance/host_filter_test.go @@ -3,7 +3,7 @@ package instance import ( "testing" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery/targetgroup" diff --git a/pkg/metrics/instance/instance.go b/internal/static/metrics/instance/instance.go similarity index 99% rename from pkg/metrics/instance/instance.go rename to internal/static/metrics/instance/instance.go index c81c8e6206..1ff90d741c 100644 --- a/pkg/metrics/instance/instance.go +++ b/internal/static/metrics/instance/instance.go @@ -19,9 +19,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/agent/internal/agentseed" + "github.com/grafana/agent/internal/static/metrics/wal" "github.com/grafana/agent/internal/useragent" - "github.com/grafana/agent/pkg/metrics/wal" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/oklog/run" "github.com/prometheus/client_golang/prometheus" config_util "github.com/prometheus/common/config" diff --git a/pkg/metrics/instance/instance_integration_test.go b/internal/static/metrics/instance/instance_integration_test.go similarity index 99% rename from pkg/metrics/instance/instance_integration_test.go rename to internal/static/metrics/instance/instance_integration_test.go index 3ffa708926..71fc2ed8b5 100644 --- a/pkg/metrics/instance/instance_integration_test.go +++ b/internal/static/metrics/instance/instance_integration_test.go @@ -13,7 +13,7 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/backoff" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/pkg/metrics/instance/instance_test.go b/internal/static/metrics/instance/instance_test.go similarity index 99% rename from pkg/metrics/instance/instance_test.go rename to internal/static/metrics/instance/instance_test.go index e82117e797..48d734f673 100644 --- a/pkg/metrics/instance/instance_test.go +++ b/internal/static/metrics/instance/instance_test.go @@ -12,7 +12,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/model" diff --git a/pkg/metrics/instance/manager.go b/internal/static/metrics/instance/manager.go similarity index 100% rename from pkg/metrics/instance/manager.go rename to internal/static/metrics/instance/manager.go diff --git a/pkg/metrics/instance/manager_test.go b/internal/static/metrics/instance/manager_test.go similarity index 100% rename from pkg/metrics/instance/manager_test.go rename to internal/static/metrics/instance/manager_test.go diff --git a/pkg/metrics/instance/marshal.go b/internal/static/metrics/instance/marshal.go similarity index 100% rename from pkg/metrics/instance/marshal.go rename to internal/static/metrics/instance/marshal.go diff --git a/pkg/metrics/instance/marshal_test.go b/internal/static/metrics/instance/marshal_test.go similarity index 100% rename from pkg/metrics/instance/marshal_test.go rename to internal/static/metrics/instance/marshal_test.go diff --git a/pkg/metrics/instance/modal_manager.go b/internal/static/metrics/instance/modal_manager.go similarity index 100% rename from pkg/metrics/instance/modal_manager.go rename to internal/static/metrics/instance/modal_manager.go diff --git a/pkg/metrics/instance/noop.go b/internal/static/metrics/instance/noop.go similarity index 100% rename from pkg/metrics/instance/noop.go rename to internal/static/metrics/instance/noop.go diff --git a/pkg/metrics/wal/series.go b/internal/static/metrics/wal/series.go similarity index 100% rename from pkg/metrics/wal/series.go rename to internal/static/metrics/wal/series.go diff --git a/pkg/metrics/wal/util.go b/internal/static/metrics/wal/util.go similarity index 100% rename from pkg/metrics/wal/util.go rename to internal/static/metrics/wal/util.go diff --git a/pkg/metrics/wal/wal.go b/internal/static/metrics/wal/wal.go similarity index 100% rename from pkg/metrics/wal/wal.go rename to internal/static/metrics/wal/wal.go diff --git a/pkg/metrics/wal/wal_test.go b/internal/static/metrics/wal/wal_test.go similarity index 99% rename from pkg/metrics/wal/wal_test.go rename to internal/static/metrics/wal/wal_test.go index bf929edb51..14bc252ff0 100644 --- a/pkg/metrics/wal/wal_test.go +++ b/internal/static/metrics/wal/wal_test.go @@ -10,7 +10,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/value" diff --git a/pkg/operator/apis/monitoring/doc.go b/internal/static/operator/apis/monitoring/doc.go similarity index 100% rename from pkg/operator/apis/monitoring/doc.go rename to internal/static/operator/apis/monitoring/doc.go diff --git a/pkg/operator/apis/monitoring/v1alpha1/deployment.go b/internal/static/operator/apis/monitoring/v1alpha1/deployment.go similarity index 96% rename from pkg/operator/apis/monitoring/v1alpha1/deployment.go rename to internal/static/operator/apis/monitoring/v1alpha1/deployment.go index 4b7c213d1b..0b8d2d1503 100644 --- a/pkg/operator/apis/monitoring/v1alpha1/deployment.go +++ b/internal/static/operator/apis/monitoring/v1alpha1/deployment.go @@ -1,7 +1,7 @@ package v1alpha1 import ( - "github.com/grafana/agent/pkg/operator/assets" + "github.com/grafana/agent/internal/static/operator/assets" promv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" ) diff --git a/pkg/operator/apis/monitoring/v1alpha1/doc.go b/internal/static/operator/apis/monitoring/v1alpha1/doc.go similarity index 100% rename from pkg/operator/apis/monitoring/v1alpha1/doc.go rename to internal/static/operator/apis/monitoring/v1alpha1/doc.go diff --git a/pkg/operator/apis/monitoring/v1alpha1/group.go b/internal/static/operator/apis/monitoring/v1alpha1/group.go similarity index 100% rename from pkg/operator/apis/monitoring/v1alpha1/group.go rename to internal/static/operator/apis/monitoring/v1alpha1/group.go diff --git a/pkg/operator/apis/monitoring/v1alpha1/types.go b/internal/static/operator/apis/monitoring/v1alpha1/types.go similarity index 100% rename from pkg/operator/apis/monitoring/v1alpha1/types.go rename to internal/static/operator/apis/monitoring/v1alpha1/types.go diff --git a/pkg/operator/apis/monitoring/v1alpha1/types_integrations.go b/internal/static/operator/apis/monitoring/v1alpha1/types_integrations.go similarity index 100% rename from pkg/operator/apis/monitoring/v1alpha1/types_integrations.go rename to internal/static/operator/apis/monitoring/v1alpha1/types_integrations.go diff --git a/pkg/operator/apis/monitoring/v1alpha1/types_logs.go b/internal/static/operator/apis/monitoring/v1alpha1/types_logs.go similarity index 100% rename from pkg/operator/apis/monitoring/v1alpha1/types_logs.go rename to internal/static/operator/apis/monitoring/v1alpha1/types_logs.go diff --git a/pkg/operator/apis/monitoring/v1alpha1/types_metrics.go b/internal/static/operator/apis/monitoring/v1alpha1/types_metrics.go similarity index 100% rename from pkg/operator/apis/monitoring/v1alpha1/types_metrics.go rename to internal/static/operator/apis/monitoring/v1alpha1/types_metrics.go diff --git a/pkg/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go b/internal/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go similarity index 99% rename from pkg/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go rename to internal/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go index a55dd49ad7..97872384f8 100644 --- a/pkg/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go +++ b/internal/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - "github.com/grafana/agent/pkg/operator/assets" + "github.com/grafana/agent/internal/static/operator/assets" "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/operator/assets/assets.go b/internal/static/operator/assets/assets.go similarity index 100% rename from pkg/operator/assets/assets.go rename to internal/static/operator/assets/assets.go diff --git a/pkg/operator/build_hierarchy.go b/internal/static/operator/build_hierarchy.go similarity index 96% rename from pkg/operator/build_hierarchy.go rename to internal/static/operator/build_hierarchy.go index be019deaee..0830ad43ca 100644 --- a/pkg/operator/build_hierarchy.go +++ b/internal/static/operator/build_hierarchy.go @@ -6,10 +6,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/assets" - "github.com/grafana/agent/pkg/operator/config" - "github.com/grafana/agent/pkg/operator/hierarchy" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/assets" + "github.com/grafana/agent/internal/static/operator/config" + "github.com/grafana/agent/internal/static/operator/hierarchy" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" corev1 "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" diff --git a/pkg/operator/build_hierarchy_test.go b/internal/static/operator/build_hierarchy_test.go similarity index 95% rename from pkg/operator/build_hierarchy_test.go rename to internal/static/operator/build_hierarchy_test.go index 78aec94bf3..735545f0c0 100644 --- a/pkg/operator/build_hierarchy_test.go +++ b/internal/static/operator/build_hierarchy_test.go @@ -9,11 +9,11 @@ import ( "testing" "time" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/hierarchy" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/pkg/util/k8s" - "github.com/grafana/agent/pkg/util/structwalk" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/hierarchy" + "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/internal/util/k8s" + "github.com/grafana/agent/internal/util/structwalk" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" diff --git a/pkg/operator/clientutil/clientutil.go b/internal/static/operator/clientutil/clientutil.go similarity index 100% rename from pkg/operator/clientutil/clientutil.go rename to internal/static/operator/clientutil/clientutil.go diff --git a/pkg/operator/clientutil/merge.go b/internal/static/operator/clientutil/merge.go similarity index 100% rename from pkg/operator/clientutil/merge.go rename to internal/static/operator/clientutil/merge.go diff --git a/pkg/operator/config/config.go b/internal/static/operator/config/config.go similarity index 96% rename from pkg/operator/config/config.go rename to internal/static/operator/config/config.go index 0f0253d744..ea32ddaf0a 100644 --- a/pkg/operator/config/config.go +++ b/internal/static/operator/config/config.go @@ -12,8 +12,8 @@ import ( "github.com/fatih/structs" jsonnet "github.com/google/go-jsonnet" "github.com/google/go-jsonnet/ast" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/assets" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/assets" "gopkg.in/yaml.v3" ) diff --git a/pkg/operator/config/config_references.go b/internal/static/operator/config/config_references.go similarity index 97% rename from pkg/operator/config/config_references.go rename to internal/static/operator/config/config_references.go index 745e5511fc..91eee4b7d2 100644 --- a/pkg/operator/config/config_references.go +++ b/internal/static/operator/config/config_references.go @@ -1,7 +1,7 @@ package config import ( - "github.com/grafana/agent/pkg/util/structwalk" + "github.com/grafana/agent/internal/util/structwalk" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" corev1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/operator/config/config_references_test.go b/internal/static/operator/config/config_references_test.go similarity index 96% rename from pkg/operator/config/config_references_test.go rename to internal/static/operator/config/config_references_test.go index f74e9398d4..515858a379 100644 --- a/pkg/operator/config/config_references_test.go +++ b/internal/static/operator/config/config_references_test.go @@ -3,7 +3,7 @@ package config import ( "testing" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" prom "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/stretchr/testify/require" corev1 "k8s.io/api/core/v1" diff --git a/pkg/operator/config/config_test.go b/internal/static/operator/config/config_test.go similarity index 98% rename from pkg/operator/config/config_test.go rename to internal/static/operator/config/config_test.go index d9ad7b16a0..2d499134c5 100644 --- a/pkg/operator/config/config_test.go +++ b/internal/static/operator/config/config_test.go @@ -11,11 +11,11 @@ import ( "k8s.io/utils/ptr" k8s_yaml "sigs.k8s.io/yaml" - "github.com/grafana/agent/pkg/operator/assets" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/pkg/util/subset" + "github.com/grafana/agent/internal/static/operator/assets" + "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/internal/util/subset" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" ) func TestBuildConfigMetrics(t *testing.T) { diff --git a/pkg/operator/config/fs_importer.go b/internal/static/operator/config/fs_importer.go similarity index 100% rename from pkg/operator/config/fs_importer.go rename to internal/static/operator/config/fs_importer.go diff --git a/pkg/operator/config/integration_templates_test.go b/internal/static/operator/config/integration_templates_test.go similarity index 88% rename from pkg/operator/config/integration_templates_test.go rename to internal/static/operator/config/integration_templates_test.go index d00cb62422..61a9b54763 100644 --- a/pkg/operator/config/integration_templates_test.go +++ b/internal/static/operator/config/integration_templates_test.go @@ -3,9 +3,9 @@ package config import ( "testing" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/pkg/util/subset" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/internal/util/subset" "github.com/stretchr/testify/require" apiext_v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "sigs.k8s.io/yaml" diff --git a/pkg/operator/config/logs_templates_test.go b/internal/static/operator/config/logs_templates_test.go similarity index 98% rename from pkg/operator/config/logs_templates_test.go rename to internal/static/operator/config/logs_templates_test.go index e2fe0dd288..5f38b801a2 100644 --- a/pkg/operator/config/logs_templates_test.go +++ b/internal/static/operator/config/logs_templates_test.go @@ -13,9 +13,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/assets" - "github.com/grafana/agent/pkg/util" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/assets" + "github.com/grafana/agent/internal/util" ) func TestLogsClientConfig(t *testing.T) { diff --git a/pkg/operator/config/metrics_templates_test.go b/internal/static/operator/config/metrics_templates_test.go similarity index 99% rename from pkg/operator/config/metrics_templates_test.go rename to internal/static/operator/config/metrics_templates_test.go index 1b7cb619bc..e750ee8aa0 100644 --- a/pkg/operator/config/metrics_templates_test.go +++ b/internal/static/operator/config/metrics_templates_test.go @@ -14,9 +14,9 @@ import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/utils/ptr" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/assets" - "github.com/grafana/agent/pkg/util" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/assets" + "github.com/grafana/agent/internal/util" ) func TestExternalLabels(t *testing.T) { diff --git a/pkg/operator/config/templates/agent-integrations.libsonnet b/internal/static/operator/config/templates/agent-integrations.libsonnet similarity index 100% rename from pkg/operator/config/templates/agent-integrations.libsonnet rename to internal/static/operator/config/templates/agent-integrations.libsonnet diff --git a/pkg/operator/config/templates/agent-logs.libsonnet b/internal/static/operator/config/templates/agent-logs.libsonnet similarity index 100% rename from pkg/operator/config/templates/agent-logs.libsonnet rename to internal/static/operator/config/templates/agent-logs.libsonnet diff --git a/pkg/operator/config/templates/agent-metrics.libsonnet b/internal/static/operator/config/templates/agent-metrics.libsonnet similarity index 100% rename from pkg/operator/config/templates/agent-metrics.libsonnet rename to internal/static/operator/config/templates/agent-metrics.libsonnet diff --git a/pkg/operator/config/templates/component/logs/client.libsonnet b/internal/static/operator/config/templates/component/logs/client.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/logs/client.libsonnet rename to internal/static/operator/config/templates/component/logs/client.libsonnet diff --git a/pkg/operator/config/templates/component/logs/external_labels.libsonnet b/internal/static/operator/config/templates/component/logs/external_labels.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/logs/external_labels.libsonnet rename to internal/static/operator/config/templates/component/logs/external_labels.libsonnet diff --git a/pkg/operator/config/templates/component/logs/pod_logs.libsonnet b/internal/static/operator/config/templates/component/logs/pod_logs.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/logs/pod_logs.libsonnet rename to internal/static/operator/config/templates/component/logs/pod_logs.libsonnet diff --git a/pkg/operator/config/templates/component/logs/relabel_config.libsonnet b/internal/static/operator/config/templates/component/logs/relabel_config.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/logs/relabel_config.libsonnet rename to internal/static/operator/config/templates/component/logs/relabel_config.libsonnet diff --git a/pkg/operator/config/templates/component/logs/stages.libsonnet b/internal/static/operator/config/templates/component/logs/stages.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/logs/stages.libsonnet rename to internal/static/operator/config/templates/component/logs/stages.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/external_labels.libsonnet b/internal/static/operator/config/templates/component/metrics/external_labels.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/external_labels.libsonnet rename to internal/static/operator/config/templates/component/metrics/external_labels.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/kube_sd_config.libsonnet b/internal/static/operator/config/templates/component/metrics/kube_sd_config.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/kube_sd_config.libsonnet rename to internal/static/operator/config/templates/component/metrics/kube_sd_config.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/pod_monitor.libsonnet b/internal/static/operator/config/templates/component/metrics/pod_monitor.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/pod_monitor.libsonnet rename to internal/static/operator/config/templates/component/metrics/pod_monitor.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/probe.libsonnet b/internal/static/operator/config/templates/component/metrics/probe.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/probe.libsonnet rename to internal/static/operator/config/templates/component/metrics/probe.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/relabel_config.libsonnet b/internal/static/operator/config/templates/component/metrics/relabel_config.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/relabel_config.libsonnet rename to internal/static/operator/config/templates/component/metrics/relabel_config.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/remote_write.libsonnet b/internal/static/operator/config/templates/component/metrics/remote_write.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/remote_write.libsonnet rename to internal/static/operator/config/templates/component/metrics/remote_write.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/safe_tls_config.libsonnet b/internal/static/operator/config/templates/component/metrics/safe_tls_config.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/safe_tls_config.libsonnet rename to internal/static/operator/config/templates/component/metrics/safe_tls_config.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/service_monitor.libsonnet b/internal/static/operator/config/templates/component/metrics/service_monitor.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/service_monitor.libsonnet rename to internal/static/operator/config/templates/component/metrics/service_monitor.libsonnet diff --git a/pkg/operator/config/templates/component/metrics/tls_config.libsonnet b/internal/static/operator/config/templates/component/metrics/tls_config.libsonnet similarity index 100% rename from pkg/operator/config/templates/component/metrics/tls_config.libsonnet rename to internal/static/operator/config/templates/component/metrics/tls_config.libsonnet diff --git a/pkg/operator/config/templates/ext/marshal.libsonnet b/internal/static/operator/config/templates/ext/marshal.libsonnet similarity index 100% rename from pkg/operator/config/templates/ext/marshal.libsonnet rename to internal/static/operator/config/templates/ext/marshal.libsonnet diff --git a/pkg/operator/config/templates/ext/optionals.libsonnet b/internal/static/operator/config/templates/ext/optionals.libsonnet similarity index 100% rename from pkg/operator/config/templates/ext/optionals.libsonnet rename to internal/static/operator/config/templates/ext/optionals.libsonnet diff --git a/pkg/operator/config/templates/ext/secrets.libsonnet b/internal/static/operator/config/templates/ext/secrets.libsonnet similarity index 100% rename from pkg/operator/config/templates/ext/secrets.libsonnet rename to internal/static/operator/config/templates/ext/secrets.libsonnet diff --git a/pkg/operator/config/templates/integrations.libsonnet b/internal/static/operator/config/templates/integrations.libsonnet similarity index 100% rename from pkg/operator/config/templates/integrations.libsonnet rename to internal/static/operator/config/templates/integrations.libsonnet diff --git a/pkg/operator/config/templates/logs.libsonnet b/internal/static/operator/config/templates/logs.libsonnet similarity index 100% rename from pkg/operator/config/templates/logs.libsonnet rename to internal/static/operator/config/templates/logs.libsonnet diff --git a/pkg/operator/config/templates/metrics.libsonnet b/internal/static/operator/config/templates/metrics.libsonnet similarity index 100% rename from pkg/operator/config/templates/metrics.libsonnet rename to internal/static/operator/config/templates/metrics.libsonnet diff --git a/pkg/operator/config/templates/utils/k8s.libsonnet b/internal/static/operator/config/templates/utils/k8s.libsonnet similarity index 100% rename from pkg/operator/config/templates/utils/k8s.libsonnet rename to internal/static/operator/config/templates/utils/k8s.libsonnet diff --git a/pkg/operator/config/utils.go b/internal/static/operator/config/utils.go similarity index 97% rename from pkg/operator/config/utils.go rename to internal/static/operator/config/utils.go index 9dfec27f7e..3d53474f89 100644 --- a/pkg/operator/config/utils.go +++ b/internal/static/operator/config/utils.go @@ -7,7 +7,7 @@ import ( "github.com/fatih/structs" jsonnet "github.com/google/go-jsonnet" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" "sigs.k8s.io/yaml" ) diff --git a/pkg/operator/config/utils_test.go b/internal/static/operator/config/utils_test.go similarity index 100% rename from pkg/operator/config/utils_test.go rename to internal/static/operator/config/utils_test.go diff --git a/pkg/operator/defaults.go b/internal/static/operator/defaults.go similarity index 100% rename from pkg/operator/defaults.go rename to internal/static/operator/defaults.go diff --git a/pkg/operator/defaults.go.t b/internal/static/operator/defaults.go.t similarity index 100% rename from pkg/operator/defaults.go.t rename to internal/static/operator/defaults.go.t diff --git a/pkg/operator/hierarchy/hierarchy.go b/internal/static/operator/hierarchy/hierarchy.go similarity index 100% rename from pkg/operator/hierarchy/hierarchy.go rename to internal/static/operator/hierarchy/hierarchy.go diff --git a/pkg/operator/hierarchy/hierarchy_test.go b/internal/static/operator/hierarchy/hierarchy_test.go similarity index 98% rename from pkg/operator/hierarchy/hierarchy_test.go rename to internal/static/operator/hierarchy/hierarchy_test.go index 062c6c7732..a26c839c2d 100644 --- a/pkg/operator/hierarchy/hierarchy_test.go +++ b/internal/static/operator/hierarchy/hierarchy_test.go @@ -8,7 +8,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/util/k8s" + "github.com/grafana/agent/internal/util/k8s" "github.com/stretchr/testify/require" v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/operator/hierarchy/list.go b/internal/static/operator/hierarchy/list.go similarity index 100% rename from pkg/operator/hierarchy/list.go rename to internal/static/operator/hierarchy/list.go diff --git a/pkg/operator/hierarchy/selector.go b/internal/static/operator/hierarchy/selector.go similarity index 100% rename from pkg/operator/hierarchy/selector.go rename to internal/static/operator/hierarchy/selector.go diff --git a/pkg/operator/kubelet.go b/internal/static/operator/kubelet.go similarity index 97% rename from pkg/operator/kubelet.go rename to internal/static/operator/kubelet.go index 9ecff4f9bc..1e76875519 100644 --- a/pkg/operator/kubelet.go +++ b/internal/static/operator/kubelet.go @@ -7,8 +7,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/operator/clientutil" - "github.com/grafana/agent/pkg/operator/logutil" + "github.com/grafana/agent/internal/static/operator/clientutil" + "github.com/grafana/agent/internal/static/operator/logutil" core_v1 "k8s.io/api/core/v1" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" controller "sigs.k8s.io/controller-runtime" diff --git a/pkg/operator/kubelet_test.go b/internal/static/operator/kubelet_test.go similarity index 94% rename from pkg/operator/kubelet_test.go rename to internal/static/operator/kubelet_test.go index 240cc0ad82..99e5ff0364 100644 --- a/pkg/operator/kubelet_test.go +++ b/internal/static/operator/kubelet_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/operator/logutil" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/pkg/util/k8s" + "github.com/grafana/agent/internal/static/operator/logutil" + "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/internal/util/k8s" "github.com/stretchr/testify/require" "sigs.k8s.io/controller-runtime/pkg/reconcile" diff --git a/pkg/operator/logutil/log.go b/internal/static/operator/logutil/log.go similarity index 100% rename from pkg/operator/logutil/log.go rename to internal/static/operator/logutil/log.go diff --git a/pkg/operator/operator.go b/internal/static/operator/operator.go similarity index 98% rename from pkg/operator/operator.go rename to internal/static/operator/operator.go index adad79288e..12a5791ea6 100644 --- a/pkg/operator/operator.go +++ b/internal/static/operator/operator.go @@ -21,8 +21,8 @@ import ( "sigs.k8s.io/controller-runtime/pkg/reconcile" "sigs.k8s.io/controller-runtime/pkg/webhook" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/hierarchy" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/hierarchy" promop_v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" promop "github.com/prometheus-operator/prometheus-operator/pkg/operator" apps_v1 "k8s.io/api/apps/v1" diff --git a/pkg/operator/operator_test.go b/internal/static/operator/operator_test.go similarity index 96% rename from pkg/operator/operator_test.go rename to internal/static/operator/operator_test.go index 6db19d6609..6ab889e613 100644 --- a/pkg/operator/operator_test.go +++ b/internal/static/operator/operator_test.go @@ -12,10 +12,10 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/operator/logutil" - "github.com/grafana/agent/pkg/util" - "github.com/grafana/agent/pkg/util/k8s" - "github.com/grafana/agent/pkg/util/subset" + "github.com/grafana/agent/internal/static/operator/logutil" + "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/internal/util/k8s" + "github.com/grafana/agent/internal/util/subset" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/pkg/operator/reconciler.go b/internal/static/operator/reconciler.go similarity index 92% rename from pkg/operator/reconciler.go rename to internal/static/operator/reconciler.go index b43f62831d..05708aaa1e 100644 --- a/pkg/operator/reconciler.go +++ b/internal/static/operator/reconciler.go @@ -6,11 +6,11 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/clientutil" - "github.com/grafana/agent/pkg/operator/config" - "github.com/grafana/agent/pkg/operator/hierarchy" - "github.com/grafana/agent/pkg/operator/logutil" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/clientutil" + "github.com/grafana/agent/internal/static/operator/config" + "github.com/grafana/agent/internal/static/operator/hierarchy" + "github.com/grafana/agent/internal/static/operator/logutil" "github.com/prometheus/prometheus/model/labels" core_v1 "k8s.io/api/core/v1" k8s_errors "k8s.io/apimachinery/pkg/api/errors" diff --git a/pkg/operator/reconciler_integrations.go b/internal/static/operator/reconciler_integrations.go similarity index 94% rename from pkg/operator/reconciler_integrations.go rename to internal/static/operator/reconciler_integrations.go index a495471ae8..46eb873907 100644 --- a/pkg/operator/reconciler_integrations.go +++ b/internal/static/operator/reconciler_integrations.go @@ -6,9 +6,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/clientutil" - "github.com/grafana/agent/pkg/operator/config" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/clientutil" + "github.com/grafana/agent/internal/static/operator/config" apps_v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/types" ) diff --git a/pkg/operator/reconciler_integrations_test.go b/internal/static/operator/reconciler_integrations_test.go similarity index 95% rename from pkg/operator/reconciler_integrations_test.go rename to internal/static/operator/reconciler_integrations_test.go index 79f3b2581b..6f0d0c9686 100644 --- a/pkg/operator/reconciler_integrations_test.go +++ b/internal/static/operator/reconciler_integrations_test.go @@ -3,7 +3,7 @@ package operator import ( "testing" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" "github.com/stretchr/testify/require" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/pkg/operator/reconciler_logs.go b/internal/static/operator/reconciler_logs.go similarity index 87% rename from pkg/operator/reconciler_logs.go rename to internal/static/operator/reconciler_logs.go index 4771b83596..cf12348851 100644 --- a/pkg/operator/reconciler_logs.go +++ b/internal/static/operator/reconciler_logs.go @@ -6,9 +6,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/clientutil" - "github.com/grafana/agent/pkg/operator/config" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/clientutil" + "github.com/grafana/agent/internal/static/operator/config" apps_v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/types" ) diff --git a/pkg/operator/reconciler_metrics.go b/internal/static/operator/reconciler_metrics.go similarity index 96% rename from pkg/operator/reconciler_metrics.go rename to internal/static/operator/reconciler_metrics.go index eec1ffa072..86b43c11da 100644 --- a/pkg/operator/reconciler_metrics.go +++ b/internal/static/operator/reconciler_metrics.go @@ -19,9 +19,9 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/clientutil" - "github.com/grafana/agent/pkg/operator/config" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/clientutil" + "github.com/grafana/agent/internal/static/operator/config" ) // createMetricsConfigurationSecret creates the Grafana Agent metrics configuration and stores diff --git a/pkg/operator/resources_integrations.go b/internal/static/operator/resources_integrations.go similarity index 97% rename from pkg/operator/resources_integrations.go rename to internal/static/operator/resources_integrations.go index 4e6ec44f66..f1520ff3b1 100644 --- a/pkg/operator/resources_integrations.go +++ b/internal/static/operator/resources_integrations.go @@ -3,9 +3,9 @@ package operator import ( "fmt" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/assets" - "github.com/grafana/agent/pkg/operator/config" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/assets" + "github.com/grafana/agent/internal/static/operator/config" apps_v1 "k8s.io/api/apps/v1" core_v1 "k8s.io/api/core/v1" ) diff --git a/pkg/operator/resources_logs.go b/internal/static/operator/resources_logs.go similarity index 96% rename from pkg/operator/resources_logs.go rename to internal/static/operator/resources_logs.go index fc47af6772..5edf4c7860 100644 --- a/pkg/operator/resources_logs.go +++ b/internal/static/operator/resources_logs.go @@ -1,7 +1,7 @@ package operator import ( - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" apps_v1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" ) diff --git a/pkg/operator/resources_metrics.go b/internal/static/operator/resources_metrics.go similarity index 98% rename from pkg/operator/resources_metrics.go rename to internal/static/operator/resources_metrics.go index ee6e0cdbbb..f3facae949 100644 --- a/pkg/operator/resources_metrics.go +++ b/internal/static/operator/resources_metrics.go @@ -14,7 +14,7 @@ import ( "k8s.io/utils/ptr" "sigs.k8s.io/controller-runtime/pkg/client" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" ) const ( diff --git a/pkg/operator/resources_metrics_test.go b/internal/static/operator/resources_metrics_test.go similarity index 87% rename from pkg/operator/resources_metrics_test.go rename to internal/static/operator/resources_metrics_test.go index 8c53a8224f..5041d70463 100644 --- a/pkg/operator/resources_metrics_test.go +++ b/internal/static/operator/resources_metrics_test.go @@ -3,7 +3,7 @@ package operator import ( "testing" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" "github.com/stretchr/testify/require" core_v1 "k8s.io/api/core/v1" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/operator/resources_pod_template.go b/internal/static/operator/resources_pod_template.go similarity index 98% rename from pkg/operator/resources_pod_template.go rename to internal/static/operator/resources_pod_template.go index c4b82cc0f2..322d6c6c42 100644 --- a/pkg/operator/resources_pod_template.go +++ b/internal/static/operator/resources_pod_template.go @@ -9,9 +9,9 @@ import ( "k8s.io/apimachinery/pkg/util/intstr" "k8s.io/utils/ptr" - "github.com/grafana/agent/pkg/build" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/pkg/operator/clientutil" + "github.com/grafana/agent/internal/build" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/internal/static/operator/clientutil" ) type podTemplateOptions struct { diff --git a/pkg/operator/resources_pod_template_test.go b/internal/static/operator/resources_pod_template_test.go similarity index 98% rename from pkg/operator/resources_pod_template_test.go rename to internal/static/operator/resources_pod_template_test.go index fa189a2033..89b84a36b2 100644 --- a/pkg/operator/resources_pod_template_test.go +++ b/internal/static/operator/resources_pod_template_test.go @@ -3,7 +3,7 @@ package operator import ( "testing" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" v1 "k8s.io/apimachinery/pkg/apis/meta/v1" diff --git a/pkg/operator/testdata/test-custom-mounts.in.yaml b/internal/static/operator/testdata/test-custom-mounts.in.yaml similarity index 100% rename from pkg/operator/testdata/test-custom-mounts.in.yaml rename to internal/static/operator/testdata/test-custom-mounts.in.yaml diff --git a/pkg/operator/testdata/test-custom-mounts.out.yaml b/internal/static/operator/testdata/test-custom-mounts.out.yaml similarity index 100% rename from pkg/operator/testdata/test-custom-mounts.out.yaml rename to internal/static/operator/testdata/test-custom-mounts.out.yaml diff --git a/pkg/operator/testdata/test-integrations.in.yaml b/internal/static/operator/testdata/test-integrations.in.yaml similarity index 100% rename from pkg/operator/testdata/test-integrations.in.yaml rename to internal/static/operator/testdata/test-integrations.in.yaml diff --git a/pkg/operator/testdata/test-integrations.out.yaml b/internal/static/operator/testdata/test-integrations.out.yaml similarity index 100% rename from pkg/operator/testdata/test-integrations.out.yaml rename to internal/static/operator/testdata/test-integrations.out.yaml diff --git a/pkg/operator/testdata/test-metrics-instance.in.yaml b/internal/static/operator/testdata/test-metrics-instance.in.yaml similarity index 100% rename from pkg/operator/testdata/test-metrics-instance.in.yaml rename to internal/static/operator/testdata/test-metrics-instance.in.yaml diff --git a/pkg/operator/testdata/test-metrics-instance.out.yaml b/internal/static/operator/testdata/test-metrics-instance.out.yaml similarity index 100% rename from pkg/operator/testdata/test-metrics-instance.out.yaml rename to internal/static/operator/testdata/test-metrics-instance.out.yaml diff --git a/pkg/operator/testdata/test-resource-hierarchy.yaml b/internal/static/operator/testdata/test-resource-hierarchy.yaml similarity index 100% rename from pkg/operator/testdata/test-resource-hierarchy.yaml rename to internal/static/operator/testdata/test-resource-hierarchy.yaml diff --git a/pkg/server/config.go b/internal/static/server/config.go similarity index 97% rename from pkg/server/config.go rename to internal/static/server/config.go index 6c059db85c..ce5ffa99e8 100644 --- a/pkg/server/config.go +++ b/internal/static/server/config.go @@ -3,7 +3,7 @@ package server import ( "flag" - "github.com/grafana/agent/pkg/flow/logging" + "github.com/grafana/agent/internal/flow/logging" "github.com/grafana/dskit/log" ) diff --git a/pkg/server/config_test.go b/internal/static/server/config_test.go similarity index 100% rename from pkg/server/config_test.go rename to internal/static/server/config_test.go diff --git a/pkg/server/flags.go b/internal/static/server/flags.go similarity index 100% rename from pkg/server/flags.go rename to internal/static/server/flags.go diff --git a/pkg/server/logger.go b/internal/static/server/logger.go similarity index 97% rename from pkg/server/logger.go rename to internal/static/server/logger.go index 253443f497..0068775ac2 100644 --- a/pkg/server/logger.go +++ b/internal/static/server/logger.go @@ -4,7 +4,7 @@ import ( "sync" "github.com/go-kit/log" - util_log "github.com/grafana/agent/pkg/util/log" + util_log "github.com/grafana/agent/internal/util/log" dskit "github.com/grafana/dskit/log" ) diff --git a/pkg/server/logger_test.go b/internal/static/server/logger_test.go similarity index 100% rename from pkg/server/logger_test.go rename to internal/static/server/logger_test.go diff --git a/pkg/server/logger_windows.go b/internal/static/server/logger_windows.go similarity index 100% rename from pkg/server/logger_windows.go rename to internal/static/server/logger_windows.go diff --git a/pkg/server/server.go b/internal/static/server/server.go similarity index 100% rename from pkg/server/server.go rename to internal/static/server/server.go diff --git a/pkg/server/server_test.go b/internal/static/server/server_test.go similarity index 100% rename from pkg/server/server_test.go rename to internal/static/server/server_test.go diff --git a/pkg/server/signal_context.go b/internal/static/server/signal_context.go similarity index 100% rename from pkg/server/signal_context.go rename to internal/static/server/signal_context.go diff --git a/pkg/server/testdata/example-cert.pem b/internal/static/server/testdata/example-cert.pem similarity index 100% rename from pkg/server/testdata/example-cert.pem rename to internal/static/server/testdata/example-cert.pem diff --git a/pkg/server/testdata/example-key.pem b/internal/static/server/testdata/example-key.pem similarity index 100% rename from pkg/server/testdata/example-key.pem rename to internal/static/server/testdata/example-key.pem diff --git a/pkg/server/testdata/windows/CLIENT_CA_CERT.cer b/internal/static/server/testdata/windows/CLIENT_CA_CERT.cer similarity index 100% rename from pkg/server/testdata/windows/CLIENT_CA_CERT.cer rename to internal/static/server/testdata/windows/CLIENT_CA_CERT.cer diff --git a/pkg/server/testdata/windows/README.md b/internal/static/server/testdata/windows/README.md similarity index 100% rename from pkg/server/testdata/windows/README.md rename to internal/static/server/testdata/windows/README.md diff --git a/pkg/server/testdata/windows/agent-config.yml b/internal/static/server/testdata/windows/agent-config.yml similarity index 100% rename from pkg/server/testdata/windows/agent-config.yml rename to internal/static/server/testdata/windows/agent-config.yml diff --git a/pkg/server/testdata/windows/client_cert.crt b/internal/static/server/testdata/windows/client_cert.crt similarity index 100% rename from pkg/server/testdata/windows/client_cert.crt rename to internal/static/server/testdata/windows/client_cert.crt diff --git a/pkg/server/testdata/windows/client_cert.pfx b/internal/static/server/testdata/windows/client_cert.pfx similarity index 100% rename from pkg/server/testdata/windows/client_cert.pfx rename to internal/static/server/testdata/windows/client_cert.pfx diff --git a/pkg/server/testdata/windows/client_key.key b/internal/static/server/testdata/windows/client_key.key similarity index 100% rename from pkg/server/testdata/windows/client_key.key rename to internal/static/server/testdata/windows/client_key.key diff --git a/pkg/server/testdata/windows/client_key_unencrypted.key b/internal/static/server/testdata/windows/client_key_unencrypted.key similarity index 100% rename from pkg/server/testdata/windows/client_key_unencrypted.key rename to internal/static/server/testdata/windows/client_key_unencrypted.key diff --git a/pkg/server/testdata/windows/server_cert.crt b/internal/static/server/testdata/windows/server_cert.crt similarity index 100% rename from pkg/server/testdata/windows/server_cert.crt rename to internal/static/server/testdata/windows/server_cert.crt diff --git a/pkg/server/tls.go b/internal/static/server/tls.go similarity index 100% rename from pkg/server/tls.go rename to internal/static/server/tls.go diff --git a/pkg/server/tls_certstore_stub.go b/internal/static/server/tls_certstore_stub.go similarity index 100% rename from pkg/server/tls_certstore_stub.go rename to internal/static/server/tls_certstore_stub.go diff --git a/pkg/server/tls_certstore_windows.go b/internal/static/server/tls_certstore_windows.go similarity index 100% rename from pkg/server/tls_certstore_windows.go rename to internal/static/server/tls_certstore_windows.go diff --git a/pkg/server/tls_certstore_windows_test.go b/internal/static/server/tls_certstore_windows_test.go similarity index 100% rename from pkg/server/tls_certstore_windows_test.go rename to internal/static/server/tls_certstore_windows_test.go diff --git a/pkg/server/tls_test.go b/internal/static/server/tls_test.go similarity index 100% rename from pkg/server/tls_test.go rename to internal/static/server/tls_test.go diff --git a/pkg/supportbundle/supportbundle.go b/internal/static/supportbundle/supportbundle.go similarity index 98% rename from pkg/supportbundle/supportbundle.go rename to internal/static/supportbundle/supportbundle.go index edf1b79234..3963c2a9cc 100644 --- a/pkg/supportbundle/supportbundle.go +++ b/internal/static/supportbundle/supportbundle.go @@ -14,8 +14,8 @@ import ( "sync" "time" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/server" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/server" "github.com/mackerelio/go-osstat/uptime" "gopkg.in/yaml.v3" ) diff --git a/pkg/traces/automaticloggingprocessor/automaticloggingprocessor.go b/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor.go similarity index 97% rename from pkg/traces/automaticloggingprocessor/automaticloggingprocessor.go rename to internal/static/traces/automaticloggingprocessor/automaticloggingprocessor.go index ab4c38ac79..63a6fbb6c2 100644 --- a/pkg/traces/automaticloggingprocessor/automaticloggingprocessor.go +++ b/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor.go @@ -10,10 +10,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/go-logfmt/logfmt" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/operator/config" - "github.com/grafana/agent/pkg/traces/contextkeys" - util "github.com/grafana/agent/pkg/util/log" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/operator/config" + "github.com/grafana/agent/internal/static/traces/contextkeys" + util "github.com/grafana/agent/internal/util/log" "github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" diff --git a/pkg/traces/automaticloggingprocessor/automaticloggingprocessor_test.go b/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go similarity index 98% rename from pkg/traces/automaticloggingprocessor/automaticloggingprocessor_test.go rename to internal/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go index 2457125cf6..310a09c0ad 100644 --- a/pkg/traces/automaticloggingprocessor/automaticloggingprocessor_test.go +++ b/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/util" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/pkg/traces/automaticloggingprocessor/factory.go b/internal/static/traces/automaticloggingprocessor/factory.go similarity index 98% rename from pkg/traces/automaticloggingprocessor/factory.go rename to internal/static/traces/automaticloggingprocessor/factory.go index 34aaebc0f3..bab898f972 100644 --- a/pkg/traces/automaticloggingprocessor/factory.go +++ b/internal/static/traces/automaticloggingprocessor/factory.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/grafana/agent/pkg/logs" + "github.com/grafana/agent/internal/static/logs" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor" diff --git a/pkg/traces/config.go b/internal/static/traces/config.go similarity index 98% rename from pkg/traces/config.go rename to internal/static/traces/config.go index e76b0d89e6..10fc5fef10 100644 --- a/pkg/traces/config.go +++ b/internal/static/traces/config.go @@ -11,7 +11,7 @@ import ( "strings" "time" - promsdconsumer "github.com/grafana/agent/pkg/traces/promsdprocessor/consumer" + promsdconsumer "github.com/grafana/agent/internal/static/traces/promsdprocessor/consumer" "github.com/mitchellh/mapstructure" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/loadbalancingexporter" "github.com/open-telemetry/opentelemetry-collector-contrib/exporter/prometheusexporter" @@ -40,14 +40,14 @@ import ( "go.uber.org/multierr" "gopkg.in/yaml.v2" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/traces/automaticloggingprocessor" - "github.com/grafana/agent/pkg/traces/noopreceiver" - "github.com/grafana/agent/pkg/traces/promsdprocessor" - "github.com/grafana/agent/pkg/traces/pushreceiver" - "github.com/grafana/agent/pkg/traces/remotewriteexporter" - "github.com/grafana/agent/pkg/traces/servicegraphprocessor" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/traces/automaticloggingprocessor" + "github.com/grafana/agent/internal/static/traces/noopreceiver" + "github.com/grafana/agent/internal/static/traces/promsdprocessor" + "github.com/grafana/agent/internal/static/traces/pushreceiver" + "github.com/grafana/agent/internal/static/traces/remotewriteexporter" + "github.com/grafana/agent/internal/static/traces/servicegraphprocessor" + "github.com/grafana/agent/internal/util" ) const ( diff --git a/pkg/traces/config_test.go b/internal/static/traces/config_test.go similarity index 99% rename from pkg/traces/config_test.go rename to internal/static/traces/config_test.go index 0781a94bd5..a5e9bbedd4 100644 --- a/pkg/traces/config_test.go +++ b/internal/static/traces/config_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/grafana/agent/pkg/traces/pushreceiver" + "github.com/grafana/agent/internal/static/traces/pushreceiver" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" diff --git a/pkg/traces/contextkeys/keys.go b/internal/static/traces/contextkeys/keys.go similarity index 100% rename from pkg/traces/contextkeys/keys.go rename to internal/static/traces/contextkeys/keys.go diff --git a/pkg/traces/instance.go b/internal/static/traces/instance.go similarity index 92% rename from pkg/traces/instance.go rename to internal/static/traces/instance.go index 85c69a6450..bfa063353f 100644 --- a/pkg/traces/instance.go +++ b/internal/static/traces/instance.go @@ -17,14 +17,14 @@ import ( "go.uber.org/zap" "go.uber.org/zap/zapcore" - "github.com/grafana/agent/pkg/build" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/traces/automaticloggingprocessor" - "github.com/grafana/agent/pkg/traces/contextkeys" - "github.com/grafana/agent/pkg/traces/servicegraphprocessor" - "github.com/grafana/agent/pkg/traces/traceutils" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/build" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/traces/automaticloggingprocessor" + "github.com/grafana/agent/internal/static/traces/contextkeys" + "github.com/grafana/agent/internal/static/traces/servicegraphprocessor" + "github.com/grafana/agent/internal/static/traces/traceutils" + "github.com/grafana/agent/internal/util" prom_client "github.com/prometheus/client_golang/prometheus" "go.opentelemetry.io/otel/trace/noop" ) diff --git a/pkg/traces/noopreceiver/factory.go b/internal/static/traces/noopreceiver/factory.go similarity index 100% rename from pkg/traces/noopreceiver/factory.go rename to internal/static/traces/noopreceiver/factory.go diff --git a/pkg/traces/noopreceiver/receiver.go b/internal/static/traces/noopreceiver/receiver.go similarity index 100% rename from pkg/traces/noopreceiver/receiver.go rename to internal/static/traces/noopreceiver/receiver.go diff --git a/pkg/traces/promsdprocessor/consumer/consumer.go b/internal/static/traces/promsdprocessor/consumer/consumer.go similarity index 99% rename from pkg/traces/promsdprocessor/consumer/consumer.go rename to internal/static/traces/promsdprocessor/consumer/consumer.go index f24e5f9fe1..a5825196d6 100644 --- a/pkg/traces/promsdprocessor/consumer/consumer.go +++ b/internal/static/traces/promsdprocessor/consumer/consumer.go @@ -9,7 +9,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" "github.com/prometheus/common/model" "go.opentelemetry.io/collector/client" otelcomponent "go.opentelemetry.io/collector/component" diff --git a/pkg/traces/promsdprocessor/consumer/consumer_test.go b/internal/static/traces/promsdprocessor/consumer/consumer_test.go similarity index 98% rename from pkg/traces/promsdprocessor/consumer/consumer_test.go rename to internal/static/traces/promsdprocessor/consumer/consumer_test.go index 73e9b6fd43..87730834d7 100644 --- a/pkg/traces/promsdprocessor/consumer/consumer_test.go +++ b/internal/static/traces/promsdprocessor/consumer/consumer_test.go @@ -5,8 +5,8 @@ import ( "net" "testing" - "github.com/grafana/agent/component/discovery" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/component/discovery" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/client" "go.opentelemetry.io/collector/consumer/consumertest" diff --git a/pkg/traces/promsdprocessor/factory.go b/internal/static/traces/promsdprocessor/factory.go similarity index 100% rename from pkg/traces/promsdprocessor/factory.go rename to internal/static/traces/promsdprocessor/factory.go diff --git a/pkg/traces/promsdprocessor/prom_sd_processor.go b/internal/static/traces/promsdprocessor/prom_sd_processor.go similarity index 96% rename from pkg/traces/promsdprocessor/prom_sd_processor.go rename to internal/static/traces/promsdprocessor/prom_sd_processor.go index 8f7b208f18..c88bfbca33 100644 --- a/pkg/traces/promsdprocessor/prom_sd_processor.go +++ b/internal/static/traces/promsdprocessor/prom_sd_processor.go @@ -6,9 +6,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/component/discovery" - promsdconsumer "github.com/grafana/agent/pkg/traces/promsdprocessor/consumer" - util "github.com/grafana/agent/pkg/util/log" + "github.com/grafana/agent/internal/component/discovery" + promsdconsumer "github.com/grafana/agent/internal/static/traces/promsdprocessor/consumer" + util "github.com/grafana/agent/internal/util/log" "github.com/prometheus/prometheus/config" promdiscovery "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/targetgroup" diff --git a/pkg/traces/promsdprocessor/prom_sd_processor_test.go b/internal/static/traces/promsdprocessor/prom_sd_processor_test.go similarity index 97% rename from pkg/traces/promsdprocessor/prom_sd_processor_test.go rename to internal/static/traces/promsdprocessor/prom_sd_processor_test.go index 04feac2067..1c703a2220 100644 --- a/pkg/traces/promsdprocessor/prom_sd_processor_test.go +++ b/internal/static/traces/promsdprocessor/prom_sd_processor_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/component/discovery" + "github.com/grafana/agent/internal/component/discovery" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/model/relabel" diff --git a/pkg/traces/pushreceiver/factory.go b/internal/static/traces/pushreceiver/factory.go similarity index 100% rename from pkg/traces/pushreceiver/factory.go rename to internal/static/traces/pushreceiver/factory.go diff --git a/pkg/traces/pushreceiver/receiver.go b/internal/static/traces/pushreceiver/receiver.go similarity index 100% rename from pkg/traces/pushreceiver/receiver.go rename to internal/static/traces/pushreceiver/receiver.go diff --git a/pkg/traces/remotewriteexporter/exporter.go b/internal/static/traces/remotewriteexporter/exporter.go similarity index 98% rename from pkg/traces/remotewriteexporter/exporter.go rename to internal/static/traces/remotewriteexporter/exporter.go index 8eaf6a8156..5f99af577a 100644 --- a/pkg/traces/remotewriteexporter/exporter.go +++ b/internal/static/traces/remotewriteexporter/exporter.go @@ -10,9 +10,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/traces/contextkeys" - util "github.com/grafana/agent/pkg/util/log" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/traces/contextkeys" + util "github.com/grafana/agent/internal/util/log" "github.com/prometheus/prometheus/model/labels" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" diff --git a/pkg/traces/remotewriteexporter/exporter_test.go b/internal/static/traces/remotewriteexporter/exporter_test.go similarity index 97% rename from pkg/traces/remotewriteexporter/exporter_test.go rename to internal/static/traces/remotewriteexporter/exporter_test.go index 6ba218ea83..63025ec120 100644 --- a/pkg/traces/remotewriteexporter/exporter_test.go +++ b/internal/static/traces/remotewriteexporter/exporter_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/traces/contextkeys" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/static/traces/contextkeys" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/pkg/traces/remotewriteexporter/factory.go b/internal/static/traces/remotewriteexporter/factory.go similarity index 100% rename from pkg/traces/remotewriteexporter/factory.go rename to internal/static/traces/remotewriteexporter/factory.go diff --git a/pkg/traces/servicegraphprocessor/factory.go b/internal/static/traces/servicegraphprocessor/factory.go similarity index 100% rename from pkg/traces/servicegraphprocessor/factory.go rename to internal/static/traces/servicegraphprocessor/factory.go diff --git a/pkg/traces/servicegraphprocessor/processor.go b/internal/static/traces/servicegraphprocessor/processor.go similarity index 99% rename from pkg/traces/servicegraphprocessor/processor.go rename to internal/static/traces/servicegraphprocessor/processor.go index 1d894079f0..b99648f38e 100644 --- a/pkg/traces/servicegraphprocessor/processor.go +++ b/internal/static/traces/servicegraphprocessor/processor.go @@ -8,7 +8,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - util "github.com/grafana/agent/pkg/util/log" + util "github.com/grafana/agent/internal/util/log" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/pdata/ptrace" diff --git a/pkg/traces/servicegraphprocessor/processor_test.go b/internal/static/traces/servicegraphprocessor/processor_test.go similarity index 99% rename from pkg/traces/servicegraphprocessor/processor_test.go rename to internal/static/traces/servicegraphprocessor/processor_test.go index 935aed9232..d2ba70f4b0 100644 --- a/pkg/traces/servicegraphprocessor/processor_test.go +++ b/internal/static/traces/servicegraphprocessor/processor_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/traces/traceutils" + "github.com/grafana/agent/internal/static/traces/traceutils" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" diff --git a/pkg/traces/servicegraphprocessor/store.go b/internal/static/traces/servicegraphprocessor/store.go similarity index 100% rename from pkg/traces/servicegraphprocessor/store.go rename to internal/static/traces/servicegraphprocessor/store.go diff --git a/pkg/traces/servicegraphprocessor/store_test.go b/internal/static/traces/servicegraphprocessor/store_test.go similarity index 100% rename from pkg/traces/servicegraphprocessor/store_test.go rename to internal/static/traces/servicegraphprocessor/store_test.go diff --git a/pkg/traces/servicegraphprocessor/testdata/trace-sample.json b/internal/static/traces/servicegraphprocessor/testdata/trace-sample.json similarity index 100% rename from pkg/traces/servicegraphprocessor/testdata/trace-sample.json rename to internal/static/traces/servicegraphprocessor/testdata/trace-sample.json diff --git a/pkg/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json b/internal/static/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json similarity index 100% rename from pkg/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json rename to internal/static/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json diff --git a/pkg/traces/traces.go b/internal/static/traces/traces.go similarity index 94% rename from pkg/traces/traces.go rename to internal/static/traces/traces.go index 2591a78de7..3226e8084d 100644 --- a/pkg/traces/traces.go +++ b/internal/static/traces/traces.go @@ -5,9 +5,9 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/logs" - "github.com/grafana/agent/pkg/metrics/instance" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/internal/util/zapadapter" prom_client "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" ) diff --git a/pkg/traces/traces_test.go b/internal/static/traces/traces_test.go similarity index 96% rename from pkg/traces/traces_test.go rename to internal/static/traces/traces_test.go index 8bb862028a..5fc3fa4d88 100644 --- a/pkg/traces/traces_test.go +++ b/internal/static/traces/traces_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/server" - "github.com/grafana/agent/pkg/traces/traceutils" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/internal/static/traces/traceutils" + "github.com/grafana/agent/internal/util" "github.com/grafana/dskit/log" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" diff --git a/pkg/traces/traceutils/otel_meter_settings.go b/internal/static/traces/traceutils/otel_meter_settings.go similarity index 100% rename from pkg/traces/traceutils/otel_meter_settings.go rename to internal/static/traces/traceutils/otel_meter_settings.go diff --git a/pkg/traces/traceutils/server.go b/internal/static/traces/traceutils/server.go similarity index 99% rename from pkg/traces/traceutils/server.go rename to internal/static/traces/traceutils/server.go index 2c484e3c08..f22c445953 100644 --- a/pkg/traces/traceutils/server.go +++ b/internal/static/traces/traceutils/server.go @@ -8,7 +8,7 @@ import ( "testing" "time" - "github.com/grafana/agent/pkg/util" + "github.com/grafana/agent/internal/util" "github.com/stretchr/testify/assert" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/confmap" diff --git a/docs/generator/compatible_components_page.go b/internal/tools/docs_generator/compatible_components_page.go similarity index 97% rename from docs/generator/compatible_components_page.go rename to internal/tools/docs_generator/compatible_components_page.go index e796c73866..960294ea4b 100644 --- a/docs/generator/compatible_components_page.go +++ b/internal/tools/docs_generator/compatible_components_page.go @@ -1,11 +1,11 @@ -package generator +package docs_generator import ( "fmt" "sort" "strings" - "github.com/grafana/agent/component/metadata" + "github.com/grafana/agent/internal/component/metadata" "golang.org/x/exp/maps" ) diff --git a/docs/generator/docs_generator.go b/internal/tools/docs_generator/docs_generator.go similarity index 94% rename from docs/generator/docs_generator.go rename to internal/tools/docs_generator/docs_generator.go index c4012cc14d..071f80eb50 100644 --- a/docs/generator/docs_generator.go +++ b/internal/tools/docs_generator/docs_generator.go @@ -1,12 +1,12 @@ -package generator +package docs_generator import ( "bytes" "fmt" "os" - "github.com/grafana/agent/component" - "github.com/grafana/agent/component/metadata" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/component/metadata" ) type DocsGenerator interface { diff --git a/docs/docs_updated_test.go b/internal/tools/docs_generator/docs_updated_test.go similarity index 83% rename from docs/docs_updated_test.go rename to internal/tools/docs_generator/docs_updated_test.go index a3c17e98b3..e21822d7c0 100644 --- a/docs/docs_updated_test.go +++ b/internal/tools/docs_generator/docs_updated_test.go @@ -1,19 +1,22 @@ //go:build !windows -package docs +package docs_generator_test import ( "flag" + "path/filepath" "strings" "testing" - "github.com/grafana/agent/component" - _ "github.com/grafana/agent/component/all" - "github.com/grafana/agent/component/metadata" - "github.com/grafana/agent/docs/generator" + "github.com/grafana/agent/internal/component" + _ "github.com/grafana/agent/internal/component/all" + "github.com/grafana/agent/internal/component/metadata" + generator "github.com/grafana/agent/internal/tools/docs_generator" "github.com/stretchr/testify/require" ) +var moduleRoot = "../../../" + // Run the below generate command to automatically update the Markdown docs with generated content //go:generate go test -fix-tests -v @@ -28,7 +31,7 @@ func TestLinksToTypesSectionsUpdated(t *testing.T) { } func TestCompatibleComponentsPageUpdated(t *testing.T) { - path := "sources/flow/reference/compatibility/_index.md" + path := filepath.Join(moduleRoot, "docs/sources/flow/reference/compatibility/_index.md") for _, typ := range metadata.AllTypes { t.Run(typ.Name, func(t *testing.T) { t.Run("exporters", func(t *testing.T) { diff --git a/docs/generator/links_to_types.go b/internal/tools/docs_generator/links_to_types.go similarity index 95% rename from docs/generator/links_to_types.go rename to internal/tools/docs_generator/links_to_types.go index f9eff0a784..4c92c0b23e 100644 --- a/docs/generator/links_to_types.go +++ b/internal/tools/docs_generator/links_to_types.go @@ -1,11 +1,11 @@ -package generator +package docs_generator import ( "fmt" "regexp" "strings" - "github.com/grafana/agent/component/metadata" + "github.com/grafana/agent/internal/component/metadata" ) type LinksToTypesGenerator struct { @@ -76,7 +76,7 @@ func (l *LinksToTypesGenerator) endMarker() string { } func (l *LinksToTypesGenerator) pathToComponentMarkdown() string { - return fmt.Sprintf("sources/flow/reference/components/%s.md", l.component) + return fmt.Sprintf("../../../docs/sources/flow/reference/components/%s.md", l.component) } func outputComponentsSection(name string, meta metadata.Metadata) string { diff --git a/packaging/agent_linux_packages_test.go b/internal/tools/packaging_test/agent_linux_packages_test.go similarity index 98% rename from packaging/agent_linux_packages_test.go rename to internal/tools/packaging_test/agent_linux_packages_test.go index 9649bf2f00..280d963426 100644 --- a/packaging/agent_linux_packages_test.go +++ b/internal/tools/packaging_test/agent_linux_packages_test.go @@ -58,7 +58,7 @@ func buildAgentPackages(t *testing.T) { wd, err := os.Getwd() require.NoError(t, err) - root, err := filepath.Abs(filepath.Join(wd, "..")) + root, err := filepath.Abs(filepath.Join(wd, "../../..")) require.NoError(t, err) cmd := exec.Command("make", fmt.Sprintf("dist-agent-packages-%s", runtime.GOARCH)) diff --git a/packaging/environment_test.go b/internal/tools/packaging_test/environment_test.go similarity index 96% rename from packaging/environment_test.go rename to internal/tools/packaging_test/environment_test.go index 56ad72b576..ec62cbfbe9 100644 --- a/packaging/environment_test.go +++ b/internal/tools/packaging_test/environment_test.go @@ -38,7 +38,7 @@ func RPMEnvironment(t *testing.T, packageName string, pool *dockertest.Pool) Env pool, "testdata/centos-systemd.Dockerfile", packageName+"-test-centos-systemd", - fmt.Sprintf("../dist/%s-0.0.0-1.%s.rpm", packageName, runtime.GOARCH), + fmt.Sprintf("../../../dist/%s-0.0.0-1.%s.rpm", packageName, runtime.GOARCH), ) return Environment{ @@ -64,7 +64,7 @@ func DEBEnvironment(t *testing.T, packageName string, pool *dockertest.Pool) Env pool, "testdata/debian-systemd.Dockerfile", packageName+"-test-debian-systemd", - fmt.Sprintf("../dist/%s-0.0.0-1.%s.deb", packageName, runtime.GOARCH), + fmt.Sprintf("../../../dist/%s-0.0.0-1.%s.deb", packageName, runtime.GOARCH), ) return Environment{ diff --git a/packaging/flow_linux_packages_test.go b/internal/tools/packaging_test/flow_linux_packages_test.go similarity index 98% rename from packaging/flow_linux_packages_test.go rename to internal/tools/packaging_test/flow_linux_packages_test.go index 75a5c569bb..2f449ac3b4 100644 --- a/packaging/flow_linux_packages_test.go +++ b/internal/tools/packaging_test/flow_linux_packages_test.go @@ -58,7 +58,7 @@ func buildFlowPackages(t *testing.T) { wd, err := os.Getwd() require.NoError(t, err) - root, err := filepath.Abs(filepath.Join(wd, "..")) + root, err := filepath.Abs(filepath.Join(wd, "../../..")) require.NoError(t, err) cmd := exec.Command("make", fmt.Sprintf("dist-agent-flow-packages-%s", runtime.GOARCH)) diff --git a/packaging/testdata/centos-systemd.Dockerfile b/internal/tools/packaging_test/testdata/centos-systemd.Dockerfile similarity index 100% rename from packaging/testdata/centos-systemd.Dockerfile rename to internal/tools/packaging_test/testdata/centos-systemd.Dockerfile diff --git a/packaging/testdata/debian-systemd.Dockerfile b/internal/tools/packaging_test/testdata/debian-systemd.Dockerfile similarity index 100% rename from packaging/testdata/debian-systemd.Dockerfile rename to internal/tools/packaging_test/testdata/debian-systemd.Dockerfile diff --git a/pkg/usagestats/reporter.go b/internal/usagestats/reporter.go similarity index 100% rename from pkg/usagestats/reporter.go rename to internal/usagestats/reporter.go diff --git a/pkg/usagestats/reporter_test.go b/internal/usagestats/reporter_test.go similarity index 100% rename from pkg/usagestats/reporter_test.go rename to internal/usagestats/reporter_test.go diff --git a/pkg/usagestats/stats.go b/internal/usagestats/stats.go similarity index 100% rename from pkg/usagestats/stats.go rename to internal/usagestats/stats.go diff --git a/internal/useragent/useragent.go b/internal/useragent/useragent.go index 8150d5d8ba..1c6739fb50 100644 --- a/internal/useragent/useragent.go +++ b/internal/useragent/useragent.go @@ -9,7 +9,7 @@ import ( "runtime" "strings" - "github.com/grafana/agent/pkg/build" + "github.com/grafana/agent/internal/build" ) const ( diff --git a/internal/useragent/useragent_test.go b/internal/useragent/useragent_test.go index b242a17e42..6a94fe0b28 100644 --- a/internal/useragent/useragent_test.go +++ b/internal/useragent/useragent_test.go @@ -3,7 +3,7 @@ package useragent import ( "testing" - "github.com/grafana/agent/pkg/build" + "github.com/grafana/agent/internal/build" "github.com/stretchr/testify/require" ) diff --git a/pkg/util/compare_yaml.go b/internal/util/compare_yaml.go similarity index 100% rename from pkg/util/compare_yaml.go rename to internal/util/compare_yaml.go diff --git a/pkg/util/compare_yaml_test.go b/internal/util/compare_yaml_test.go similarity index 100% rename from pkg/util/compare_yaml_test.go rename to internal/util/compare_yaml_test.go diff --git a/pkg/util/defaults.go b/internal/util/defaults.go similarity index 100% rename from pkg/util/defaults.go rename to internal/util/defaults.go diff --git a/pkg/util/eventually.go b/internal/util/eventually.go similarity index 100% rename from pkg/util/eventually.go rename to internal/util/eventually.go diff --git a/pkg/util/eventually_test.go b/internal/util/eventually_test.go similarity index 100% rename from pkg/util/eventually_test.go rename to internal/util/eventually_test.go diff --git a/pkg/util/k8s/k8s.go b/internal/util/k8s/k8s.go similarity index 97% rename from pkg/util/k8s/k8s.go rename to internal/util/k8s/k8s.go index e73a3abe7d..c1c883cb82 100644 --- a/pkg/util/k8s/k8s.go +++ b/internal/util/k8s/k8s.go @@ -6,7 +6,7 @@ import ( "fmt" "log" - gragent "github.com/grafana/agent/pkg/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" promop_v1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" "github.com/testcontainers/testcontainers-go/modules/k3s" apiextensions_v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" diff --git a/pkg/util/k8s/k8s_test.go b/internal/util/k8s/k8s_test.go similarity index 100% rename from pkg/util/k8s/k8s_test.go rename to internal/util/k8s/k8s_test.go diff --git a/pkg/util/k8s/objects.go b/internal/util/k8s/objects.go similarity index 100% rename from pkg/util/k8s/objects.go rename to internal/util/k8s/objects.go diff --git a/pkg/util/k8s/resources.go b/internal/util/k8s/resources.go similarity index 100% rename from pkg/util/k8s/resources.go rename to internal/util/k8s/resources.go diff --git a/pkg/util/log/log.go b/internal/util/log/log.go similarity index 100% rename from pkg/util/log/log.go rename to internal/util/log/log.go diff --git a/pkg/util/metrics.go b/internal/util/metrics.go similarity index 100% rename from pkg/util/metrics.go rename to internal/util/metrics.go diff --git a/pkg/util/otel_feature_gate.go b/internal/util/otel_feature_gate.go similarity index 100% rename from pkg/util/otel_feature_gate.go rename to internal/util/otel_feature_gate.go diff --git a/pkg/util/otel_feature_gate_test.go b/internal/util/otel_feature_gate_test.go similarity index 100% rename from pkg/util/otel_feature_gate_test.go rename to internal/util/otel_feature_gate_test.go diff --git a/pkg/util/strings.go b/internal/util/strings.go similarity index 100% rename from pkg/util/strings.go rename to internal/util/strings.go diff --git a/pkg/util/structwalk/structwalk.go b/internal/util/structwalk/structwalk.go similarity index 100% rename from pkg/util/structwalk/structwalk.go rename to internal/util/structwalk/structwalk.go diff --git a/pkg/util/structwalk/structwalk_test.go b/internal/util/structwalk/structwalk_test.go similarity index 100% rename from pkg/util/structwalk/structwalk_test.go rename to internal/util/structwalk/structwalk_test.go diff --git a/pkg/util/subset/subset.go b/internal/util/subset/subset.go similarity index 100% rename from pkg/util/subset/subset.go rename to internal/util/subset/subset.go diff --git a/pkg/util/subset/subset_test.go b/internal/util/subset/subset_test.go similarity index 100% rename from pkg/util/subset/subset_test.go rename to internal/util/subset/subset_test.go diff --git a/pkg/util/test_logger.go b/internal/util/test_logger.go similarity index 94% rename from pkg/util/test_logger.go rename to internal/util/test_logger.go index 739d178cba..a158953af2 100644 --- a/pkg/util/test_logger.go +++ b/internal/util/test_logger.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/pkg/flow/logging" + "github.com/grafana/agent/internal/flow/logging" "github.com/stretchr/testify/require" ) diff --git a/pkg/util/testappender/compare.go b/internal/util/testappender/compare.go similarity index 100% rename from pkg/util/testappender/compare.go rename to internal/util/testappender/compare.go diff --git a/pkg/util/testappender/internal/dtobuilder/dtobuilder.go b/internal/util/testappender/internal/dtobuilder/dtobuilder.go similarity index 100% rename from pkg/util/testappender/internal/dtobuilder/dtobuilder.go rename to internal/util/testappender/internal/dtobuilder/dtobuilder.go diff --git a/pkg/util/testappender/internal/dtobuilder/sort.go b/internal/util/testappender/internal/dtobuilder/sort.go similarity index 100% rename from pkg/util/testappender/internal/dtobuilder/sort.go rename to internal/util/testappender/internal/dtobuilder/sort.go diff --git a/pkg/util/testappender/testappender.go b/internal/util/testappender/testappender.go similarity index 98% rename from pkg/util/testappender/testappender.go rename to internal/util/testappender/testappender.go index 6d92642096..0417329000 100644 --- a/pkg/util/testappender/testappender.go +++ b/internal/util/testappender/testappender.go @@ -5,7 +5,7 @@ package testappender import ( "fmt" - "github.com/grafana/agent/pkg/util/testappender/internal/dtobuilder" + "github.com/grafana/agent/internal/util/testappender/internal/dtobuilder" dto "github.com/prometheus/client_model/go" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/exemplar" diff --git a/pkg/util/testappender/testappender_test.go b/internal/util/testappender/testappender_test.go similarity index 99% rename from pkg/util/testappender/testappender_test.go rename to internal/util/testappender/testappender_test.go index 3b495414fc..797f4cfde9 100644 --- a/pkg/util/testappender/testappender_test.go +++ b/internal/util/testappender/testappender_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - "github.com/grafana/agent/pkg/util/testappender" + "github.com/grafana/agent/internal/util/testappender" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/model/metadata" diff --git a/pkg/util/trigger.go b/internal/util/trigger.go similarity index 100% rename from pkg/util/trigger.go rename to internal/util/trigger.go diff --git a/pkg/util/trigger_test.go b/internal/util/trigger_test.go similarity index 100% rename from pkg/util/trigger_test.go rename to internal/util/trigger_test.go diff --git a/pkg/util/unchecked_collector.go b/internal/util/unchecked_collector.go similarity index 100% rename from pkg/util/unchecked_collector.go rename to internal/util/unchecked_collector.go diff --git a/pkg/util/unregisterer.go b/internal/util/unregisterer.go similarity index 100% rename from pkg/util/unregisterer.go rename to internal/util/unregisterer.go diff --git a/pkg/util/untab.go b/internal/util/untab.go similarity index 100% rename from pkg/util/untab.go rename to internal/util/untab.go diff --git a/pkg/util/wildcard/match.go b/internal/util/wildcard/match.go similarity index 100% rename from pkg/util/wildcard/match.go rename to internal/util/wildcard/match.go diff --git a/pkg/util/wildcard/match_test.go b/internal/util/wildcard/match_test.go similarity index 99% rename from pkg/util/wildcard/match_test.go rename to internal/util/wildcard/match_test.go index ea9caf59e3..eb0728530b 100644 --- a/pkg/util/wildcard/match_test.go +++ b/internal/util/wildcard/match_test.go @@ -19,7 +19,7 @@ package wildcard_test import ( "testing" - "github.com/grafana/agent/pkg/util/wildcard" + "github.com/grafana/agent/internal/util/wildcard" ) // TestMatch - Tests validate the logic of wild card matching. diff --git a/pkg/util/yaml.go b/internal/util/yaml.go similarity index 100% rename from pkg/util/yaml.go rename to internal/util/yaml.go diff --git a/pkg/util/yaml_test.go b/internal/util/yaml_test.go similarity index 100% rename from pkg/util/yaml_test.go rename to internal/util/yaml_test.go diff --git a/pkg/util/zapadapter/zapadapter.go b/internal/util/zapadapter/zapadapter.go similarity index 100% rename from pkg/util/zapadapter/zapadapter.go rename to internal/util/zapadapter/zapadapter.go diff --git a/pkg/util/zapadapter/zapadapter_test.go b/internal/util/zapadapter/zapadapter_test.go similarity index 98% rename from pkg/util/zapadapter/zapadapter_test.go rename to internal/util/zapadapter/zapadapter_test.go index fc12f13664..c0881ed4ba 100644 --- a/pkg/util/zapadapter/zapadapter_test.go +++ b/internal/util/zapadapter/zapadapter_test.go @@ -10,7 +10,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/pkg/util/zapadapter" + "github.com/grafana/agent/internal/util/zapadapter" "github.com/stretchr/testify/require" "go.uber.org/zap" ) diff --git a/web/api/api.go b/internal/web/api/api.go similarity index 95% rename from web/api/api.go rename to internal/web/api/api.go index f382897f8b..f57806c951 100644 --- a/web/api/api.go +++ b/internal/web/api/api.go @@ -10,9 +10,9 @@ import ( "path" "github.com/gorilla/mux" - "github.com/grafana/agent/component" - "github.com/grafana/agent/service" - "github.com/grafana/agent/service/cluster" + "github.com/grafana/agent/internal/component" + "github.com/grafana/agent/internal/service" + "github.com/grafana/agent/internal/service/cluster" "github.com/prometheus/prometheus/util/httputil" ) diff --git a/web/ui/.env b/internal/web/ui/.env similarity index 100% rename from web/ui/.env rename to internal/web/ui/.env diff --git a/web/ui/.env.production b/internal/web/ui/.env.production similarity index 100% rename from web/ui/.env.production rename to internal/web/ui/.env.production diff --git a/web/ui/.eslintrc.json b/internal/web/ui/.eslintrc.json similarity index 100% rename from web/ui/.eslintrc.json rename to internal/web/ui/.eslintrc.json diff --git a/web/ui/.gitignore b/internal/web/ui/.gitignore similarity index 100% rename from web/ui/.gitignore rename to internal/web/ui/.gitignore diff --git a/web/ui/README.md b/internal/web/ui/README.md similarity index 100% rename from web/ui/README.md rename to internal/web/ui/README.md diff --git a/web/ui/assets_builtin.go b/internal/web/ui/assets_builtin.go similarity index 100% rename from web/ui/assets_builtin.go rename to internal/web/ui/assets_builtin.go diff --git a/web/ui/assets_nobuiltin.go b/internal/web/ui/assets_nobuiltin.go similarity index 72% rename from web/ui/assets_nobuiltin.go rename to internal/web/ui/assets_nobuiltin.go index 008b0b425c..57093195dd 100644 --- a/web/ui/assets_nobuiltin.go +++ b/internal/web/ui/assets_nobuiltin.go @@ -9,6 +9,6 @@ import ( // Assets contains the UI's assets. func Assets() http.FileSystem { - assetsDir := filepath.Join(".", "web", "ui", "build") + assetsDir := filepath.Join(".", "internal", "web", "ui", "build") return http.Dir(assetsDir) } diff --git a/web/ui/package.json b/internal/web/ui/package.json similarity index 100% rename from web/ui/package.json rename to internal/web/ui/package.json diff --git a/web/ui/public/favicon.ico b/internal/web/ui/public/favicon.ico similarity index 100% rename from web/ui/public/favicon.ico rename to internal/web/ui/public/favicon.ico diff --git a/web/ui/public/index.html b/internal/web/ui/public/index.html similarity index 100% rename from web/ui/public/index.html rename to internal/web/ui/public/index.html diff --git a/web/ui/public/manifest.json b/internal/web/ui/public/manifest.json similarity index 100% rename from web/ui/public/manifest.json rename to internal/web/ui/public/manifest.json diff --git a/web/ui/public/robots.txt b/internal/web/ui/public/robots.txt similarity index 100% rename from web/ui/public/robots.txt rename to internal/web/ui/public/robots.txt diff --git a/web/ui/src/App.module.css b/internal/web/ui/src/App.module.css similarity index 100% rename from web/ui/src/App.module.css rename to internal/web/ui/src/App.module.css diff --git a/web/ui/src/App.tsx b/internal/web/ui/src/App.tsx similarity index 100% rename from web/ui/src/App.tsx rename to internal/web/ui/src/App.tsx diff --git a/web/ui/src/Router.tsx b/internal/web/ui/src/Router.tsx similarity index 100% rename from web/ui/src/Router.tsx rename to internal/web/ui/src/Router.tsx diff --git a/web/ui/src/contexts/PathPrefixContext.tsx b/internal/web/ui/src/contexts/PathPrefixContext.tsx similarity index 100% rename from web/ui/src/contexts/PathPrefixContext.tsx rename to internal/web/ui/src/contexts/PathPrefixContext.tsx diff --git a/web/ui/src/features/clustering/PeerList.module.css b/internal/web/ui/src/features/clustering/PeerList.module.css similarity index 100% rename from web/ui/src/features/clustering/PeerList.module.css rename to internal/web/ui/src/features/clustering/PeerList.module.css diff --git a/web/ui/src/features/clustering/PeerList.tsx b/internal/web/ui/src/features/clustering/PeerList.tsx similarity index 100% rename from web/ui/src/features/clustering/PeerList.tsx rename to internal/web/ui/src/features/clustering/PeerList.tsx diff --git a/web/ui/src/features/clustering/Table.module.css b/internal/web/ui/src/features/clustering/Table.module.css similarity index 100% rename from web/ui/src/features/clustering/Table.module.css rename to internal/web/ui/src/features/clustering/Table.module.css diff --git a/web/ui/src/features/clustering/Table.tsx b/internal/web/ui/src/features/clustering/Table.tsx similarity index 100% rename from web/ui/src/features/clustering/Table.tsx rename to internal/web/ui/src/features/clustering/Table.tsx diff --git a/web/ui/src/features/clustering/types.ts b/internal/web/ui/src/features/clustering/types.ts similarity index 100% rename from web/ui/src/features/clustering/types.ts rename to internal/web/ui/src/features/clustering/types.ts diff --git a/web/ui/src/features/component/ComponentBody.tsx b/internal/web/ui/src/features/component/ComponentBody.tsx similarity index 100% rename from web/ui/src/features/component/ComponentBody.tsx rename to internal/web/ui/src/features/component/ComponentBody.tsx diff --git a/web/ui/src/features/component/ComponentList.module.css b/internal/web/ui/src/features/component/ComponentList.module.css similarity index 100% rename from web/ui/src/features/component/ComponentList.module.css rename to internal/web/ui/src/features/component/ComponentList.module.css diff --git a/web/ui/src/features/component/ComponentList.tsx b/internal/web/ui/src/features/component/ComponentList.tsx similarity index 100% rename from web/ui/src/features/component/ComponentList.tsx rename to internal/web/ui/src/features/component/ComponentList.tsx diff --git a/web/ui/src/features/component/ComponentView.module.css b/internal/web/ui/src/features/component/ComponentView.module.css similarity index 100% rename from web/ui/src/features/component/ComponentView.module.css rename to internal/web/ui/src/features/component/ComponentView.module.css diff --git a/web/ui/src/features/component/ComponentView.tsx b/internal/web/ui/src/features/component/ComponentView.tsx similarity index 100% rename from web/ui/src/features/component/ComponentView.tsx rename to internal/web/ui/src/features/component/ComponentView.tsx diff --git a/web/ui/src/features/component/HealthLabel.module.css b/internal/web/ui/src/features/component/HealthLabel.module.css similarity index 100% rename from web/ui/src/features/component/HealthLabel.module.css rename to internal/web/ui/src/features/component/HealthLabel.module.css diff --git a/web/ui/src/features/component/HealthLabel.tsx b/internal/web/ui/src/features/component/HealthLabel.tsx similarity index 100% rename from web/ui/src/features/component/HealthLabel.tsx rename to internal/web/ui/src/features/component/HealthLabel.tsx diff --git a/web/ui/src/features/component/Table.module.css b/internal/web/ui/src/features/component/Table.module.css similarity index 100% rename from web/ui/src/features/component/Table.module.css rename to internal/web/ui/src/features/component/Table.module.css diff --git a/web/ui/src/features/component/Table.tsx b/internal/web/ui/src/features/component/Table.tsx similarity index 100% rename from web/ui/src/features/component/Table.tsx rename to internal/web/ui/src/features/component/Table.tsx diff --git a/web/ui/src/features/component/TableHead.tsx b/internal/web/ui/src/features/component/TableHead.tsx similarity index 100% rename from web/ui/src/features/component/TableHead.tsx rename to internal/web/ui/src/features/component/TableHead.tsx diff --git a/web/ui/src/features/component/style.ts b/internal/web/ui/src/features/component/style.ts similarity index 100% rename from web/ui/src/features/component/style.ts rename to internal/web/ui/src/features/component/style.ts diff --git a/web/ui/src/features/component/types.ts b/internal/web/ui/src/features/component/types.ts similarity index 100% rename from web/ui/src/features/component/types.ts rename to internal/web/ui/src/features/component/types.ts diff --git a/web/ui/src/features/graph/ComponentGraph.tsx b/internal/web/ui/src/features/graph/ComponentGraph.tsx similarity index 100% rename from web/ui/src/features/graph/ComponentGraph.tsx rename to internal/web/ui/src/features/graph/ComponentGraph.tsx diff --git a/web/ui/src/features/layout/Navbar.module.css b/internal/web/ui/src/features/layout/Navbar.module.css similarity index 100% rename from web/ui/src/features/layout/Navbar.module.css rename to internal/web/ui/src/features/layout/Navbar.module.css diff --git a/web/ui/src/features/layout/Navbar.tsx b/internal/web/ui/src/features/layout/Navbar.tsx similarity index 100% rename from web/ui/src/features/layout/Navbar.tsx rename to internal/web/ui/src/features/layout/Navbar.tsx diff --git a/web/ui/src/features/layout/Page.module.css b/internal/web/ui/src/features/layout/Page.module.css similarity index 100% rename from web/ui/src/features/layout/Page.module.css rename to internal/web/ui/src/features/layout/Page.module.css diff --git a/web/ui/src/features/layout/Page.tsx b/internal/web/ui/src/features/layout/Page.tsx similarity index 100% rename from web/ui/src/features/layout/Page.tsx rename to internal/web/ui/src/features/layout/Page.tsx diff --git a/web/ui/src/features/river-js/RiverValue.module.css b/internal/web/ui/src/features/river-js/RiverValue.module.css similarity index 100% rename from web/ui/src/features/river-js/RiverValue.module.css rename to internal/web/ui/src/features/river-js/RiverValue.module.css diff --git a/web/ui/src/features/river-js/RiverValue.tsx b/internal/web/ui/src/features/river-js/RiverValue.tsx similarity index 100% rename from web/ui/src/features/river-js/RiverValue.tsx rename to internal/web/ui/src/features/river-js/RiverValue.tsx diff --git a/web/ui/src/features/river-js/stringify.ts b/internal/web/ui/src/features/river-js/stringify.ts similarity index 100% rename from web/ui/src/features/river-js/stringify.ts rename to internal/web/ui/src/features/river-js/stringify.ts diff --git a/web/ui/src/features/river-js/types.ts b/internal/web/ui/src/features/river-js/types.ts similarity index 100% rename from web/ui/src/features/river-js/types.ts rename to internal/web/ui/src/features/river-js/types.ts diff --git a/web/ui/src/hooks/componentInfo.tsx b/internal/web/ui/src/hooks/componentInfo.tsx similarity index 100% rename from web/ui/src/hooks/componentInfo.tsx rename to internal/web/ui/src/hooks/componentInfo.tsx diff --git a/web/ui/src/hooks/peerInfo.tsx b/internal/web/ui/src/hooks/peerInfo.tsx similarity index 100% rename from web/ui/src/hooks/peerInfo.tsx rename to internal/web/ui/src/hooks/peerInfo.tsx diff --git a/web/ui/src/images/logo.svg b/internal/web/ui/src/images/logo.svg similarity index 100% rename from web/ui/src/images/logo.svg rename to internal/web/ui/src/images/logo.svg diff --git a/web/ui/src/index.css b/internal/web/ui/src/index.css similarity index 100% rename from web/ui/src/index.css rename to internal/web/ui/src/index.css diff --git a/web/ui/src/index.tsx b/internal/web/ui/src/index.tsx similarity index 100% rename from web/ui/src/index.tsx rename to internal/web/ui/src/index.tsx diff --git a/web/ui/src/pages/Clustering.tsx b/internal/web/ui/src/pages/Clustering.tsx similarity index 100% rename from web/ui/src/pages/Clustering.tsx rename to internal/web/ui/src/pages/Clustering.tsx diff --git a/web/ui/src/pages/ComponentDetailPage.tsx b/internal/web/ui/src/pages/ComponentDetailPage.tsx similarity index 100% rename from web/ui/src/pages/ComponentDetailPage.tsx rename to internal/web/ui/src/pages/ComponentDetailPage.tsx diff --git a/web/ui/src/pages/Graph.tsx b/internal/web/ui/src/pages/Graph.tsx similarity index 100% rename from web/ui/src/pages/Graph.tsx rename to internal/web/ui/src/pages/Graph.tsx diff --git a/web/ui/src/pages/PageComponentList.tsx b/internal/web/ui/src/pages/PageComponentList.tsx similarity index 100% rename from web/ui/src/pages/PageComponentList.tsx rename to internal/web/ui/src/pages/PageComponentList.tsx diff --git a/web/ui/src/react-app-env.d.ts b/internal/web/ui/src/react-app-env.d.ts similarity index 100% rename from web/ui/src/react-app-env.d.ts rename to internal/web/ui/src/react-app-env.d.ts diff --git a/web/ui/src/static/fonts.css b/internal/web/ui/src/static/fonts.css similarity index 100% rename from web/ui/src/static/fonts.css rename to internal/web/ui/src/static/fonts.css diff --git a/web/ui/src/static/fonts/fira-code-v21-latin-500.woff2 b/internal/web/ui/src/static/fonts/fira-code-v21-latin-500.woff2 similarity index 100% rename from web/ui/src/static/fonts/fira-code-v21-latin-500.woff2 rename to internal/web/ui/src/static/fonts/fira-code-v21-latin-500.woff2 diff --git a/web/ui/src/static/fonts/fira-code-v21-latin-regular.woff2 b/internal/web/ui/src/static/fonts/fira-code-v21-latin-regular.woff2 similarity index 100% rename from web/ui/src/static/fonts/fira-code-v21-latin-regular.woff2 rename to internal/web/ui/src/static/fonts/fira-code-v21-latin-regular.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-100.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-100.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-100.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-100.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-100italic.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-100italic.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-100italic.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-100italic.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-300.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-300.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-300.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-300.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-300italic.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-300italic.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-300italic.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-300italic.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-500.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-500.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-500.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-500.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-500italic.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-500italic.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-500italic.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-500italic.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-700.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-700.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-700.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-700.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-700italic.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-700italic.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-700italic.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-700italic.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-900.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-900.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-900.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-900.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-900italic.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-900italic.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-900italic.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-900italic.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-italic.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-italic.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-italic.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-italic.woff2 diff --git a/web/ui/src/static/fonts/roboto-v30-latin-regular.woff2 b/internal/web/ui/src/static/fonts/roboto-v30-latin-regular.woff2 similarity index 100% rename from web/ui/src/static/fonts/roboto-v30-latin-regular.woff2 rename to internal/web/ui/src/static/fonts/roboto-v30-latin-regular.woff2 diff --git a/web/ui/src/utils/id.ts b/internal/web/ui/src/utils/id.ts similarity index 100% rename from web/ui/src/utils/id.ts rename to internal/web/ui/src/utils/id.ts diff --git a/web/ui/src/utils/partition.ts b/internal/web/ui/src/utils/partition.ts similarity index 100% rename from web/ui/src/utils/partition.ts rename to internal/web/ui/src/utils/partition.ts diff --git a/web/ui/tsconfig.json b/internal/web/ui/tsconfig.json similarity index 100% rename from web/ui/tsconfig.json rename to internal/web/ui/tsconfig.json diff --git a/web/ui/ui.go b/internal/web/ui/ui.go similarity index 96% rename from web/ui/ui.go rename to internal/web/ui/ui.go index bb616c5a26..82a910415f 100644 --- a/web/ui/ui.go +++ b/internal/web/ui/ui.go @@ -21,9 +21,9 @@ import ( // Grafana Agent Flow UI. The UI will be served relative to pathPrefix. If no // pathPrefix is specified, the UI will be served at root. // -// By default, the UI is retrieved from the ./web/ui/build directory relative -// to working directory, assuming that the Agent is run from the repo root. -// However, if the builtinassets Go tag is present, the built UI will be +// By default, the UI is retrieved from the ./internal/web/ui/build directory +// relative to working directory, assuming that the Agent is run from the repo +// root. However, if the builtinassets Go tag is present, the built UI will be // embedded into the binary; run go generate -tags builtinassets for this // package to generate the assets to embed. // diff --git a/web/ui/yarn.lock b/internal/web/ui/yarn.lock similarity index 100% rename from web/ui/yarn.lock rename to internal/web/ui/yarn.lock diff --git a/pkg/integrations/install/install.go b/pkg/integrations/install/install.go deleted file mode 100644 index 617735573f..0000000000 --- a/pkg/integrations/install/install.go +++ /dev/null @@ -1,48 +0,0 @@ -// Package install registers all in-source integrations for use. -package install - -import ( - // - // v1 integrations - // - - _ "github.com/grafana/agent/pkg/integrations/agent" // register agent - _ "github.com/grafana/agent/pkg/integrations/apache_http" // register apache_exporter - _ "github.com/grafana/agent/pkg/integrations/azure_exporter" // register azure_exporter - _ "github.com/grafana/agent/pkg/integrations/blackbox_exporter" // register blackbox_exporter - _ "github.com/grafana/agent/pkg/integrations/cadvisor" // register cadvisor - _ "github.com/grafana/agent/pkg/integrations/cloudwatch_exporter" // register cloudwatch_exporter - _ "github.com/grafana/agent/pkg/integrations/consul_exporter" // register consul_exporter - _ "github.com/grafana/agent/pkg/integrations/dnsmasq_exporter" // register dnsmasq_exporter - _ "github.com/grafana/agent/pkg/integrations/elasticsearch_exporter" // register elasticsearch_exporter - _ "github.com/grafana/agent/pkg/integrations/gcp_exporter" // register gcp_exporter - _ "github.com/grafana/agent/pkg/integrations/github_exporter" // register github_exporter - _ "github.com/grafana/agent/pkg/integrations/kafka_exporter" // register kafka_exporter - _ "github.com/grafana/agent/pkg/integrations/memcached_exporter" // register memcached_exporter - _ "github.com/grafana/agent/pkg/integrations/mongodb_exporter" // register mongodb_exporter - _ "github.com/grafana/agent/pkg/integrations/mssql" // register mssql - _ "github.com/grafana/agent/pkg/integrations/mysqld_exporter" // register mysqld_exporter - _ "github.com/grafana/agent/pkg/integrations/node_exporter" // register node_exporter - _ "github.com/grafana/agent/pkg/integrations/oracledb_exporter" // register oracledb_exporter - _ "github.com/grafana/agent/pkg/integrations/postgres_exporter" // register postgres_exporter - _ "github.com/grafana/agent/pkg/integrations/process_exporter" // register process_exporter - _ "github.com/grafana/agent/pkg/integrations/redis_exporter" // register redis_exporter - _ "github.com/grafana/agent/pkg/integrations/snmp_exporter" // register snmp_exporter - _ "github.com/grafana/agent/pkg/integrations/snowflake_exporter" // register snowflake_exporter - _ "github.com/grafana/agent/pkg/integrations/squid_exporter" // register squid_exporter - _ "github.com/grafana/agent/pkg/integrations/statsd_exporter" // register statsd_exporter - _ "github.com/grafana/agent/pkg/integrations/vmware_exporter" // register vmware_exporter - _ "github.com/grafana/agent/pkg/integrations/windows_exporter" // register windows_exporter - - // - // v2 integrations - // - - _ "github.com/grafana/agent/pkg/integrations/v2/agent" // register agent - _ "github.com/grafana/agent/pkg/integrations/v2/apache_http" // register apache_exporter - _ "github.com/grafana/agent/pkg/integrations/v2/app_agent_receiver" // register app_agent_receiver - _ "github.com/grafana/agent/pkg/integrations/v2/blackbox_exporter" // register blackbox_exporter - _ "github.com/grafana/agent/pkg/integrations/v2/eventhandler" // register eventhandler - _ "github.com/grafana/agent/pkg/integrations/v2/snmp_exporter" // register snmp_exporter - _ "github.com/grafana/agent/pkg/integrations/v2/vmware_exporter" // register vmware_exporter -) diff --git a/tools/gen-crd-docs/config.json b/tools/gen-crd-docs/config.json index 2108cc655f..8ae1e273e8 100644 --- a/tools/gen-crd-docs/config.json +++ b/tools/gen-crd-docs/config.json @@ -32,8 +32,8 @@ "docsURLTemplate": "https://pkg.go.dev/sigs.k8s.io/controller-runtime/pkg/client#Object" }, { - "typeMatchPrefix": "^github\\.com/grafana/agent/pkg/operator/assets\\.SecretStore$", - "docsURLTemplate": "https://pkg.go.dev/github.com/grafana/agent/pkg/operator/assets#SecretStore" + "typeMatchPrefix": "^github\\.com/grafana/agent/internal/static/operator/assets\\.SecretStore$", + "docsURLTemplate": "https://pkg.go.dev/github.com/grafana/agent/internal/static/operator/assets#SecretStore" } ], "typeDisplayNamePrefixOverrides": { @@ -42,4 +42,4 @@ }, "markdownDisabled": false } - \ No newline at end of file + diff --git a/tools/generate-crds.bash b/tools/generate-crds.bash index c081dcc8b0..6bf999ce52 100755 --- a/tools/generate-crds.bash +++ b/tools/generate-crds.bash @@ -4,7 +4,7 @@ ROOT=$(git rev-parse --show-toplevel) # Generate objects and controllers for our CRDs -cd $ROOT/pkg/operator/apis/monitoring/v1alpha1 +cd $ROOT/internal/static/operator/apis/monitoring/v1alpha1 controller-gen object paths=. controller-gen crd:crdVersions=v1,maxDescLen=0 paths=. output:crd:dir=$ROOT/operations/agent-static-operator/crds