diff --git a/Makefile b/Makefile index c40a6c13b9ac..de269cddce1d 100644 --- a/Makefile +++ b/Makefile @@ -163,7 +163,7 @@ 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) ./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 + $(GO_ENV) go test $(GO_FLAGS) ./static/integrations/node_exporter ./static/logs ./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) @@ -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/internal/static/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/static/operator/apis/monitoring/" -out-file docs/sources/operator/api.md -template-dir tools/gen-crd-docs/template endif generate-drone: @@ -304,7 +304,7 @@ generate-protos: ifeq ($(USE_CONTAINER),1) $(RERUN_IN_CONTAINER) else - go generate ./internal/static/agentproto/ + go generate ./static/agentproto/ endif generate-ui: diff --git a/cmd/grafana-agent-flow/main.go b/cmd/grafana-agent-flow/main.go index 6ba087e38f28..a9a2c870dea0 100644 --- a/cmd/grafana-agent-flow/main.go +++ b/cmd/grafana-agent-flow/main.go @@ -16,7 +16,7 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Register integrations - _ "github.com/grafana/agent/internal/static/integrations/install" + _ "github.com/grafana/agent/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 c857af1f61d7..a406639ac740 100644 --- a/cmd/grafana-agent-operator/main.go +++ b/cmd/grafana-agent-operator/main.go @@ -8,9 +8,9 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "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" + "github.com/grafana/agent/static/operator" + "github.com/grafana/agent/static/operator/logutil" controller "sigs.k8s.io/controller-runtime" // Needed for clients. diff --git a/cmd/grafana-agent/entrypoint.go b/cmd/grafana-agent/entrypoint.go index ea7b9a0eb3e2..a0a8341952f4 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/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/agent/static/config" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/static/metrics" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/server" + "github.com/grafana/agent/static/supportbundle" + "github.com/grafana/agent/static/traces" "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 750cecead24f..7539d512341e 100644 --- a/cmd/grafana-agent/main.go +++ b/cmd/grafana-agent/main.go @@ -9,9 +9,9 @@ import ( "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/grafana/agent/static/config" + "github.com/grafana/agent/static/server" "github.com/prometheus/client_golang/prometheus" @@ -20,7 +20,7 @@ import ( _ "github.com/prometheus/prometheus/discovery/install" // Register integrations - _ "github.com/grafana/agent/internal/static/integrations/install" + _ "github.com/grafana/agent/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 1c94c71272b0..d65a9e578dce 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/internal/static/config" - "github.com/grafana/agent/internal/static/server" util_log "github.com/grafana/agent/internal/util/log" + "github.com/grafana/agent/static/config" + "github.com/grafana/agent/static/server" "golang.org/x/sys/windows/svc" ) diff --git a/cmd/grafana-agentctl/main.go b/cmd/grafana-agentctl/main.go index 5022e50770e9..127f61d6df26 100644 --- a/cmd/grafana-agentctl/main.go +++ b/cmd/grafana-agentctl/main.go @@ -13,23 +13,23 @@ import ( "syscall" "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/grafana/agent/static/agentctl/waltools" + "github.com/grafana/agent/static/config" + "github.com/grafana/agent/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/internal/static/agentctl" - "github.com/grafana/agent/internal/static/client" + "github.com/grafana/agent/static/agentctl" + "github.com/grafana/agent/static/client" "github.com/spf13/cobra" // Register Prometheus SD components _ "github.com/prometheus/prometheus/discovery/install" // Register integrations - _ "github.com/grafana/agent/internal/static/integrations/install" + _ "github.com/grafana/agent/static/integrations/install" // Needed for operator-detach "k8s.io/apimachinery/pkg/fields" diff --git a/docs/Makefile b/docs/Makefile index e015240cc7a1..5e2bd70ee46c 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.22.1-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.22.1-bullseye go run internal/static/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.22.1-bullseye go run 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.22.1-bullseye go run 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.22.1-bullseye go run internal/static/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.22.1-bullseye go run 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/flow/reference/components/prometheus.exporter.unix.md b/docs/sources/flow/reference/components/prometheus.exporter.unix.md index f6adb8599e67..1917b510d7cc 100644 --- a/docs/sources/flow/reference/components/prometheus.exporter.unix.md +++ b/docs/sources/flow/reference/components/prometheus.exporter.unix.md @@ -135,7 +135,7 @@ The following blocks are supported inside the definition of ### filesystem block -The default values can vary by the operating system the agent runs on - refer to the [integration source](https://github.com/grafana/agent/blob/main/internal/static/integrations/node_exporter/config.go) for up-to-date values on each OS. +The default values can vary by the operating system the agent runs on - refer to the [integration source](https://github.com/grafana/agent/blob/main/static/integrations/node_exporter/config.go) for up-to-date values on each OS. | Name | Type | Description | Default | Required | | ---------------------- | ---------- | ------------------------------------------------------------------- | ----------------------------------------------- | -------- | diff --git a/docs/sources/operator/api.md b/docs/sources/operator/api.md index 04df805f7370..e2aa26ffd9b7 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/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. | +|`Secrets`
_[github.com/grafana/agent/static/operator/assets.SecretStore](https://pkg.go.dev/github.com/grafana/agent/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/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. | +|`metrics`
_[map[string]github.com/grafana/agent/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 1f6715e9d72e..708df3f83ecb 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/internal/static/supportbundle) +In addition, you can inspect the [supportbundle package](https://github.com/grafana/agent/tree/main/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 2f331d6d6938..c49f37e72c9c 100644 --- a/docs/sources/static/configuration/integrations/integrations-next/snmp-config.md +++ b/docs/sources/static/configuration/integrations/integrations-next/snmp-config.md @@ -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/internal/static/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/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 bd8cfcfe62be..d4b519782f8b 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/internal/static/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/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/component/loki/source/file/legacy_file_test.go b/internal/component/loki/source/file/legacy_file_test.go index c73d46f432d7..583b911e022d 100644 --- a/internal/component/loki/source/file/legacy_file_test.go +++ b/internal/component/loki/source/file/legacy_file_test.go @@ -21,8 +21,8 @@ import ( "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/static/logs" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/logs" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" "go.uber.org/atomic" diff --git a/internal/component/otelcol/processor/discovery/discovery.go b/internal/component/otelcol/processor/discovery/discovery.go index 226899139930..63bb295bb57b 100644 --- a/internal/component/otelcol/processor/discovery/discovery.go +++ b/internal/component/otelcol/processor/discovery/discovery.go @@ -13,7 +13,7 @@ import ( "github.com/grafana/agent/internal/component/otelcol/internal/lazyconsumer" "github.com/grafana/agent/internal/featuregate" "github.com/grafana/agent/internal/flow/logging/level" - promsdconsumer "github.com/grafana/agent/internal/static/traces/promsdprocessor/consumer" + promsdconsumer "github.com/grafana/agent/static/traces/promsdprocessor/consumer" "github.com/grafana/river" ) diff --git a/internal/component/otelcol/processor/discovery/discovery_test.go b/internal/component/otelcol/processor/discovery/discovery_test.go index ac741673325d..244ebd07982f 100644 --- a/internal/component/otelcol/processor/discovery/discovery_test.go +++ b/internal/component/otelcol/processor/discovery/discovery_test.go @@ -8,8 +8,8 @@ import ( "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" + promsdconsumer "github.com/grafana/agent/static/traces/promsdprocessor/consumer" "github.com/grafana/river" "github.com/stretchr/testify/require" semconv "go.opentelemetry.io/collector/semconv/v1.5.0" diff --git a/internal/component/prometheus/exporter/apache/apache.go b/internal/component/prometheus/exporter/apache/apache.go index 5d0d419e929d..b6b56a743850 100644 --- a/internal/component/prometheus/exporter/apache/apache.go +++ b/internal/component/prometheus/exporter/apache/apache.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/apache_http" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/apache_http" ) func init() { diff --git a/internal/component/prometheus/exporter/azure/azure.go b/internal/component/prometheus/exporter/azure/azure.go index 3671cfa78325..b06731f1235a 100644 --- a/internal/component/prometheus/exporter/azure/azure.go +++ b/internal/component/prometheus/exporter/azure/azure.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/azure_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/azure_exporter" ) func init() { diff --git a/internal/component/prometheus/exporter/blackbox/blackbox.go b/internal/component/prometheus/exporter/blackbox/blackbox.go index a429818b61c0..a6489165e239 100644 --- a/internal/component/prometheus/exporter/blackbox/blackbox.go +++ b/internal/component/prometheus/exporter/blackbox/blackbox.go @@ -12,9 +12,9 @@ import ( "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/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/blackbox_exporter" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/blackbox_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/component/prometheus/exporter/cadvisor/cadvisor.go b/internal/component/prometheus/exporter/cadvisor/cadvisor.go index e28b4e1c7dab..36414b586cb3 100644 --- a/internal/component/prometheus/exporter/cadvisor/cadvisor.go +++ b/internal/component/prometheus/exporter/cadvisor/cadvisor.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/cadvisor" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/cadvisor" ) func init() { diff --git a/internal/component/prometheus/exporter/cadvisor/cadvisor_test.go b/internal/component/prometheus/exporter/cadvisor/cadvisor_test.go index 7195140524e6..fcbf4c5d9bbd 100644 --- a/internal/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/internal/static/integrations/cadvisor" + "github.com/grafana/agent/static/integrations/cadvisor" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/internal/component/prometheus/exporter/cloudwatch/cloudwatch.go b/internal/component/prometheus/exporter/cloudwatch/cloudwatch.go index a7ec9a96af25..b727cab0a581 100644 --- a/internal/component/prometheus/exporter/cloudwatch/cloudwatch.go +++ b/internal/component/prometheus/exporter/cloudwatch/cloudwatch.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/cloudwatch_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/cloudwatch_exporter" ) func init() { diff --git a/internal/component/prometheus/exporter/cloudwatch/config.go b/internal/component/prometheus/exporter/cloudwatch/config.go index 62a0757b2ecd..1f5eecbd684c 100644 --- a/internal/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/internal/static/integrations/cloudwatch_exporter" + "github.com/grafana/agent/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/internal/component/prometheus/exporter/consul/consul.go b/internal/component/prometheus/exporter/consul/consul.go index 60ce1d6d4bec..8480c39124d7 100644 --- a/internal/component/prometheus/exporter/consul/consul.go +++ b/internal/component/prometheus/exporter/consul/consul.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/consul_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/consul_exporter" ) func init() { diff --git a/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go b/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go index dc261f575894..197b974e8470 100644 --- a/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go +++ b/internal/component/prometheus/exporter/dnsmasq/dnsmasq.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/dnsmasq_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/dnsmasq_exporter" ) func init() { diff --git a/internal/component/prometheus/exporter/dnsmasq/dnsmasq_test.go b/internal/component/prometheus/exporter/dnsmasq/dnsmasq_test.go index dbf6a904f78b..d90158bf68c6 100644 --- a/internal/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/internal/static/integrations/dnsmasq_exporter" + "github.com/grafana/agent/static/integrations/dnsmasq_exporter" "github.com/grafana/river" "github.com/stretchr/testify/assert" ) diff --git a/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go b/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go index 06811eb68cd0..960af146a651 100644 --- a/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go +++ b/internal/component/prometheus/exporter/elasticsearch/elasticsearch.go @@ -7,8 +7,8 @@ import ( 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/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/elasticsearch_exporter" ) func init() { diff --git a/internal/component/prometheus/exporter/elasticsearch/elasticsearch_test.go b/internal/component/prometheus/exporter/elasticsearch/elasticsearch_test.go index d6b18347ae3c..d98de342b252 100644 --- a/internal/component/prometheus/exporter/elasticsearch/elasticsearch_test.go +++ b/internal/component/prometheus/exporter/elasticsearch/elasticsearch_test.go @@ -5,7 +5,7 @@ import ( "time" commonCfg "github.com/grafana/agent/internal/component/common/config" - "github.com/grafana/agent/internal/static/integrations/elasticsearch_exporter" + "github.com/grafana/agent/static/integrations/elasticsearch_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" promCfg "github.com/prometheus/common/config" diff --git a/internal/component/prometheus/exporter/exporter.go b/internal/component/prometheus/exporter/exporter.go index c184e1c12eb4..878506463915 100644 --- a/internal/component/prometheus/exporter/exporter.go +++ b/internal/component/prometheus/exporter/exporter.go @@ -13,7 +13,7 @@ import ( "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/grafana/agent/static/integrations" "github.com/prometheus/common/model" ) diff --git a/internal/component/prometheus/exporter/gcp/gcp.go b/internal/component/prometheus/exporter/gcp/gcp.go index d9dbbf16ad24..6e5fbfe5e36e 100644 --- a/internal/component/prometheus/exporter/gcp/gcp.go +++ b/internal/component/prometheus/exporter/gcp/gcp.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/gcp_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/gcp_exporter" ) func init() { diff --git a/internal/component/prometheus/exporter/github/github.go b/internal/component/prometheus/exporter/github/github.go index 9519637733d8..7a3def3dd4dd 100644 --- a/internal/component/prometheus/exporter/github/github.go +++ b/internal/component/prometheus/exporter/github/github.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/github_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/github_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/kafka/kafka.go b/internal/component/prometheus/exporter/kafka/kafka.go index fcd12fe85f4f..c2642dd67bfa 100644 --- a/internal/component/prometheus/exporter/kafka/kafka.go +++ b/internal/component/prometheus/exporter/kafka/kafka.go @@ -8,8 +8,8 @@ import ( "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/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/kafka_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/kafka_exporter" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/kafka/kafka_test.go b/internal/component/prometheus/exporter/kafka/kafka_test.go index 1bf0a8872693..676060616acd 100644 --- a/internal/component/prometheus/exporter/kafka/kafka_test.go +++ b/internal/component/prometheus/exporter/kafka/kafka_test.go @@ -4,7 +4,7 @@ import ( "testing" "github.com/grafana/agent/internal/component/discovery" - "github.com/grafana/agent/internal/static/integrations/kafka_exporter" + "github.com/grafana/agent/static/integrations/kafka_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/internal/component/prometheus/exporter/memcached/memcached.go b/internal/component/prometheus/exporter/memcached/memcached.go index 516d05b24eb8..d0fcba5732af 100644 --- a/internal/component/prometheus/exporter/memcached/memcached.go +++ b/internal/component/prometheus/exporter/memcached/memcached.go @@ -7,8 +7,8 @@ import ( "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/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/memcached_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/memcached_exporter" ) func init() { diff --git a/internal/component/prometheus/exporter/memcached/memcached_test.go b/internal/component/prometheus/exporter/memcached/memcached_test.go index e3b4a3ae5a08..05fbdfa61a7a 100644 --- a/internal/component/prometheus/exporter/memcached/memcached_test.go +++ b/internal/component/prometheus/exporter/memcached/memcached_test.go @@ -5,7 +5,7 @@ import ( "time" "github.com/grafana/agent/internal/component/common/config" - "github.com/grafana/agent/internal/static/integrations/memcached_exporter" + "github.com/grafana/agent/static/integrations/memcached_exporter" "github.com/grafana/river" "github.com/stretchr/testify/assert" ) diff --git a/internal/component/prometheus/exporter/mongodb/mongodb.go b/internal/component/prometheus/exporter/mongodb/mongodb.go index 46685c422aa3..2f6695ee9c9d 100644 --- a/internal/component/prometheus/exporter/mongodb/mongodb.go +++ b/internal/component/prometheus/exporter/mongodb/mongodb.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/mongodb_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/mongodb_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/mongodb/mongodb_test.go b/internal/component/prometheus/exporter/mongodb/mongodb_test.go index b33590c84ea0..4859e283dda9 100644 --- a/internal/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/internal/static/integrations/mongodb_exporter" + "github.com/grafana/agent/static/integrations/mongodb_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/internal/component/prometheus/exporter/mssql/mssql.go b/internal/component/prometheus/exporter/mssql/mssql.go index 368e844294d8..7b9cf2604a00 100644 --- a/internal/component/prometheus/exporter/mssql/mssql.go +++ b/internal/component/prometheus/exporter/mssql/mssql.go @@ -9,9 +9,9 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/mssql" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/mssql" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" "gopkg.in/yaml.v2" diff --git a/internal/component/prometheus/exporter/mssql/mssql_test.go b/internal/component/prometheus/exporter/mssql/mssql_test.go index 0eb59a8b39f7..1dd5f60f81ef 100644 --- a/internal/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/internal/static/integrations/mssql" + "github.com/grafana/agent/static/integrations/mssql" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/internal/component/prometheus/exporter/mysql/mysql.go b/internal/component/prometheus/exporter/mysql/mysql.go index 7eba01490269..19ad532e6a50 100644 --- a/internal/component/prometheus/exporter/mysql/mysql.go +++ b/internal/component/prometheus/exporter/mysql/mysql.go @@ -5,8 +5,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/mysqld_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/mysqld_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/mysql/mysql_test.go b/internal/component/prometheus/exporter/mysql/mysql_test.go index 45a69d8286a3..165fc102578c 100644 --- a/internal/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/internal/static/integrations/mysqld_exporter" + "github.com/grafana/agent/static/integrations/mysqld_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" "github.com/stretchr/testify/require" diff --git a/internal/component/prometheus/exporter/oracledb/oracledb.go b/internal/component/prometheus/exporter/oracledb/oracledb.go index 008549bf7225..f9d832b6db7f 100644 --- a/internal/component/prometheus/exporter/oracledb/oracledb.go +++ b/internal/component/prometheus/exporter/oracledb/oracledb.go @@ -8,8 +8,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/oracledb_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/oracledb_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/oracledb/oracledb_test.go b/internal/component/prometheus/exporter/oracledb/oracledb_test.go index d339151dac86..7fc0604a88df 100644 --- a/internal/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/internal/static/integrations/oracledb_exporter" + "github.com/grafana/agent/static/integrations/oracledb_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/internal/component/prometheus/exporter/postgres/postgres.go b/internal/component/prometheus/exporter/postgres/postgres.go index 5fddac862184..bf52d1291521 100644 --- a/internal/component/prometheus/exporter/postgres/postgres.go +++ b/internal/component/prometheus/exporter/postgres/postgres.go @@ -7,8 +7,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/postgres_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/postgres_exporter" "github.com/grafana/river/rivertypes" "github.com/lib/pq" config_util "github.com/prometheus/common/config" diff --git a/internal/component/prometheus/exporter/postgres/postgres_test.go b/internal/component/prometheus/exporter/postgres/postgres_test.go index ad20bce7e44c..a122a726f553 100644 --- a/internal/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/internal/static/integrations/postgres_exporter" + "github.com/grafana/agent/static/integrations/postgres_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/internal/component/prometheus/exporter/process/process.go b/internal/component/prometheus/exporter/process/process.go index 187aee4a7677..34cdd23497b3 100644 --- a/internal/component/prometheus/exporter/process/process.go +++ b/internal/component/prometheus/exporter/process/process.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/process_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/process_exporter" exporter_config "github.com/ncabatoff/process-exporter/config" ) diff --git a/internal/component/prometheus/exporter/redis/redis.go b/internal/component/prometheus/exporter/redis/redis.go index 8085f4dda09d..f6929e54e0bf 100644 --- a/internal/component/prometheus/exporter/redis/redis.go +++ b/internal/component/prometheus/exporter/redis/redis.go @@ -8,8 +8,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/redis_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/redis_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/redis/redis_test.go b/internal/component/prometheus/exporter/redis/redis_test.go index 35503de473f9..c2a53fe179d0 100644 --- a/internal/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/internal/static/integrations/redis_exporter" + "github.com/grafana/agent/static/integrations/redis_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/internal/component/prometheus/exporter/self/self.go b/internal/component/prometheus/exporter/self/self.go index 32735c19e5ca..1dd94b522b88 100644 --- a/internal/component/prometheus/exporter/self/self.go +++ b/internal/component/prometheus/exporter/self/self.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/agent" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/agent" ) func init() { diff --git a/internal/component/prometheus/exporter/snmp/snmp.go b/internal/component/prometheus/exporter/snmp/snmp.go index 0a455eea729d..aa855e8bd662 100644 --- a/internal/component/prometheus/exporter/snmp/snmp.go +++ b/internal/component/prometheus/exporter/snmp/snmp.go @@ -9,8 +9,8 @@ import ( "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/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/snmp_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/snmp_exporter" "github.com/grafana/river/rivertypes" snmp_config "github.com/prometheus/snmp_exporter/config" "gopkg.in/yaml.v2" diff --git a/internal/component/prometheus/exporter/snowflake/snowflake.go b/internal/component/prometheus/exporter/snowflake/snowflake.go index bb93d9df1ceb..b18b5ffa6c96 100644 --- a/internal/component/prometheus/exporter/snowflake/snowflake.go +++ b/internal/component/prometheus/exporter/snowflake/snowflake.go @@ -4,8 +4,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/snowflake_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/snowflake_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/snowflake/snowflake_test.go b/internal/component/prometheus/exporter/snowflake/snowflake_test.go index 83ecf189ca53..de187263b537 100644 --- a/internal/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/internal/static/integrations/snowflake_exporter" + "github.com/grafana/agent/static/integrations/snowflake_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" diff --git a/internal/component/prometheus/exporter/squid/squid.go b/internal/component/prometheus/exporter/squid/squid.go index 6ef589005ed4..63cdc5c0cd2e 100644 --- a/internal/component/prometheus/exporter/squid/squid.go +++ b/internal/component/prometheus/exporter/squid/squid.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/squid_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/squid_exporter" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/squid/squid_test.go b/internal/component/prometheus/exporter/squid/squid_test.go index 78dc2af2bf9b..1102a7e4a706 100644 --- a/internal/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/internal/static/integrations/squid_exporter" + "github.com/grafana/agent/static/integrations/squid_exporter" "github.com/grafana/river" "github.com/grafana/river/rivertypes" "github.com/prometheus/common/config" diff --git a/internal/component/prometheus/exporter/statsd/config.go b/internal/component/prometheus/exporter/statsd/config.go index 2b3f11e0bd2a..c58b6ef4c6bd 100644 --- a/internal/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/internal/static/integrations/statsd_exporter" + "github.com/grafana/agent/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/internal/static/integrations/statsd_exporter package. +// Some defaults are populated from init functions in the github.com/grafana/agent/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/internal/static/integrations/statsd_exporter. +// Convert gives a config suitable for use with github.com/grafana/agent/static/integrations/statsd_exporter. func (c *Arguments) Convert() (*statsd_exporter.Config, error) { var ( mappingConfig any diff --git a/internal/component/prometheus/exporter/statsd/statsd.go b/internal/component/prometheus/exporter/statsd/statsd.go index fe09c168ec2b..c26490736567 100644 --- a/internal/component/prometheus/exporter/statsd/statsd.go +++ b/internal/component/prometheus/exporter/statsd/statsd.go @@ -4,7 +4,7 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/static/integrations" ) func init() { diff --git a/internal/component/prometheus/exporter/unix/config.go b/internal/component/prometheus/exporter/unix/config.go index 96de4a5c6b4f..854c51bd5fe5 100644 --- a/internal/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/internal/static/integrations/node_exporter" + node_integration "github.com/grafana/agent/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/internal/static/integrations/node_exporter package. +// Some defaults are populated from init functions in the github.com/grafana/agent/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/internal/static/integrations/node_exporter. +// Convert gives a config suitable for use with github.com/grafana/agent/static/integrations/node_exporter. func (a *Arguments) Convert() *node_integration.Config { return &node_integration.Config{ IncludeExporterMetrics: a.IncludeExporterMetrics, diff --git a/internal/component/prometheus/exporter/unix/unix.go b/internal/component/prometheus/exporter/unix/unix.go index 8bf988b08a86..dd0e9b6b8cbe 100644 --- a/internal/component/prometheus/exporter/unix/unix.go +++ b/internal/component/prometheus/exporter/unix/unix.go @@ -4,7 +4,7 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/static/integrations" ) func init() { diff --git a/internal/component/prometheus/exporter/vsphere/vsphere.go b/internal/component/prometheus/exporter/vsphere/vsphere.go index aeb35d1dd8bd..351dec17c830 100644 --- a/internal/component/prometheus/exporter/vsphere/vsphere.go +++ b/internal/component/prometheus/exporter/vsphere/vsphere.go @@ -6,8 +6,8 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/vmware_exporter" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/vmware_exporter" "github.com/grafana/river/rivertypes" config_util "github.com/prometheus/common/config" ) diff --git a/internal/component/prometheus/exporter/vsphere/vsphere_test.go b/internal/component/prometheus/exporter/vsphere/vsphere_test.go index edf5ebfa8921..ba28dcd13c1f 100644 --- a/internal/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/internal/static/integrations/vmware_exporter" + "github.com/grafana/agent/static/integrations/vmware_exporter" "github.com/grafana/river" "github.com/stretchr/testify/require" ) diff --git a/internal/component/prometheus/exporter/windows/config.go b/internal/component/prometheus/exporter/windows/config.go index 185f6213ac38..ab86747b53e2 100644 --- a/internal/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/internal/static/integrations/windows_exporter" + windows_integration "github.com/grafana/agent/static/integrations/windows_exporter" ) // Arguments is used for controlling for this exporter. diff --git a/internal/component/prometheus/exporter/windows/config_windows.go b/internal/component/prometheus/exporter/windows/config_windows.go index d1e138b9b520..cc4898f3908c 100644 --- a/internal/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/internal/static/integrations/windows_exporter" + windows_integration "github.com/grafana/agent/static/integrations/windows_exporter" col "github.com/prometheus-community/windows_exporter/pkg/collector" ) diff --git a/internal/component/prometheus/exporter/windows/windows.go b/internal/component/prometheus/exporter/windows/windows.go index 0b7f151b75bb..4b17b78e60d9 100644 --- a/internal/component/prometheus/exporter/windows/windows.go +++ b/internal/component/prometheus/exporter/windows/windows.go @@ -4,7 +4,7 @@ import ( "github.com/grafana/agent/internal/component" "github.com/grafana/agent/internal/component/prometheus/exporter" "github.com/grafana/agent/internal/featuregate" - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/static/integrations" ) func init() { diff --git a/internal/component/prometheus/remotewrite/cli.go b/internal/component/prometheus/remotewrite/cli.go index df6dfee34664..49afa29a7a59 100644 --- a/internal/component/prometheus/remotewrite/cli.go +++ b/internal/component/prometheus/remotewrite/cli.go @@ -6,7 +6,7 @@ import ( "path/filepath" "sort" - "github.com/grafana/agent/internal/static/agentctl/waltools" + "github.com/grafana/agent/static/agentctl/waltools" "github.com/olekukonko/tablewriter" "github.com/spf13/cobra" ) diff --git a/internal/component/prometheus/remotewrite/remote_write.go b/internal/component/prometheus/remotewrite/remote_write.go index b5b00b78b86e..3d61c67a269f 100644 --- a/internal/component/prometheus/remotewrite/remote_write.go +++ b/internal/component/prometheus/remotewrite/remote_write.go @@ -16,8 +16,8 @@ import ( "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/static/metrics/wal" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/converter/internal/prometheusconvert/prometheusconvert_test.go b/internal/converter/internal/prometheusconvert/prometheusconvert_test.go index 0e7b88fd3599..8cba6d8e55dd 100644 --- a/internal/converter/internal/prometheusconvert/prometheusconvert_test.go +++ b/internal/converter/internal/prometheusconvert/prometheusconvert_test.go @@ -5,7 +5,7 @@ import ( "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" + _ "github.com/grafana/agent/static/metrics/instance" ) func TestConvert(t *testing.T) { diff --git a/internal/converter/internal/promtailconvert/promtailconvert_test.go b/internal/converter/internal/promtailconvert/promtailconvert_test.go index 0932e62eaeea..6bced57bbc99 100644 --- a/internal/converter/internal/promtailconvert/promtailconvert_test.go +++ b/internal/converter/internal/promtailconvert/promtailconvert_test.go @@ -7,7 +7,7 @@ import ( "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. + _ "github.com/grafana/agent/static/metrics/instance" // Imported to override default values via the init function. ) func TestConvert(t *testing.T) { diff --git a/internal/converter/internal/promtailconvert/promtailconvert_windows_test.go b/internal/converter/internal/promtailconvert/promtailconvert_windows_test.go index 4e6f3ead80e6..36c8484910c3 100644 --- a/internal/converter/internal/promtailconvert/promtailconvert_windows_test.go +++ b/internal/converter/internal/promtailconvert/promtailconvert_windows_test.go @@ -7,7 +7,7 @@ import ( "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. + _ "github.com/grafana/agent/static/metrics/instance" // Imported to override default values via the init function. ) func TestConvert(t *testing.T) { diff --git a/internal/converter/internal/staticconvert/internal/build/apache_exporter.go b/internal/converter/internal/staticconvert/internal/build/apache_exporter.go index df368bb74422..5d4c423dca8b 100644 --- a/internal/converter/internal/staticconvert/internal/build/apache_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/apache_exporter.go @@ -3,8 +3,8 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/apache_http" + apache_exporter_v2 "github.com/grafana/agent/static/integrations/v2/apache_http" ) func (b *ConfigBuilder) appendApacheExporter(config *apache_http.Config) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/app_agent_receiver.go b/internal/converter/internal/staticconvert/internal/build/app_agent_receiver.go index 1926fdb97d46..d1c8ebadb8cc 100644 --- a/internal/converter/internal/staticconvert/internal/build/app_agent_receiver.go +++ b/internal/converter/internal/staticconvert/internal/build/app_agent_receiver.go @@ -9,7 +9,7 @@ import ( "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" + app_agent_receiver_v2 "github.com/grafana/agent/static/integrations/v2/app_agent_receiver" "github.com/grafana/river/rivertypes" "github.com/grafana/river/scanner" ) diff --git a/internal/converter/internal/staticconvert/internal/build/azure_exporter.go b/internal/converter/internal/staticconvert/internal/build/azure_exporter.go index d099c67849e3..017371e81da9 100644 --- a/internal/converter/internal/staticconvert/internal/build/azure_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/azure_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/azure_exporter" ) func (b *ConfigBuilder) appendAzureExporter(config *azure_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/blackbox_exporter.go b/internal/converter/internal/staticconvert/internal/build/blackbox_exporter.go index 0c2fb9b9f794..f6d4349182b4 100644 --- a/internal/converter/internal/staticconvert/internal/build/blackbox_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/blackbox_exporter.go @@ -5,8 +5,8 @@ import ( "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/agent/static/integrations/blackbox_exporter" + blackbox_exporter_v2 "github.com/grafana/agent/static/integrations/v2/blackbox_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/builder.go b/internal/converter/internal/staticconvert/internal/build/builder.go index 677e28b91e09..5f1cd02dcb4e 100644 --- a/internal/converter/internal/staticconvert/internal/build/builder.go +++ b/internal/converter/internal/staticconvert/internal/build/builder.go @@ -4,7 +4,7 @@ import ( "strings" "github.com/grafana/agent/internal/converter/diag" - "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/static/config" "github.com/grafana/river/token/builder" ) diff --git a/internal/converter/internal/staticconvert/internal/build/builder_integrations.go b/internal/converter/internal/staticconvert/internal/build/builder_integrations.go index a76f6446ccca..51cca2289d5e 100644 --- a/internal/converter/internal/staticconvert/internal/build/builder_integrations.go +++ b/internal/converter/internal/staticconvert/internal/build/builder_integrations.go @@ -10,43 +10,43 @@ import ( "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/agent/static/config" + agent_exporter "github.com/grafana/agent/static/integrations/agent" + "github.com/grafana/agent/static/integrations/apache_http" + "github.com/grafana/agent/static/integrations/azure_exporter" + "github.com/grafana/agent/static/integrations/blackbox_exporter" + "github.com/grafana/agent/static/integrations/cadvisor" + "github.com/grafana/agent/static/integrations/cloudwatch_exporter" + int_config "github.com/grafana/agent/static/integrations/config" + "github.com/grafana/agent/static/integrations/consul_exporter" + "github.com/grafana/agent/static/integrations/dnsmasq_exporter" + "github.com/grafana/agent/static/integrations/elasticsearch_exporter" + "github.com/grafana/agent/static/integrations/gcp_exporter" + "github.com/grafana/agent/static/integrations/github_exporter" + "github.com/grafana/agent/static/integrations/kafka_exporter" + "github.com/grafana/agent/static/integrations/memcached_exporter" + "github.com/grafana/agent/static/integrations/mongodb_exporter" + mssql_exporter "github.com/grafana/agent/static/integrations/mssql" + "github.com/grafana/agent/static/integrations/mysqld_exporter" + "github.com/grafana/agent/static/integrations/node_exporter" + "github.com/grafana/agent/static/integrations/oracledb_exporter" + "github.com/grafana/agent/static/integrations/postgres_exporter" + "github.com/grafana/agent/static/integrations/process_exporter" + "github.com/grafana/agent/static/integrations/redis_exporter" + "github.com/grafana/agent/static/integrations/snmp_exporter" + "github.com/grafana/agent/static/integrations/snowflake_exporter" + "github.com/grafana/agent/static/integrations/squid_exporter" + "github.com/grafana/agent/static/integrations/statsd_exporter" + agent_exporter_v2 "github.com/grafana/agent/static/integrations/v2/agent" + apache_exporter_v2 "github.com/grafana/agent/static/integrations/v2/apache_http" + app_agent_receiver_v2 "github.com/grafana/agent/static/integrations/v2/app_agent_receiver" + blackbox_exporter_v2 "github.com/grafana/agent/static/integrations/v2/blackbox_exporter" + common_v2 "github.com/grafana/agent/static/integrations/v2/common" + eventhandler_v2 "github.com/grafana/agent/static/integrations/v2/eventhandler" + metricsutils_v2 "github.com/grafana/agent/static/integrations/v2/metricsutils" + snmp_exporter_v2 "github.com/grafana/agent/static/integrations/v2/snmp_exporter" + vmware_exporter_v2 "github.com/grafana/agent/static/integrations/v2/vmware_exporter" + "github.com/grafana/agent/static/integrations/windows_exporter" "github.com/grafana/river/scanner" "github.com/prometheus/common/model" prom_config "github.com/prometheus/prometheus/config" diff --git a/internal/converter/internal/staticconvert/internal/build/builder_logging.go b/internal/converter/internal/staticconvert/internal/build/builder_logging.go index cda77f484999..75f6b5f82563 100644 --- a/internal/converter/internal/staticconvert/internal/build/builder_logging.go +++ b/internal/converter/internal/staticconvert/internal/build/builder_logging.go @@ -5,7 +5,7 @@ import ( "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/agent/internal/flow/logging" - "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/static/server" ) func (b *ConfigBuilder) appendLogging(config *server.Config) { diff --git a/internal/converter/internal/staticconvert/internal/build/builder_server.go b/internal/converter/internal/staticconvert/internal/build/builder_server.go index be742a448b86..73929e5cffea 100644 --- a/internal/converter/internal/staticconvert/internal/build/builder_server.go +++ b/internal/converter/internal/staticconvert/internal/build/builder_server.go @@ -5,7 +5,7 @@ import ( "github.com/grafana/agent/internal/converter/internal/common" "github.com/grafana/agent/internal/service/http" - "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/static/server" ) func (b *ConfigBuilder) appendServer(config *server.Config) { diff --git a/internal/converter/internal/staticconvert/internal/build/builder_traces.go b/internal/converter/internal/staticconvert/internal/build/builder_traces.go index d13a06e27ae0..73f45062b00f 100644 --- a/internal/converter/internal/staticconvert/internal/build/builder_traces.go +++ b/internal/converter/internal/staticconvert/internal/build/builder_traces.go @@ -6,7 +6,7 @@ import ( "github.com/grafana/agent/internal/converter/diag" "github.com/grafana/agent/internal/converter/internal/otelcolconvert" - "github.com/grafana/agent/internal/static/traces" + "github.com/grafana/agent/static/traces" "github.com/open-telemetry/opentelemetry-collector-contrib/connector/spanmetricsconnector" otel_component "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/exporter/loggingexporter" diff --git a/internal/converter/internal/staticconvert/internal/build/cadvisor_exporter.go b/internal/converter/internal/staticconvert/internal/build/cadvisor_exporter.go index eab148d9f0e3..94dc1c15af48 100644 --- a/internal/converter/internal/staticconvert/internal/build/cadvisor_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/cadvisor_exporter.go @@ -5,7 +5,7 @@ import ( "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" + cadvisor_integration "github.com/grafana/agent/static/integrations/cadvisor" ) func (b *ConfigBuilder) appendCadvisorExporter(config *cadvisor_integration.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go b/internal/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go index 3e35cc4d4e29..f212b2ab091f 100644 --- a/internal/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/cloudwatch_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/cloudwatch_exporter" ) func (b *ConfigBuilder) appendCloudwatchExporter(config *cloudwatch_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/consul_exporter.go b/internal/converter/internal/staticconvert/internal/build/consul_exporter.go index e6c5231a9ca3..84bbd582ff2b 100644 --- a/internal/converter/internal/staticconvert/internal/build/consul_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/consul_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/consul_exporter" ) func (b *ConfigBuilder) appendConsulExporter(config *consul_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/converter_discoveryprocessor.go b/internal/converter/internal/staticconvert/internal/build/converter_discoveryprocessor.go index 6739d13479f5..d61820e55567 100644 --- a/internal/converter/internal/staticconvert/internal/build/converter_discoveryprocessor.go +++ b/internal/converter/internal/staticconvert/internal/build/converter_discoveryprocessor.go @@ -12,7 +12,7 @@ import ( "github.com/grafana/agent/internal/converter/internal/prometheusconvert" "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prometheus_component "github.com/grafana/agent/internal/converter/internal/prometheusconvert/component" - "github.com/grafana/agent/internal/static/traces/promsdprocessor" + "github.com/grafana/agent/static/traces/promsdprocessor" prom_config "github.com/prometheus/prometheus/config" "go.opentelemetry.io/collector/component" "gopkg.in/yaml.v3" diff --git a/internal/converter/internal/staticconvert/internal/build/converter_remotewriteexporter.go b/internal/converter/internal/staticconvert/internal/build/converter_remotewriteexporter.go index 7d17bcfa1d1c..569e252adf34 100644 --- a/internal/converter/internal/staticconvert/internal/build/converter_remotewriteexporter.go +++ b/internal/converter/internal/staticconvert/internal/build/converter_remotewriteexporter.go @@ -12,7 +12,7 @@ import ( "github.com/grafana/agent/internal/converter/internal/otelcolconvert" "github.com/grafana/agent/internal/converter/internal/prometheusconvert/build" prometheus_component "github.com/grafana/agent/internal/converter/internal/prometheusconvert/component" - "github.com/grafana/agent/internal/static/traces/remotewriteexporter" + "github.com/grafana/agent/static/traces/remotewriteexporter" prom_relabel "github.com/prometheus/prometheus/model/relabel" "github.com/prometheus/prometheus/storage" "go.opentelemetry.io/collector/component" diff --git a/internal/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go b/internal/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go index a3cc9edfddf1..9d036fd331db 100644 --- a/internal/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/dnsmasq_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/dnsmasq_exporter" ) func (b *ConfigBuilder) appendDnsmasqExporter(config *dnsmasq_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go b/internal/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go index 4b39f46ca391..0e7b1d64a874 100644 --- a/internal/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/elasticsearch_exporter.go @@ -4,7 +4,7 @@ import ( 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/agent/static/integrations/elasticsearch_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/eventhandler.go b/internal/converter/internal/staticconvert/internal/build/eventhandler.go index 2381a23b000d..ceea09dafda8 100644 --- a/internal/converter/internal/staticconvert/internal/build/eventhandler.go +++ b/internal/converter/internal/staticconvert/internal/build/eventhandler.go @@ -9,7 +9,7 @@ import ( "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" + eventhandler_v2 "github.com/grafana/agent/static/integrations/v2/eventhandler" "github.com/grafana/river/scanner" ) diff --git a/internal/converter/internal/staticconvert/internal/build/gcp_exporter.go b/internal/converter/internal/staticconvert/internal/build/gcp_exporter.go index 27a984fac076..8b54d99ad041 100644 --- a/internal/converter/internal/staticconvert/internal/build/gcp_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/gcp_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/gcp_exporter" ) func (b *ConfigBuilder) appendGcpExporter(config *gcp_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/github_exporter.go b/internal/converter/internal/staticconvert/internal/build/github_exporter.go index 8759eb27c87d..9783e1082bb3 100644 --- a/internal/converter/internal/staticconvert/internal/build/github_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/github_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/github_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/kafka_exporter.go b/internal/converter/internal/staticconvert/internal/build/kafka_exporter.go index b67aab7537e8..698b30b24890 100644 --- a/internal/converter/internal/staticconvert/internal/build/kafka_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/kafka_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/kafka_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/memcached_exporter.go b/internal/converter/internal/staticconvert/internal/build/memcached_exporter.go index fd9b428aabbf..099975ba8783 100644 --- a/internal/converter/internal/staticconvert/internal/build/memcached_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/memcached_exporter.go @@ -4,7 +4,7 @@ import ( "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" + "github.com/grafana/agent/static/integrations/memcached_exporter" ) func (b *ConfigBuilder) appendMemcachedExporter(config *memcached_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/mongodb_exporter.go b/internal/converter/internal/staticconvert/internal/build/mongodb_exporter.go index 5dfa296770e4..e1b9643176e0 100644 --- a/internal/converter/internal/staticconvert/internal/build/mongodb_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/mongodb_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/mongodb_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/mssql_exporter.go b/internal/converter/internal/staticconvert/internal/build/mssql_exporter.go index 388e93cc7ff8..6b56f0ca2255 100644 --- a/internal/converter/internal/staticconvert/internal/build/mssql_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/mssql_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + mssql_exporter "github.com/grafana/agent/static/integrations/mssql" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/mysqld_exporter.go b/internal/converter/internal/staticconvert/internal/build/mysqld_exporter.go index f7de2572d556..af8dd358557d 100644 --- a/internal/converter/internal/staticconvert/internal/build/mysqld_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/mysqld_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/mysqld_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/node_exporter.go b/internal/converter/internal/staticconvert/internal/build/node_exporter.go index 59a4762f30f4..44d0af6cdc1b 100644 --- a/internal/converter/internal/staticconvert/internal/build/node_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/node_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/node_exporter" ) func (b *ConfigBuilder) appendNodeExporter(config *node_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/oracledb_exporter.go b/internal/converter/internal/staticconvert/internal/build/oracledb_exporter.go index bc768c1b7d44..8e9c6484b848 100644 --- a/internal/converter/internal/staticconvert/internal/build/oracledb_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/oracledb_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/oracledb_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/postgres_exporter.go b/internal/converter/internal/staticconvert/internal/build/postgres_exporter.go index e73877e964c2..a58bf769cd99 100644 --- a/internal/converter/internal/staticconvert/internal/build/postgres_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/postgres_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/postgres_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/process_exporter.go b/internal/converter/internal/staticconvert/internal/build/process_exporter.go index d8136cfa55a8..f5cc5001e398 100644 --- a/internal/converter/internal/staticconvert/internal/build/process_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/process_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + "github.com/grafana/agent/static/integrations/process_exporter" ) func (b *ConfigBuilder) appendProcessExporter(config *process_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/redis_exporter.go b/internal/converter/internal/staticconvert/internal/build/redis_exporter.go index e54bc2f7a671..7fbc80bec0d0 100644 --- a/internal/converter/internal/staticconvert/internal/build/redis_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/redis_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/redis_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/self_exporter.go b/internal/converter/internal/staticconvert/internal/build/self_exporter.go index 51c1049349d5..5ef67291c49e 100644 --- a/internal/converter/internal/staticconvert/internal/build/self_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/self_exporter.go @@ -3,8 +3,8 @@ package build import ( "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" + agent_exporter "github.com/grafana/agent/static/integrations/agent" + agent_exporter_v2 "github.com/grafana/agent/static/integrations/v2/agent" ) func (b *ConfigBuilder) appendAgentExporter(config *agent_exporter.Config) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/snmp_exporter.go b/internal/converter/internal/staticconvert/internal/build/snmp_exporter.go index cc7dbe3c03eb..cd6a8f9f9237 100644 --- a/internal/converter/internal/staticconvert/internal/build/snmp_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/snmp_exporter.go @@ -4,8 +4,8 @@ import ( "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/agent/static/integrations/snmp_exporter" + snmp_exporter_v2 "github.com/grafana/agent/static/integrations/v2/snmp_exporter" "github.com/grafana/river/rivertypes" snmp_config "github.com/prometheus/snmp_exporter/config" ) diff --git a/internal/converter/internal/staticconvert/internal/build/snowflake_exporter.go b/internal/converter/internal/staticconvert/internal/build/snowflake_exporter.go index 3b0e204aa9a1..73bca271d31a 100644 --- a/internal/converter/internal/staticconvert/internal/build/snowflake_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/snowflake_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/snowflake_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/squid_exporter.go b/internal/converter/internal/staticconvert/internal/build/squid_exporter.go index 2c938456205f..b3e6297a54c1 100644 --- a/internal/converter/internal/staticconvert/internal/build/squid_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/squid_exporter.go @@ -3,7 +3,7 @@ package build import ( "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/agent/static/integrations/squid_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/statsd_exporter.go b/internal/converter/internal/staticconvert/internal/build/statsd_exporter.go index 78aca3ec37ae..e207edb8f58a 100644 --- a/internal/converter/internal/staticconvert/internal/build/statsd_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/statsd_exporter.go @@ -4,7 +4,7 @@ import ( "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" + "github.com/grafana/agent/static/integrations/statsd_exporter" ) func (b *ConfigBuilder) appendStatsdExporter(config *statsd_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/internal/build/vmware_exporter.go b/internal/converter/internal/staticconvert/internal/build/vmware_exporter.go index 3d7c2c1d5b5b..f4e984205eaf 100644 --- a/internal/converter/internal/staticconvert/internal/build/vmware_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/vmware_exporter.go @@ -3,7 +3,7 @@ package build import ( "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" + vmware_exporter_v2 "github.com/grafana/agent/static/integrations/v2/vmware_exporter" "github.com/grafana/river/rivertypes" ) diff --git a/internal/converter/internal/staticconvert/internal/build/windows_exporter.go b/internal/converter/internal/staticconvert/internal/build/windows_exporter.go index 079c68d48996..21c4ddb21e88 100644 --- a/internal/converter/internal/staticconvert/internal/build/windows_exporter.go +++ b/internal/converter/internal/staticconvert/internal/build/windows_exporter.go @@ -5,7 +5,7 @@ import ( "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" + "github.com/grafana/agent/static/integrations/windows_exporter" ) func (b *ConfigBuilder) appendWindowsExporter(config *windows_exporter.Config, instanceKey *string) discovery.Exports { diff --git a/internal/converter/internal/staticconvert/staticconvert.go b/internal/converter/internal/staticconvert/staticconvert.go index ccb7e36938cc..59fd1102b614 100644 --- a/internal/converter/internal/staticconvert/staticconvert.go +++ b/internal/converter/internal/staticconvert/staticconvert.go @@ -11,8 +11,8 @@ import ( "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" + "github.com/grafana/agent/static/config" + "github.com/grafana/agent/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/internal/static/integrations/install" // Install integrations + _ "github.com/grafana/agent/static/integrations/install" // Install integrations ) // Convert implements a Static config converter. diff --git a/internal/converter/internal/staticconvert/staticconvert_test.go b/internal/converter/internal/staticconvert/staticconvert_test.go index 92c6b1e3eda8..b5c33ee60db5 100644 --- a/internal/converter/internal/staticconvert/staticconvert_test.go +++ b/internal/converter/internal/staticconvert/staticconvert_test.go @@ -7,7 +7,7 @@ import ( "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. + _ "github.com/grafana/agent/static/metrics/instance" // Imported to override default values via the init function. ) func TestConvert(t *testing.T) { diff --git a/internal/converter/internal/staticconvert/staticconvert_windows_test.go b/internal/converter/internal/staticconvert/staticconvert_windows_test.go index 5cf536d3c623..4345f009be14 100644 --- a/internal/converter/internal/staticconvert/staticconvert_windows_test.go +++ b/internal/converter/internal/staticconvert/staticconvert_windows_test.go @@ -7,7 +7,7 @@ import ( "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. + _ "github.com/grafana/agent/static/metrics/instance" // Imported to override default values via the init function. ) func TestConvert(t *testing.T) { diff --git a/internal/converter/internal/staticconvert/validate.go b/internal/converter/internal/staticconvert/validate.go index ec1314180a49..2b3c42971e29 100644 --- a/internal/converter/internal/staticconvert/validate.go +++ b/internal/converter/internal/staticconvert/validate.go @@ -5,47 +5,47 @@ import ( "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/grafana/agent/static/config" + v1 "github.com/grafana/agent/static/integrations" + agent_exporter "github.com/grafana/agent/static/integrations/agent" + "github.com/grafana/agent/static/integrations/apache_http" + "github.com/grafana/agent/static/integrations/azure_exporter" + "github.com/grafana/agent/static/integrations/blackbox_exporter" + "github.com/grafana/agent/static/integrations/cadvisor" + "github.com/grafana/agent/static/integrations/cloudwatch_exporter" + "github.com/grafana/agent/static/integrations/consul_exporter" + "github.com/grafana/agent/static/integrations/dnsmasq_exporter" + "github.com/grafana/agent/static/integrations/elasticsearch_exporter" + "github.com/grafana/agent/static/integrations/gcp_exporter" + "github.com/grafana/agent/static/integrations/github_exporter" + "github.com/grafana/agent/static/integrations/kafka_exporter" + "github.com/grafana/agent/static/integrations/memcached_exporter" + "github.com/grafana/agent/static/integrations/mongodb_exporter" + mssql_exporter "github.com/grafana/agent/static/integrations/mssql" + "github.com/grafana/agent/static/integrations/mysqld_exporter" + "github.com/grafana/agent/static/integrations/node_exporter" + "github.com/grafana/agent/static/integrations/oracledb_exporter" + "github.com/grafana/agent/static/integrations/postgres_exporter" + "github.com/grafana/agent/static/integrations/process_exporter" + "github.com/grafana/agent/static/integrations/redis_exporter" + "github.com/grafana/agent/static/integrations/snmp_exporter" + "github.com/grafana/agent/static/integrations/snowflake_exporter" + "github.com/grafana/agent/static/integrations/squid_exporter" + "github.com/grafana/agent/static/integrations/statsd_exporter" + v2 "github.com/grafana/agent/static/integrations/v2" + agent_exporter_v2 "github.com/grafana/agent/static/integrations/v2/agent" + apache_exporter_v2 "github.com/grafana/agent/static/integrations/v2/apache_http" + app_agent_receiver_v2 "github.com/grafana/agent/static/integrations/v2/app_agent_receiver" + blackbox_exporter_v2 "github.com/grafana/agent/static/integrations/v2/blackbox_exporter" + eventhandler_v2 "github.com/grafana/agent/static/integrations/v2/eventhandler" + metricsutils_v2 "github.com/grafana/agent/static/integrations/v2/metricsutils" + snmp_exporter_v2 "github.com/grafana/agent/static/integrations/v2/snmp_exporter" + vmware_exporter_v2 "github.com/grafana/agent/static/integrations/v2/vmware_exporter" + "github.com/grafana/agent/static/integrations/windows_exporter" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/static/metrics" + "github.com/grafana/agent/static/server" + "github.com/grafana/agent/static/traces" _ "github.com/prometheus/prometheus/discovery/install" // Register Prometheus SDs ) diff --git a/internal/flow/source.go b/internal/flow/source.go index 1c1d8d897ca4..e9295c5627ff 100644 --- a/internal/flow/source.go +++ b/internal/flow/source.go @@ -6,7 +6,7 @@ import ( "sort" "strings" - "github.com/grafana/agent/internal/static/config/encoder" + "github.com/grafana/agent/static/config/encoder" "github.com/grafana/river/ast" "github.com/grafana/river/diag" "github.com/grafana/river/parser" diff --git a/internal/flowmode/cmd_run.go b/internal/flowmode/cmd_run.go index 15ed6384503c..8ac323f956ff 100644 --- a/internal/flowmode/cmd_run.go +++ b/internal/flowmode/cmd_run.go @@ -33,8 +33,8 @@ import ( 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/agent/static/config/instrumentation" "github.com/grafana/ckit/advertise" "github.com/grafana/ckit/peer" "github.com/grafana/river/diag" diff --git a/internal/service/http/handler.go b/internal/service/http/handler.go index 98796530dd61..a45d40429c24 100644 --- a/internal/service/http/handler.go +++ b/internal/service/http/handler.go @@ -6,7 +6,7 @@ import ( "crypto/tls" "fmt" - "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/static/server" ) // tlsConfig generates a tls.Config from args. diff --git a/internal/service/http/handler_windows.go b/internal/service/http/handler_windows.go index 2b5cb4efab3e..8e9d13c35cfb 100644 --- a/internal/service/http/handler_windows.go +++ b/internal/service/http/handler_windows.go @@ -3,7 +3,7 @@ package http import ( "crypto/tls" - "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/static/server" ) // tlsConfig generates a tls.Config from args. diff --git a/internal/service/http/http.go b/internal/service/http/http.go index 26c93e391153..40a8dd89e498 100644 --- a/internal/service/http/http.go +++ b/internal/service/http/http.go @@ -20,7 +20,7 @@ import ( "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/agent/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/internal/static/integrations/install/install.go b/internal/static/integrations/install/install.go deleted file mode 100644 index 8ce2be4a3bf3..000000000000 --- a/internal/static/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/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/internal/util/k8s/k8s.go b/internal/util/k8s/k8s.go index c1c883cb8210..79de2d7b0043 100644 --- a/internal/util/k8s/k8s.go +++ b/internal/util/k8s/k8s.go @@ -6,7 +6,7 @@ import ( "fmt" "log" - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/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/internal/static/agentctl/sync.go b/static/agentctl/sync.go similarity index 96% rename from internal/static/agentctl/sync.go rename to static/agentctl/sync.go index 324640592111..73b88959633f 100644 --- a/internal/static/agentctl/sync.go +++ b/static/agentctl/sync.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/internal/static/client" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/client" + "github.com/grafana/agent/static/metrics/instance" ) // ConfigSync loads YAML files from a directory and syncs them to the diff --git a/internal/static/agentctl/sync_test.go b/static/agentctl/sync_test.go similarity index 96% rename from internal/static/agentctl/sync_test.go rename to static/agentctl/sync_test.go index 8cd490256cd7..f2513e4c26e8 100644 --- a/internal/static/agentctl/sync_test.go +++ b/static/agentctl/sync_test.go @@ -5,8 +5,8 @@ import ( "errors" "testing" - "github.com/grafana/agent/internal/static/metrics/cluster/configapi" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/metrics/cluster/configapi" + "github.com/grafana/agent/static/metrics/instance" "github.com/stretchr/testify/require" ) diff --git a/internal/static/agentctl/testdata/agent-1.yaml b/static/agentctl/testdata/agent-1.yaml similarity index 100% rename from internal/static/agentctl/testdata/agent-1.yaml rename to static/agentctl/testdata/agent-1.yaml diff --git a/internal/static/agentctl/testdata/agent-2.yaml b/static/agentctl/testdata/agent-2.yaml similarity index 100% rename from internal/static/agentctl/testdata/agent-2.yaml rename to static/agentctl/testdata/agent-2.yaml diff --git a/internal/static/agentctl/testdata/agent-3.yaml b/static/agentctl/testdata/agent-3.yaml similarity index 100% rename from internal/static/agentctl/testdata/agent-3.yaml rename to static/agentctl/testdata/agent-3.yaml diff --git a/internal/static/agentctl/waltools/cardinality.go b/static/agentctl/waltools/cardinality.go similarity index 100% rename from internal/static/agentctl/waltools/cardinality.go rename to static/agentctl/waltools/cardinality.go diff --git a/internal/static/agentctl/waltools/cardinality_test.go b/static/agentctl/waltools/cardinality_test.go similarity index 100% rename from internal/static/agentctl/waltools/cardinality_test.go rename to static/agentctl/waltools/cardinality_test.go diff --git a/internal/static/agentctl/waltools/samples.go b/static/agentctl/waltools/samples.go similarity index 100% rename from internal/static/agentctl/waltools/samples.go rename to static/agentctl/waltools/samples.go diff --git a/internal/static/agentctl/waltools/wal_iterator.go b/static/agentctl/waltools/wal_iterator.go similarity index 100% rename from internal/static/agentctl/waltools/wal_iterator.go rename to static/agentctl/waltools/wal_iterator.go diff --git a/internal/static/agentctl/waltools/walstats.go b/static/agentctl/waltools/walstats.go similarity index 100% rename from internal/static/agentctl/waltools/walstats.go rename to static/agentctl/waltools/walstats.go diff --git a/internal/static/agentctl/waltools/walstats_test.go b/static/agentctl/waltools/walstats_test.go similarity index 100% rename from internal/static/agentctl/waltools/walstats_test.go rename to static/agentctl/waltools/walstats_test.go diff --git a/internal/static/agentproto/agent.pb.go b/static/agentproto/agent.pb.go similarity index 100% rename from internal/static/agentproto/agent.pb.go rename to static/agentproto/agent.pb.go diff --git a/internal/static/agentproto/agent.proto b/static/agentproto/agent.proto similarity index 89% rename from internal/static/agentproto/agent.proto rename to static/agentproto/agent.proto index 405f7779c436..944466edfe97 100644 --- a/internal/static/agentproto/agent.proto +++ b/static/agentproto/agent.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package agentproto; -option go_package = "github.com/grafana/agent/internal/static/agentproto"; +option go_package = "github.com/grafana/agent/static/agentproto"; import "google/protobuf/empty.proto"; diff --git a/internal/static/agentproto/func.go b/static/agentproto/func.go similarity index 100% rename from internal/static/agentproto/func.go rename to static/agentproto/func.go diff --git a/internal/static/agentproto/gen.go b/static/agentproto/gen.go similarity index 100% rename from internal/static/agentproto/gen.go rename to static/agentproto/gen.go diff --git a/internal/static/client/client.go b/static/client/client.go similarity index 97% rename from internal/static/client/client.go rename to static/client/client.go index 68048cbce309..2486d861f844 100644 --- a/internal/static/client/client.go +++ b/static/client/client.go @@ -11,8 +11,8 @@ import ( "net/http" "strings" - "github.com/grafana/agent/internal/static/metrics/cluster/configapi" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/metrics/cluster/configapi" + "github.com/grafana/agent/static/metrics/instance" "gopkg.in/yaml.v2" ) diff --git a/internal/static/config/agent_management_remote_config_test.go b/static/config/agent_management_remote_config_test.go similarity index 98% rename from internal/static/config/agent_management_remote_config_test.go rename to static/config/agent_management_remote_config_test.go index 820801cf7074..c13d0179ece4 100644 --- a/internal/static/config/agent_management_remote_config_test.go +++ b/static/config/agent_management_remote_config_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - process_exporter "github.com/grafana/agent/internal/static/integrations/process_exporter" - "github.com/grafana/agent/internal/static/metrics/instance" + process_exporter "github.com/grafana/agent/static/integrations/process_exporter" + "github.com/grafana/agent/static/metrics/instance" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/stretchr/testify/require" diff --git a/internal/static/config/agentmanagement.go b/static/config/agentmanagement.go similarity index 99% rename from internal/static/config/agentmanagement.go rename to static/config/agentmanagement.go index 9f91ba21a7ee..5553c1c35875 100644 --- a/internal/static/config/agentmanagement.go +++ b/static/config/agentmanagement.go @@ -14,8 +14,8 @@ import ( "time" "github.com/go-kit/log/level" - "github.com/grafana/agent/internal/static/config/instrumentation" - "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/static/config/instrumentation" + "github.com/grafana/agent/static/server" "github.com/prometheus/common/config" "gopkg.in/yaml.v2" ) diff --git a/internal/static/config/agentmanagement_remote_config.go b/static/config/agentmanagement_remote_config.go similarity index 97% rename from internal/static/config/agentmanagement_remote_config.go rename to static/config/agentmanagement_remote_config.go index 6e658e705329..fa0da9f63f75 100644 --- a/internal/static/config/agentmanagement_remote_config.go +++ b/static/config/agentmanagement_remote_config.go @@ -4,9 +4,9 @@ import ( "bytes" "text/template" - "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/agent/static/integrations" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/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/internal/static/config/agentmanagement_test.go b/static/config/agentmanagement_test.go similarity index 99% rename from internal/static/config/agentmanagement_test.go rename to static/config/agentmanagement_test.go index 2cae67cfa6d7..a965b98f7507 100644 --- a/internal/static/config/agentmanagement_test.go +++ b/static/config/agentmanagement_test.go @@ -8,9 +8,9 @@ import ( "testing" "time" - "github.com/grafana/agent/internal/static/config/features" - "github.com/grafana/agent/internal/static/server" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/config/features" + "github.com/grafana/agent/static/server" "github.com/prometheus/common/config" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/static/config/config.go b/static/config/config.go similarity index 97% rename from internal/static/config/config.go rename to static/config/config.go index d6f732c2af23..0dac82c3647f 100644 --- a/internal/static/config/config.go +++ b/static/config/config.go @@ -13,14 +13,14 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "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/grafana/agent/static/config/encoder" + "github.com/grafana/agent/static/config/features" + "github.com/grafana/agent/static/config/instrumentation" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/static/metrics" + "github.com/grafana/agent/static/server" + "github.com/grafana/agent/static/traces" "github.com/prometheus/common/config" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" diff --git a/internal/static/config/config_test.go b/static/config/config_test.go similarity index 98% rename from internal/static/config/config_test.go rename to static/config/config_test.go index 8b7e7aef72b1..e2db634d725c 100644 --- a/internal/static/config/config_test.go +++ b/static/config/config_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" - "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" + "github.com/grafana/agent/static/config/encoder" + "github.com/grafana/agent/static/metrics" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/server" commonCfg "github.com/prometheus/common/config" "github.com/prometheus/common/model" promCfg "github.com/prometheus/prometheus/config" diff --git a/internal/static/config/encoder/encoder.go b/static/config/encoder/encoder.go similarity index 100% rename from internal/static/config/encoder/encoder.go rename to static/config/encoder/encoder.go diff --git a/internal/static/config/encoder/test_encoding_unknown.txt b/static/config/encoder/test_encoding_unknown.txt similarity index 100% rename from internal/static/config/encoder/test_encoding_unknown.txt rename to static/config/encoder/test_encoding_unknown.txt diff --git a/internal/static/config/encoder/test_encoding_utf16be.txt b/static/config/encoder/test_encoding_utf16be.txt similarity index 100% rename from internal/static/config/encoder/test_encoding_utf16be.txt rename to static/config/encoder/test_encoding_utf16be.txt diff --git a/internal/static/config/encoder/test_encoding_utf16le.txt b/static/config/encoder/test_encoding_utf16le.txt similarity index 100% rename from internal/static/config/encoder/test_encoding_utf16le.txt rename to static/config/encoder/test_encoding_utf16le.txt diff --git a/internal/static/config/encoder/test_encoding_utf32be.txt b/static/config/encoder/test_encoding_utf32be.txt similarity index 100% rename from internal/static/config/encoder/test_encoding_utf32be.txt rename to static/config/encoder/test_encoding_utf32be.txt diff --git a/internal/static/config/encoder/test_encoding_utf32le.txt b/static/config/encoder/test_encoding_utf32le.txt similarity index 100% rename from internal/static/config/encoder/test_encoding_utf32le.txt rename to static/config/encoder/test_encoding_utf32le.txt diff --git a/internal/static/config/encoder/test_encoding_utf8.txt b/static/config/encoder/test_encoding_utf8.txt similarity index 100% rename from internal/static/config/encoder/test_encoding_utf8.txt rename to static/config/encoder/test_encoding_utf8.txt diff --git a/internal/static/config/encoder/test_encoding_utf8bom.txt b/static/config/encoder/test_encoding_utf8bom.txt similarity index 100% rename from internal/static/config/encoder/test_encoding_utf8bom.txt rename to static/config/encoder/test_encoding_utf8bom.txt diff --git a/internal/static/config/features/features.go b/static/config/features/features.go similarity index 100% rename from internal/static/config/features/features.go rename to static/config/features/features.go diff --git a/internal/static/config/features/features_test.go b/static/config/features/features_test.go similarity index 100% rename from internal/static/config/features/features_test.go rename to static/config/features/features_test.go diff --git a/internal/static/config/instrumentation/agent_management_metrics.go b/static/config/instrumentation/agent_management_metrics.go similarity index 100% rename from internal/static/config/instrumentation/agent_management_metrics.go rename to static/config/instrumentation/agent_management_metrics.go diff --git a/internal/static/config/instrumentation/config_metrics.go b/static/config/instrumentation/config_metrics.go similarity index 100% rename from internal/static/config/instrumentation/config_metrics.go rename to static/config/instrumentation/config_metrics.go diff --git a/internal/static/config/instrumentation/remote_config_metrics.go b/static/config/instrumentation/remote_config_metrics.go similarity index 100% rename from internal/static/config/instrumentation/remote_config_metrics.go rename to static/config/instrumentation/remote_config_metrics.go diff --git a/internal/static/config/integrations.go b/static/config/integrations.go similarity index 96% rename from internal/static/config/integrations.go rename to static/config/integrations.go index c4ebb70ec3c5..fc6f1e0bfad4 100644 --- a/internal/static/config/integrations.go +++ b/static/config/integrations.go @@ -6,11 +6,11 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - 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" + v1 "github.com/grafana/agent/static/integrations" + v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/metrics" + "github.com/grafana/agent/static/server" "github.com/prometheus/statsd_exporter/pkg/level" "golang.org/x/exp/maps" "gopkg.in/yaml.v2" diff --git a/internal/static/config/integrations_test.go b/static/config/integrations_test.go similarity index 97% rename from internal/static/config/integrations_test.go rename to static/config/integrations_test.go index b0854f32199f..140984b292a8 100644 --- a/internal/static/config/integrations_test.go +++ b/static/config/integrations_test.go @@ -7,8 +7,8 @@ import ( "github.com/stretchr/testify/require" - _ "github.com/grafana/agent/internal/static/integrations/install" // Install integrations for tests "github.com/grafana/agent/internal/util" + _ "github.com/grafana/agent/static/integrations/install" // Install integrations for tests ) func TestIntegrations_v1(t *testing.T) { diff --git a/internal/static/config/remote_config.go b/static/config/remote_config.go similarity index 98% rename from internal/static/config/remote_config.go rename to static/config/remote_config.go index 6b23c89ea190..676349255b59 100644 --- a/internal/static/config/remote_config.go +++ b/static/config/remote_config.go @@ -7,7 +7,7 @@ import ( "net/url" "time" - "github.com/grafana/agent/internal/static/config/instrumentation" + "github.com/grafana/agent/static/config/instrumentation" "github.com/prometheus/common/config" ) diff --git a/internal/static/config/remote_config_test.go b/static/config/remote_config_test.go similarity index 100% rename from internal/static/config/remote_config_test.go rename to static/config/remote_config_test.go diff --git a/internal/static/config/testdata/server_empty.yml b/static/config/testdata/server_empty.yml similarity index 100% rename from internal/static/config/testdata/server_empty.yml rename to static/config/testdata/server_empty.yml diff --git a/internal/static/integrations/agent/agent.go b/static/integrations/agent/agent.go similarity index 93% rename from internal/static/integrations/agent/agent.go rename to static/integrations/agent/agent.go index 4134dc13c3d3..69eac33792af 100644 --- a/internal/static/integrations/agent/agent.go +++ b/static/integrations/agent/agent.go @@ -8,8 +8,8 @@ import ( "net/http" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/config" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/internal/static/integrations/apache_http/apache_http.go b/static/integrations/apache_http/apache_http.go similarity index 97% rename from internal/static/integrations/apache_http/apache_http.go rename to static/integrations/apache_http/apache_http.go index 522de99aefcd..d793fbcd9c8e 100644 --- a/internal/static/integrations/apache_http/apache_http.go +++ b/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/internal/static/integrations" + "github.com/grafana/agent/static/integrations" ) // DefaultConfig holds the default settings for the apache_http integration diff --git a/internal/static/integrations/azure_exporter/azure_exporter.go b/static/integrations/azure_exporter/azure_exporter.go similarity index 98% rename from internal/static/integrations/azure_exporter/azure_exporter.go rename to static/integrations/azure_exporter/azure_exporter.go index 1f18e240e744..c3803a7517db 100644 --- a/internal/static/integrations/azure_exporter/azure_exporter.go +++ b/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/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) type Exporter struct { diff --git a/internal/static/integrations/azure_exporter/config.go b/static/integrations/azure_exporter/config.go similarity index 98% rename from internal/static/integrations/azure_exporter/config.go rename to static/integrations/azure_exporter/config.go index 3cef29da5625..bc4e07a06ad0 100644 --- a/internal/static/integrations/azure_exporter/config.go +++ b/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/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" + "github.com/grafana/agent/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) func init() { diff --git a/internal/static/integrations/azure_exporter/config_test.go b/static/integrations/azure_exporter/config_test.go similarity index 99% rename from internal/static/integrations/azure_exporter/config_test.go rename to static/integrations/azure_exporter/config_test.go index 1065286ffcbd..21764fce5224 100644 --- a/internal/static/integrations/azure_exporter/config_test.go +++ b/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/internal/static/integrations/azure_exporter" + "github.com/grafana/agent/static/integrations/azure_exporter" ) func TestConfig_ToScrapeSettings(t *testing.T) { diff --git a/internal/static/integrations/blackbox_exporter/blackbox_exporter.go b/static/integrations/blackbox_exporter/blackbox_exporter.go similarity index 97% rename from internal/static/integrations/blackbox_exporter/blackbox_exporter.go rename to static/integrations/blackbox_exporter/blackbox_exporter.go index 28ffdaf95ce9..24046256f27a 100644 --- a/internal/static/integrations/blackbox_exporter/blackbox_exporter.go +++ b/static/integrations/blackbox_exporter/blackbox_exporter.go @@ -7,9 +7,9 @@ import ( "net/url" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/config" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/config" blackbox_config "github.com/prometheus/blackbox_exporter/config" "github.com/prometheus/blackbox_exporter/prober" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/static/integrations/blackbox_exporter/blackbox_exporter_test.go b/static/integrations/blackbox_exporter/blackbox_exporter_test.go similarity index 94% rename from internal/static/integrations/blackbox_exporter/blackbox_exporter_test.go rename to static/integrations/blackbox_exporter/blackbox_exporter_test.go index eb3bfb22bc39..15a6c01735fc 100644 --- a/internal/static/integrations/blackbox_exporter/blackbox_exporter_test.go +++ b/static/integrations/blackbox_exporter/blackbox_exporter_test.go @@ -4,7 +4,7 @@ import ( "net/url" "testing" - integrations "github.com/grafana/agent/internal/static/integrations/config" + integrations "github.com/grafana/agent/static/integrations/config" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) diff --git a/internal/static/integrations/cadvisor/cadvisor.go b/static/integrations/cadvisor/cadvisor.go similarity index 99% rename from internal/static/integrations/cadvisor/cadvisor.go rename to static/integrations/cadvisor/cadvisor.go index ec1094ab6808..7420c0879dd2 100644 --- a/internal/static/integrations/cadvisor/cadvisor.go +++ b/static/integrations/cadvisor/cadvisor.go @@ -20,7 +20,7 @@ import ( "k8s.io/klog/v2" "k8s.io/utils/clock" - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/static/integrations" // Register container providers diff --git a/internal/static/integrations/cadvisor/cadvisor_stub.go b/static/integrations/cadvisor/cadvisor_stub.go similarity index 88% rename from internal/static/integrations/cadvisor/cadvisor_stub.go rename to static/integrations/cadvisor/cadvisor_stub.go index 80a038b85d9c..dded056362e2 100644 --- a/internal/static/integrations/cadvisor/cadvisor_stub.go +++ b/static/integrations/cadvisor/cadvisor_stub.go @@ -3,7 +3,7 @@ package cadvisor //nolint:golint import ( - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/static/integrations" "github.com/go-kit/log" "github.com/go-kit/log/level" diff --git a/internal/static/integrations/cadvisor/cadvisor_test.go b/static/integrations/cadvisor/cadvisor_test.go similarity index 100% rename from internal/static/integrations/cadvisor/cadvisor_test.go rename to static/integrations/cadvisor/cadvisor_test.go diff --git a/internal/static/integrations/cadvisor/common.go b/static/integrations/cadvisor/common.go similarity index 96% rename from internal/static/integrations/cadvisor/common.go rename to static/integrations/cadvisor/common.go index 979f3e0f1359..8004a2edb25c 100644 --- a/internal/static/integrations/cadvisor/common.go +++ b/static/integrations/cadvisor/common.go @@ -4,9 +4,9 @@ import ( "time" "github.com/go-kit/log" - "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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) const name = "cadvisor" diff --git a/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go b/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go similarity index 98% rename from internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go rename to static/integrations/cloudwatch_exporter/cloudwatch_exporter.go index 81a2d876be2f..f77e2517720b 100644 --- a/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter.go +++ b/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/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) type cachingFactory interface { diff --git a/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go b/static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go similarity index 98% rename from internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go rename to static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go index cd418c4eeb90..e44768ded059 100644 --- a/internal/static/integrations/cloudwatch_exporter/cloudwatch_exporter_decoupled.go +++ b/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/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) // asyncExporter wraps YACE entrypoint around an Integration implementation diff --git a/internal/static/integrations/cloudwatch_exporter/config.go b/static/integrations/cloudwatch_exporter/config.go similarity index 98% rename from internal/static/integrations/cloudwatch_exporter/config.go rename to static/integrations/cloudwatch_exporter/config.go index 04390c1d3682..0bdf6dd92f29 100644 --- a/internal/static/integrations/cloudwatch_exporter/config.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) const ( diff --git a/internal/static/integrations/cloudwatch_exporter/config_test.go b/static/integrations/cloudwatch_exporter/config_test.go similarity index 100% rename from internal/static/integrations/cloudwatch_exporter/config_test.go rename to static/integrations/cloudwatch_exporter/config_test.go diff --git a/internal/static/integrations/cloudwatch_exporter/docs/doc.go b/static/integrations/cloudwatch_exporter/docs/doc.go similarity index 100% rename from internal/static/integrations/cloudwatch_exporter/docs/doc.go rename to static/integrations/cloudwatch_exporter/docs/doc.go diff --git a/internal/static/integrations/cloudwatch_exporter/docs/template.md b/static/integrations/cloudwatch_exporter/docs/template.md similarity index 100% rename from internal/static/integrations/cloudwatch_exporter/docs/template.md rename to static/integrations/cloudwatch_exporter/docs/template.md diff --git a/internal/static/integrations/collector_integration.go b/static/integrations/collector_integration.go similarity index 98% rename from internal/static/integrations/collector_integration.go rename to static/integrations/collector_integration.go index 54c3e4ffed0d..e9533f2e494b 100644 --- a/internal/static/integrations/collector_integration.go +++ b/static/integrations/collector_integration.go @@ -6,7 +6,7 @@ import ( "net/http" "github.com/grafana/agent/internal/build" - "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/internal/static/integrations/config/config.go b/static/integrations/config/config.go similarity index 100% rename from internal/static/integrations/config/config.go rename to static/integrations/config/config.go diff --git a/internal/static/integrations/consul_exporter/consul_exporter.go b/static/integrations/consul_exporter/consul_exporter.go similarity index 93% rename from internal/static/integrations/consul_exporter/consul_exporter.go rename to static/integrations/consul_exporter/consul_exporter.go index 83518f5bb913..454d5c48068e 100644 --- a/internal/static/integrations/consul_exporter/consul_exporter.go +++ b/static/integrations/consul_exporter/consul_exporter.go @@ -7,9 +7,9 @@ import ( "time" "github.com/go-kit/log" - "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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" consul_api "github.com/hashicorp/consul/api" "github.com/prometheus/consul_exporter/pkg/exporter" ) diff --git a/internal/static/integrations/dnsmasq_exporter/dnsmasq_exporter.go b/static/integrations/dnsmasq_exporter/dnsmasq_exporter.go similarity index 91% rename from internal/static/integrations/dnsmasq_exporter/dnsmasq_exporter.go rename to static/integrations/dnsmasq_exporter/dnsmasq_exporter.go index 67bdd03f6b81..c57e6801702d 100644 --- a/internal/static/integrations/dnsmasq_exporter/dnsmasq_exporter.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/miekg/dns" ) diff --git a/internal/static/integrations/elasticsearch_exporter/elasticsearch_exporter.go b/static/integrations/elasticsearch_exporter/elasticsearch_exporter.go similarity index 97% rename from internal/static/integrations/elasticsearch_exporter/elasticsearch_exporter.go rename to static/integrations/elasticsearch_exporter/elasticsearch_exporter.go index 980d491cd043..2d5c21286d05 100644 --- a/internal/static/integrations/elasticsearch_exporter/elasticsearch_exporter.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/prometheus/client_golang/prometheus" promCfg "github.com/prometheus/common/config" diff --git a/internal/static/integrations/elasticsearch_exporter/tls.go b/static/integrations/elasticsearch_exporter/tls.go similarity index 100% rename from internal/static/integrations/elasticsearch_exporter/tls.go rename to static/integrations/elasticsearch_exporter/tls.go diff --git a/internal/static/integrations/gcp_exporter/gcp_exporter.go b/static/integrations/gcp_exporter/gcp_exporter.go similarity index 96% rename from internal/static/integrations/gcp_exporter/gcp_exporter.go rename to static/integrations/gcp_exporter/gcp_exporter.go index 3b684e402ff1..853780d348f7 100644 --- a/internal/static/integrations/gcp_exporter/gcp_exporter.go +++ b/static/integrations/gcp_exporter/gcp_exporter.go @@ -22,9 +22,9 @@ import ( "google.golang.org/api/option" "gopkg.in/yaml.v2" - "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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) func init() { diff --git a/internal/static/integrations/gcp_exporter/gcp_exporter_test.go b/static/integrations/gcp_exporter/gcp_exporter_test.go similarity index 98% rename from internal/static/integrations/gcp_exporter/gcp_exporter_test.go rename to static/integrations/gcp_exporter/gcp_exporter_test.go index 075fd267b66c..e9bb46845d75 100644 --- a/internal/static/integrations/gcp_exporter/gcp_exporter_test.go +++ b/static/integrations/gcp_exporter/gcp_exporter_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/grafana/agent/internal/static/integrations/gcp_exporter" + "github.com/grafana/agent/static/integrations/gcp_exporter" ) func TestConfig_Validate(t *testing.T) { diff --git a/internal/static/integrations/github_exporter/github_exporter.go b/static/integrations/github_exporter/github_exporter.go similarity index 93% rename from internal/static/integrations/github_exporter/github_exporter.go rename to static/integrations/github_exporter/github_exporter.go index a28e8226ab13..3fbb7976235f 100644 --- a/internal/static/integrations/github_exporter/github_exporter.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" config_util "github.com/prometheus/common/config" ) diff --git a/internal/static/integrations/github_exporter/github_test.go b/static/integrations/github_exporter/github_test.go similarity index 86% rename from internal/static/integrations/github_exporter/github_test.go rename to static/integrations/github_exporter/github_test.go index 146db3f660e9..43470dab9f9b 100644 --- a/internal/static/integrations/github_exporter/github_test.go +++ b/static/integrations/github_exporter/github_test.go @@ -3,7 +3,7 @@ package github_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/static/config" // register github_exporter ) diff --git a/internal/static/integrations/handler_integration.go b/static/integrations/handler_integration.go similarity index 91% rename from internal/static/integrations/handler_integration.go rename to static/integrations/handler_integration.go index c3d02388d4bd..2528d44502c5 100644 --- a/internal/static/integrations/handler_integration.go +++ b/static/integrations/handler_integration.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) // NewHandlerIntegration creates a new named integration that will call handler diff --git a/static/integrations/install/install.go b/static/integrations/install/install.go new file mode 100644 index 000000000000..12d0aee30a0f --- /dev/null +++ b/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/static/integrations/agent" // register agent + _ "github.com/grafana/agent/static/integrations/apache_http" // register apache_exporter + _ "github.com/grafana/agent/static/integrations/azure_exporter" // register azure_exporter + _ "github.com/grafana/agent/static/integrations/blackbox_exporter" // register blackbox_exporter + _ "github.com/grafana/agent/static/integrations/cadvisor" // register cadvisor + _ "github.com/grafana/agent/static/integrations/cloudwatch_exporter" // register cloudwatch_exporter + _ "github.com/grafana/agent/static/integrations/consul_exporter" // register consul_exporter + _ "github.com/grafana/agent/static/integrations/dnsmasq_exporter" // register dnsmasq_exporter + _ "github.com/grafana/agent/static/integrations/elasticsearch_exporter" // register elasticsearch_exporter + _ "github.com/grafana/agent/static/integrations/gcp_exporter" // register gcp_exporter + _ "github.com/grafana/agent/static/integrations/github_exporter" // register github_exporter + _ "github.com/grafana/agent/static/integrations/kafka_exporter" // register kafka_exporter + _ "github.com/grafana/agent/static/integrations/memcached_exporter" // register memcached_exporter + _ "github.com/grafana/agent/static/integrations/mongodb_exporter" // register mongodb_exporter + _ "github.com/grafana/agent/static/integrations/mssql" // register mssql + _ "github.com/grafana/agent/static/integrations/mysqld_exporter" // register mysqld_exporter + _ "github.com/grafana/agent/static/integrations/node_exporter" // register node_exporter + _ "github.com/grafana/agent/static/integrations/oracledb_exporter" // register oracledb_exporter + _ "github.com/grafana/agent/static/integrations/postgres_exporter" // register postgres_exporter + _ "github.com/grafana/agent/static/integrations/process_exporter" // register process_exporter + _ "github.com/grafana/agent/static/integrations/redis_exporter" // register redis_exporter + _ "github.com/grafana/agent/static/integrations/snmp_exporter" // register snmp_exporter + _ "github.com/grafana/agent/static/integrations/snowflake_exporter" // register snowflake_exporter + _ "github.com/grafana/agent/static/integrations/squid_exporter" // register squid_exporter + _ "github.com/grafana/agent/static/integrations/statsd_exporter" // register statsd_exporter + _ "github.com/grafana/agent/static/integrations/vmware_exporter" // register vmware_exporter + _ "github.com/grafana/agent/static/integrations/windows_exporter" // register windows_exporter + + // + // v2 integrations + // + + _ "github.com/grafana/agent/static/integrations/v2/agent" // register agent + _ "github.com/grafana/agent/static/integrations/v2/apache_http" // register apache_exporter + _ "github.com/grafana/agent/static/integrations/v2/app_agent_receiver" // register app_agent_receiver + _ "github.com/grafana/agent/static/integrations/v2/blackbox_exporter" // register blackbox_exporter + _ "github.com/grafana/agent/static/integrations/v2/eventhandler" // register eventhandler + _ "github.com/grafana/agent/static/integrations/v2/snmp_exporter" // register snmp_exporter + _ "github.com/grafana/agent/static/integrations/v2/vmware_exporter" // register vmware_exporter +) diff --git a/internal/static/integrations/install/install_test.go b/static/integrations/install/install_test.go similarity index 94% rename from internal/static/integrations/install/install_test.go rename to static/integrations/install/install_test.go index fd7c2da76763..37f0a82fd0c4 100644 --- a/internal/static/integrations/install/install_test.go +++ b/static/integrations/install/install_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - v1 "github.com/grafana/agent/internal/static/integrations" - v2 "github.com/grafana/agent/internal/static/integrations/v2" + v1 "github.com/grafana/agent/static/integrations" + v2 "github.com/grafana/agent/static/integrations/v2" "github.com/stretchr/testify/require" ) diff --git a/internal/static/integrations/integration.go b/static/integrations/integration.go similarity index 97% rename from internal/static/integrations/integration.go rename to static/integrations/integration.go index d8ebe038750b..d4f81d4915fe 100644 --- a/internal/static/integrations/integration.go +++ b/static/integrations/integration.go @@ -5,7 +5,7 @@ import ( "net/http" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) // Config provides the configuration and constructor for an integration. diff --git a/internal/static/integrations/kafka_exporter/kafka_exporter.go b/static/integrations/kafka_exporter/kafka_exporter.go similarity index 96% rename from internal/static/integrations/kafka_exporter/kafka_exporter.go rename to static/integrations/kafka_exporter/kafka_exporter.go index e0e354f74cbd..6ae71a0742da 100644 --- a/internal/static/integrations/kafka_exporter/kafka_exporter.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) // DefaultConfig holds the default settings for the kafka_lag_exporter diff --git a/internal/static/integrations/kafka_exporter/kafka_test.go b/static/integrations/kafka_exporter/kafka_test.go similarity index 86% rename from internal/static/integrations/kafka_exporter/kafka_test.go rename to static/integrations/kafka_exporter/kafka_test.go index f8a67d2658a0..dfb3e195cc4f 100644 --- a/internal/static/integrations/kafka_exporter/kafka_test.go +++ b/static/integrations/kafka_exporter/kafka_test.go @@ -3,7 +3,7 @@ package kafka_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/static/config" ) func TestConfig_SecretKafkaPassword(t *testing.T) { diff --git a/internal/static/integrations/logruskit.go b/static/integrations/logruskit.go similarity index 100% rename from internal/static/integrations/logruskit.go rename to static/integrations/logruskit.go diff --git a/internal/static/integrations/manager.go b/static/integrations/manager.go similarity index 98% rename from internal/static/integrations/manager.go rename to static/integrations/manager.go index de22be37e8ca..b3fe3e8ef35c 100644 --- a/internal/static/integrations/manager.go +++ b/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/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/grafana/agent/static/metrics" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance/configstore" + "github.com/grafana/agent/static/server" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" "github.com/prometheus/common/model" diff --git a/internal/static/integrations/manager_test.go b/static/integrations/manager_test.go similarity index 99% rename from internal/static/integrations/manager_test.go rename to static/integrations/manager_test.go index e44dfb6c0908..f266268ddadc 100644 --- a/internal/static/integrations/manager_test.go +++ b/static/integrations/manager_test.go @@ -8,9 +8,9 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations/config" - "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/integrations/config" + "github.com/grafana/agent/static/metrics/instance" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/model" promConfig "github.com/prometheus/prometheus/config" diff --git a/internal/static/integrations/memcached_exporter/memcached_exporter.go b/static/integrations/memcached_exporter/memcached_exporter.go similarity index 92% rename from internal/static/integrations/memcached_exporter/memcached_exporter.go rename to static/integrations/memcached_exporter/memcached_exporter.go index 8d8e591568e7..783805f2a86b 100644 --- a/internal/static/integrations/memcached_exporter/memcached_exporter.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/prometheus/memcached_exporter/pkg/exporter" ) diff --git a/internal/static/integrations/mongodb_exporter/mongodb_exporter.go b/static/integrations/mongodb_exporter/mongodb_exporter.go similarity index 93% rename from internal/static/integrations/mongodb_exporter/mongodb_exporter.go rename to static/integrations/mongodb_exporter/mongodb_exporter.go index a07c45071d4d..2f1b46937aa0 100644 --- a/internal/static/integrations/mongodb_exporter/mongodb_exporter.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) var DefaultConfig = Config{ diff --git a/internal/static/integrations/mongodb_exporter/mongodb_test.go b/static/integrations/mongodb_exporter/mongodb_test.go similarity index 86% rename from internal/static/integrations/mongodb_exporter/mongodb_test.go rename to static/integrations/mongodb_exporter/mongodb_test.go index b1fac94934c1..da0a0bbe60c1 100644 --- a/internal/static/integrations/mongodb_exporter/mongodb_test.go +++ b/static/integrations/mongodb_exporter/mongodb_test.go @@ -3,7 +3,7 @@ package mongodb_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/static/config" ) func TestConfig_SecretMongoDB(t *testing.T) { diff --git a/internal/static/integrations/mssql/collector.go b/static/integrations/mssql/collector.go similarity index 100% rename from internal/static/integrations/mssql/collector.go rename to static/integrations/mssql/collector.go diff --git a/internal/static/integrations/mssql/collector_config.yaml b/static/integrations/mssql/collector_config.yaml similarity index 100% rename from internal/static/integrations/mssql/collector_config.yaml rename to static/integrations/mssql/collector_config.yaml diff --git a/internal/static/integrations/mssql/collector_test.go b/static/integrations/mssql/collector_test.go similarity index 100% rename from internal/static/integrations/mssql/collector_test.go rename to static/integrations/mssql/collector_test.go diff --git a/internal/static/integrations/mssql/sql_exporter.go b/static/integrations/mssql/sql_exporter.go similarity index 95% rename from internal/static/integrations/mssql/sql_exporter.go rename to static/integrations/mssql/sql_exporter.go index f378b7f90f65..f54ae51b6243 100644 --- a/internal/static/integrations/mssql/sql_exporter.go +++ b/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/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/grafana/agent/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/prometheus/common/model" ) diff --git a/internal/static/integrations/mssql/sql_exporter_test.go b/static/integrations/mssql/sql_exporter_test.go similarity index 100% rename from internal/static/integrations/mssql/sql_exporter_test.go rename to static/integrations/mssql/sql_exporter_test.go diff --git a/internal/static/integrations/mysqld_exporter/mysqld-exporter.go b/static/integrations/mysqld_exporter/mysqld-exporter.go similarity index 97% rename from internal/static/integrations/mysqld_exporter/mysqld-exporter.go rename to static/integrations/mysqld_exporter/mysqld-exporter.go index eae4294fda9b..d52048889e50 100644 --- a/internal/static/integrations/mysqld_exporter/mysqld-exporter.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/prometheus/mysqld_exporter/collector" ) diff --git a/internal/static/integrations/mysqld_exporter/mysqld_test.go b/static/integrations/mysqld_exporter/mysqld_test.go similarity index 86% rename from internal/static/integrations/mysqld_exporter/mysqld_test.go rename to static/integrations/mysqld_exporter/mysqld_test.go index 7c620ee409f6..c9b8f47655d0 100644 --- a/internal/static/integrations/mysqld_exporter/mysqld_test.go +++ b/static/integrations/mysqld_exporter/mysqld_test.go @@ -3,7 +3,7 @@ package mysqld_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/static/config" ) func TestConfig_SecretMysqlD(t *testing.T) { diff --git a/internal/static/integrations/node_exporter/collectors.go b/static/integrations/node_exporter/collectors.go similarity index 100% rename from internal/static/integrations/node_exporter/collectors.go rename to static/integrations/node_exporter/collectors.go diff --git a/internal/static/integrations/node_exporter/config.go b/static/integrations/node_exporter/config.go similarity index 98% rename from internal/static/integrations/node_exporter/config.go rename to static/integrations/node_exporter/config.go index 4dda0d7266d3..5f170e9a1606 100644 --- a/internal/static/integrations/node_exporter/config.go +++ b/static/integrations/node_exporter/config.go @@ -8,9 +8,9 @@ import ( "time" "github.com/go-kit/log" - "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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/grafana/dskit/flagext" "github.com/prometheus/node_exporter/collector" "github.com/prometheus/procfs" diff --git a/internal/static/integrations/node_exporter/config_test.go b/static/integrations/node_exporter/config_test.go similarity index 100% rename from internal/static/integrations/node_exporter/config_test.go rename to static/integrations/node_exporter/config_test.go diff --git a/internal/static/integrations/node_exporter/node_exporter.go b/static/integrations/node_exporter/node_exporter.go similarity index 97% rename from internal/static/integrations/node_exporter/node_exporter.go rename to static/integrations/node_exporter/node_exporter.go index 3833c5103e30..bd162f2b0ae4 100644 --- a/internal/static/integrations/node_exporter/node_exporter.go +++ b/static/integrations/node_exporter/node_exporter.go @@ -11,7 +11,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/grafana/agent/internal/build" - "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/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/internal/static/integrations/node_exporter/node_exporter_linux.go b/static/integrations/node_exporter/node_exporter_linux.go similarity index 100% rename from internal/static/integrations/node_exporter/node_exporter_linux.go rename to static/integrations/node_exporter/node_exporter_linux.go diff --git a/internal/static/integrations/node_exporter/node_exporter_test.go b/static/integrations/node_exporter/node_exporter_test.go similarity index 100% rename from internal/static/integrations/node_exporter/node_exporter_test.go rename to static/integrations/node_exporter/node_exporter_test.go diff --git a/internal/static/integrations/node_exporter/node_exporter_windows.go b/static/integrations/node_exporter/node_exporter_windows.go similarity index 94% rename from internal/static/integrations/node_exporter/node_exporter_windows.go rename to static/integrations/node_exporter/node_exporter_windows.go index 0dfdf4460142..db62b6f9a0e5 100644 --- a/internal/static/integrations/node_exporter/node_exporter_windows.go +++ b/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/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) // Integration is the node_exporter integration. On Windows platforms, diff --git a/internal/static/integrations/oracledb_exporter/oracledb_exporter.go b/static/integrations/oracledb_exporter/oracledb_exporter.go similarity index 94% rename from internal/static/integrations/oracledb_exporter/oracledb_exporter.go rename to static/integrations/oracledb_exporter/oracledb_exporter.go index c4385e5aa2e9..aaa3c3f33466 100644 --- a/internal/static/integrations/oracledb_exporter/oracledb_exporter.go +++ b/static/integrations/oracledb_exporter/oracledb_exporter.go @@ -7,14 +7,14 @@ import ( "os" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/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/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" config_util "github.com/prometheus/common/config" ) diff --git a/internal/static/integrations/oracledb_exporter/oracledb_exporter_test.go b/static/integrations/oracledb_exporter/oracledb_exporter_test.go similarity index 100% rename from internal/static/integrations/oracledb_exporter/oracledb_exporter_test.go rename to static/integrations/oracledb_exporter/oracledb_exporter_test.go diff --git a/internal/static/integrations/postgres_exporter/postgres_exporter.go b/static/integrations/postgres_exporter/postgres_exporter.go similarity index 96% rename from internal/static/integrations/postgres_exporter/postgres_exporter.go rename to static/integrations/postgres_exporter/postgres_exporter.go index d1384cc46633..704e4c35d4be 100644 --- a/internal/static/integrations/postgres_exporter/postgres_exporter.go +++ b/static/integrations/postgres_exporter/postgres_exporter.go @@ -7,9 +7,9 @@ import ( "strings" "github.com/go-kit/log" - "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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/lib/pq" "github.com/prometheus-community/postgres_exporter/cmd/postgres_exporter" "github.com/prometheus-community/postgres_exporter/collector" diff --git a/internal/static/integrations/postgres_exporter/postgres_exporter_test.go b/static/integrations/postgres_exporter/postgres_exporter_test.go similarity index 100% rename from internal/static/integrations/postgres_exporter/postgres_exporter_test.go rename to static/integrations/postgres_exporter/postgres_exporter_test.go diff --git a/internal/static/integrations/postgres_exporter/postgres_test.go b/static/integrations/postgres_exporter/postgres_test.go similarity index 89% rename from internal/static/integrations/postgres_exporter/postgres_test.go rename to static/integrations/postgres_exporter/postgres_test.go index cb189ee7196b..e415e9b3a9dd 100644 --- a/internal/static/integrations/postgres_exporter/postgres_test.go +++ b/static/integrations/postgres_exporter/postgres_test.go @@ -3,7 +3,7 @@ package postgres_exporter //nolint:golint import ( "testing" - "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/static/config" ) func TestConfig_SecretPostgres(t *testing.T) { diff --git a/internal/static/integrations/process_exporter/config.go b/static/integrations/process_exporter/config.go similarity index 89% rename from internal/static/integrations/process_exporter/config.go rename to static/integrations/process_exporter/config.go index a43bb45074ad..82dc6737fc5f 100644 --- a/internal/static/integrations/process_exporter/config.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" exporter_config "github.com/ncabatoff/process-exporter/config" ) diff --git a/internal/static/integrations/process_exporter/process-exporter.go b/static/integrations/process_exporter/process-exporter.go similarity index 95% rename from internal/static/integrations/process_exporter/process-exporter.go rename to static/integrations/process_exporter/process-exporter.go index 14f9d14db931..ca14996e9835 100644 --- a/internal/static/integrations/process_exporter/process-exporter.go +++ b/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/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) // Integration is the process_exporter integration. On non-Linux platforms, diff --git a/internal/static/integrations/process_exporter/process-exporter_linux.go b/static/integrations/process_exporter/process-exporter_linux.go similarity index 97% rename from internal/static/integrations/process_exporter/process-exporter_linux.go rename to static/integrations/process_exporter/process-exporter_linux.go index 1194f7e11c2c..a708ce3dd33b 100644 --- a/internal/static/integrations/process_exporter/process-exporter_linux.go +++ b/static/integrations/process_exporter/process-exporter_linux.go @@ -8,7 +8,7 @@ import ( "github.com/go-kit/log" "github.com/grafana/agent/internal/build" - "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/internal/static/integrations/redis_exporter/redis_exporter.go b/static/integrations/redis_exporter/redis_exporter.go similarity index 97% rename from internal/static/integrations/redis_exporter/redis_exporter.go rename to static/integrations/redis_exporter/redis_exporter.go index 3b34b200796f..3d1ec23fc69b 100644 --- a/internal/static/integrations/redis_exporter/redis_exporter.go +++ b/static/integrations/redis_exporter/redis_exporter.go @@ -8,9 +8,9 @@ import ( "strings" "time" - "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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/go-kit/log" "github.com/go-kit/log/level" diff --git a/internal/static/integrations/redis_exporter/redis_exporter_test.go b/static/integrations/redis_exporter/redis_exporter_test.go similarity index 99% rename from internal/static/integrations/redis_exporter/redis_exporter_test.go rename to static/integrations/redis_exporter/redis_exporter_test.go index 6b10be315f2b..4b5281dab736 100644 --- a/internal/static/integrations/redis_exporter/redis_exporter_test.go +++ b/static/integrations/redis_exporter/redis_exporter_test.go @@ -8,7 +8,7 @@ import ( "net/http/httptest" "testing" - "github.com/grafana/agent/internal/static/config" + "github.com/grafana/agent/static/config" "gopkg.in/yaml.v2" "github.com/go-kit/log" diff --git a/internal/static/integrations/redis_exporter/testdata/password_map_file.json b/static/integrations/redis_exporter/testdata/password_map_file.json similarity index 100% rename from internal/static/integrations/redis_exporter/testdata/password_map_file.json rename to static/integrations/redis_exporter/testdata/password_map_file.json diff --git a/internal/static/integrations/register.go b/static/integrations/register.go similarity index 99% rename from internal/static/integrations/register.go rename to static/integrations/register.go index 9a5c4734ee13..cc69513cdd33 100644 --- a/internal/static/integrations/register.go +++ b/static/integrations/register.go @@ -5,8 +5,8 @@ import ( "reflect" "strings" - "github.com/grafana/agent/internal/static/integrations/config" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/integrations/config" "gopkg.in/yaml.v2" ) diff --git a/internal/static/integrations/register_test.go b/static/integrations/register_test.go similarity index 100% rename from internal/static/integrations/register_test.go rename to static/integrations/register_test.go diff --git a/internal/static/integrations/snmp_exporter/common/common.go b/static/integrations/snmp_exporter/common/common.go similarity index 100% rename from internal/static/integrations/snmp_exporter/common/common.go rename to static/integrations/snmp_exporter/common/common.go diff --git a/internal/static/integrations/snmp_exporter/common/snmp.yml b/static/integrations/snmp_exporter/common/snmp.yml similarity index 100% rename from internal/static/integrations/snmp_exporter/common/snmp.yml rename to static/integrations/snmp_exporter/common/snmp.yml diff --git a/internal/static/integrations/snmp_exporter/common/snmp.yml.gz b/static/integrations/snmp_exporter/common/snmp.yml.gz similarity index 100% rename from internal/static/integrations/snmp_exporter/common/snmp.yml.gz rename to static/integrations/snmp_exporter/common/snmp.yml.gz diff --git a/internal/static/integrations/snmp_exporter/snmp.go b/static/integrations/snmp_exporter/snmp.go similarity index 100% rename from internal/static/integrations/snmp_exporter/snmp.go rename to static/integrations/snmp_exporter/snmp.go diff --git a/internal/static/integrations/snmp_exporter/snmp_exporter.go b/static/integrations/snmp_exporter/snmp_exporter.go similarity index 96% rename from internal/static/integrations/snmp_exporter/snmp_exporter.go rename to static/integrations/snmp_exporter/snmp_exporter.go index c03ead4a4705..12372a1efe1e 100644 --- a/internal/static/integrations/snmp_exporter/snmp_exporter.go +++ b/static/integrations/snmp_exporter/snmp_exporter.go @@ -8,9 +8,9 @@ import ( "net/url" "github.com/go-kit/log" - "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/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/config" + snmp_common "github.com/grafana/agent/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/internal/static/integrations/snmp_exporter/snmp_exporter_test.go b/static/integrations/snmp_exporter/snmp_exporter_test.go similarity index 100% rename from internal/static/integrations/snmp_exporter/snmp_exporter_test.go rename to static/integrations/snmp_exporter/snmp_exporter_test.go diff --git a/internal/static/integrations/snowflake_exporter/snowflake_exporter.go b/static/integrations/snowflake_exporter/snowflake_exporter.go similarity index 90% rename from internal/static/integrations/snowflake_exporter/snowflake_exporter.go rename to static/integrations/snowflake_exporter/snowflake_exporter.go index ef01a7cf38d7..e30dec1f9223 100644 --- a/internal/static/integrations/snowflake_exporter/snowflake_exporter.go +++ b/static/integrations/snowflake_exporter/snowflake_exporter.go @@ -2,9 +2,9 @@ package snowflake_exporter import ( "github.com/go-kit/log" - "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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/grafana/snowflake-prometheus-exporter/collector" config_util "github.com/prometheus/common/config" ) diff --git a/internal/static/integrations/snowflake_exporter/snowflake_exporter_test.go b/static/integrations/snowflake_exporter/snowflake_exporter_test.go similarity index 100% rename from internal/static/integrations/snowflake_exporter/snowflake_exporter_test.go rename to static/integrations/snowflake_exporter/snowflake_exporter_test.go diff --git a/internal/static/integrations/squid_exporter/squid_exporter.go b/static/integrations/squid_exporter/squid_exporter.go similarity index 92% rename from internal/static/integrations/squid_exporter/squid_exporter.go rename to static/integrations/squid_exporter/squid_exporter.go index 9ec368f70b98..623117723f39 100644 --- a/internal/static/integrations/squid_exporter/squid_exporter.go +++ b/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/internal/static/integrations" + "github.com/grafana/agent/static/integrations" config_util "github.com/prometheus/common/config" - integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) var ( diff --git a/internal/static/integrations/squid_exporter/squid_exporter_test.go b/static/integrations/squid_exporter/squid_exporter_test.go similarity index 100% rename from internal/static/integrations/squid_exporter/squid_exporter_test.go rename to static/integrations/squid_exporter/squid_exporter_test.go diff --git a/internal/static/integrations/statsd_exporter/metrics.go b/static/integrations/statsd_exporter/metrics.go similarity index 100% rename from internal/static/integrations/statsd_exporter/metrics.go rename to static/integrations/statsd_exporter/metrics.go diff --git a/internal/static/integrations/statsd_exporter/statsd_exporter.go b/static/integrations/statsd_exporter/statsd_exporter.go similarity index 97% rename from internal/static/integrations/statsd_exporter/statsd_exporter.go rename to static/integrations/statsd_exporter/statsd_exporter.go index 6b0f7a8fbeb2..af4adef3db2d 100644 --- a/internal/static/integrations/statsd_exporter/statsd_exporter.go +++ b/static/integrations/statsd_exporter/statsd_exporter.go @@ -13,10 +13,10 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "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/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/config" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/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/internal/static/integrations/stub_integration.go b/static/integrations/stub_integration.go similarity index 91% rename from internal/static/integrations/stub_integration.go rename to static/integrations/stub_integration.go index 2d118ff82c3e..eb33a1c4f81e 100644 --- a/internal/static/integrations/stub_integration.go +++ b/static/integrations/stub_integration.go @@ -4,7 +4,7 @@ import ( "context" "net/http" - "github.com/grafana/agent/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) // StubIntegration implements a no-op integration for use on platforms not supported by an integration diff --git a/internal/static/integrations/v2/agent/agent.go b/static/integrations/v2/agent/agent.go similarity index 88% rename from internal/static/integrations/v2/agent/agent.go rename to static/integrations/v2/agent/agent.go index deeaa1d8ca1b..ac7ef4d00cd8 100644 --- a/internal/static/integrations/v2/agent/agent.go +++ b/static/integrations/v2/agent/agent.go @@ -5,9 +5,9 @@ package agent import ( "github.com/go-kit/log" - "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/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/internal/static/integrations/v2/apache_http/apache_http.go b/static/integrations/v2/apache_http/apache_http.go similarity index 93% rename from internal/static/integrations/v2/apache_http/apache_http.go rename to static/integrations/v2/apache_http/apache_http.go index cdffaebab21e..b2014d6cbafd 100644 --- a/internal/static/integrations/v2/apache_http/apache_http.go +++ b/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/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/common" - "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" ) diff --git a/internal/static/integrations/v2/apache_http/apache_http_test.go b/static/integrations/v2/apache_http/apache_http_test.go similarity index 86% rename from internal/static/integrations/v2/apache_http/apache_http_test.go rename to static/integrations/v2/apache_http/apache_http_test.go index 8480eb1b564e..e09ed49c277e 100644 --- a/internal/static/integrations/v2/apache_http/apache_http_test.go +++ b/static/integrations/v2/apache_http/apache_http_test.go @@ -4,7 +4,7 @@ import ( "fmt" "testing" - integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" "github.com/stretchr/testify/require" ) diff --git a/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver.go b/static/integrations/v2/app_agent_receiver/app_agent_receiver.go similarity index 96% rename from internal/static/integrations/v2/app_agent_receiver/app_agent_receiver.go rename to static/integrations/v2/app_agent_receiver/app_agent_receiver.go index f1bdd00adb96..39d7ebe08014 100644 --- a/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver.go +++ b/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/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/metricsutils" - "github.com/grafana/agent/internal/static/traces/pushreceiver" + "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" + "github.com/grafana/agent/static/traces/pushreceiver" "github.com/grafana/dskit/instrument" "github.com/grafana/dskit/middleware" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go b/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go similarity index 94% rename from internal/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go rename to static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go index f44db4c038b8..5a2f428bf21b 100644 --- a/internal/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go +++ b/static/integrations/v2/app_agent_receiver/app_agent_receiver_test.go @@ -10,11 +10,11 @@ import ( "testing" "time" - "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/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/server" + "github.com/grafana/agent/static/traces" + "github.com/grafana/agent/static/traces/traceutils" "github.com/phayes/freeport" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/assert" diff --git a/internal/static/integrations/v2/app_agent_receiver/config.go b/static/integrations/v2/app_agent_receiver/config.go similarity index 96% rename from internal/static/integrations/v2/app_agent_receiver/config.go rename to static/integrations/v2/app_agent_receiver/config.go index 32d1b1238911..92689d079a19 100644 --- a/internal/static/integrations/v2/app_agent_receiver/config.go +++ b/static/integrations/v2/app_agent_receiver/config.go @@ -3,8 +3,8 @@ package app_agent_receiver import ( "time" - "github.com/grafana/agent/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" ) const ( diff --git a/internal/static/integrations/v2/app_agent_receiver/config_test.go b/static/integrations/v2/app_agent_receiver/config_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/config_test.go rename to static/integrations/v2/app_agent_receiver/config_test.go diff --git a/internal/static/integrations/v2/app_agent_receiver/handler.go b/static/integrations/v2/app_agent_receiver/handler.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/handler.go rename to static/integrations/v2/app_agent_receiver/handler.go diff --git a/internal/static/integrations/v2/app_agent_receiver/handler_test.go b/static/integrations/v2/app_agent_receiver/handler_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/handler_test.go rename to static/integrations/v2/app_agent_receiver/handler_test.go diff --git a/internal/static/integrations/v2/app_agent_receiver/logs_exporter.go b/static/integrations/v2/app_agent_receiver/logs_exporter.go similarity index 98% rename from internal/static/integrations/v2/app_agent_receiver/logs_exporter.go rename to static/integrations/v2/app_agent_receiver/logs_exporter.go index 31295a5060b8..3c20f0643525 100644 --- a/internal/static/integrations/v2/app_agent_receiver/logs_exporter.go +++ b/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/internal/static/logs" + "github.com/grafana/agent/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/internal/static/integrations/v2/app_agent_receiver/logs_exporter_test.go b/static/integrations/v2/app_agent_receiver/logs_exporter_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/logs_exporter_test.go rename to static/integrations/v2/app_agent_receiver/logs_exporter_test.go diff --git a/internal/static/integrations/v2/app_agent_receiver/payload.go b/static/integrations/v2/app_agent_receiver/payload.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/payload.go rename to static/integrations/v2/app_agent_receiver/payload.go diff --git a/internal/static/integrations/v2/app_agent_receiver/payload_test.go b/static/integrations/v2/app_agent_receiver/payload_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/payload_test.go rename to static/integrations/v2/app_agent_receiver/payload_test.go diff --git a/internal/static/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go b/static/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go rename to static/integrations/v2/app_agent_receiver/receiver_metrics_exporter.go diff --git a/internal/static/integrations/v2/app_agent_receiver/receiver_metrics_test.go b/static/integrations/v2/app_agent_receiver/receiver_metrics_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/receiver_metrics_test.go rename to static/integrations/v2/app_agent_receiver/receiver_metrics_test.go diff --git a/internal/static/integrations/v2/app_agent_receiver/sourcemaps.go b/static/integrations/v2/app_agent_receiver/sourcemaps.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/sourcemaps.go rename to static/integrations/v2/app_agent_receiver/sourcemaps.go diff --git a/internal/static/integrations/v2/app_agent_receiver/sourcemaps_test.go b/static/integrations/v2/app_agent_receiver/sourcemaps_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/sourcemaps_test.go rename to static/integrations/v2/app_agent_receiver/sourcemaps_test.go diff --git a/internal/static/integrations/v2/app_agent_receiver/testdata/foo.js b/static/integrations/v2/app_agent_receiver/testdata/foo.js similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/testdata/foo.js rename to static/integrations/v2/app_agent_receiver/testdata/foo.js diff --git a/internal/static/integrations/v2/app_agent_receiver/testdata/foo.js.map b/static/integrations/v2/app_agent_receiver/testdata/foo.js.map similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/testdata/foo.js.map rename to static/integrations/v2/app_agent_receiver/testdata/foo.js.map diff --git a/internal/static/integrations/v2/app_agent_receiver/testdata/payload.json b/static/integrations/v2/app_agent_receiver/testdata/payload.json similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/testdata/payload.json rename to static/integrations/v2/app_agent_receiver/testdata/payload.json diff --git a/internal/static/integrations/v2/app_agent_receiver/testdata/payload_2.json b/static/integrations/v2/app_agent_receiver/testdata/payload_2.json similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/testdata/payload_2.json rename to static/integrations/v2/app_agent_receiver/testdata/payload_2.json diff --git a/internal/static/integrations/v2/app_agent_receiver/traces_exporter.go b/static/integrations/v2/app_agent_receiver/traces_exporter.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/traces_exporter.go rename to static/integrations/v2/app_agent_receiver/traces_exporter.go diff --git a/internal/static/integrations/v2/app_agent_receiver/traces_test.go b/static/integrations/v2/app_agent_receiver/traces_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/traces_test.go rename to static/integrations/v2/app_agent_receiver/traces_test.go diff --git a/internal/static/integrations/v2/app_agent_receiver/utils.go b/static/integrations/v2/app_agent_receiver/utils.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/utils.go rename to static/integrations/v2/app_agent_receiver/utils.go diff --git a/internal/static/integrations/v2/app_agent_receiver/utils_test.go b/static/integrations/v2/app_agent_receiver/utils_test.go similarity index 100% rename from internal/static/integrations/v2/app_agent_receiver/utils_test.go rename to static/integrations/v2/app_agent_receiver/utils_test.go diff --git a/internal/static/integrations/v2/autoscrape/appender.go b/static/integrations/v2/autoscrape/appender.go similarity index 100% rename from internal/static/integrations/v2/autoscrape/appender.go rename to static/integrations/v2/autoscrape/appender.go diff --git a/internal/static/integrations/v2/autoscrape/autoscrape.go b/static/integrations/v2/autoscrape/autoscrape.go similarity index 98% rename from internal/static/integrations/v2/autoscrape/autoscrape.go rename to static/integrations/v2/autoscrape/autoscrape.go index 8d1bd02ae07f..9f1a25e0be73 100644 --- a/internal/static/integrations/v2/autoscrape/autoscrape.go +++ b/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/internal/static/metrics" - "github.com/grafana/agent/internal/static/metrics/instance" - "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/static/metrics" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/server" "github.com/oklog/run" config_util "github.com/prometheus/common/config" "github.com/prometheus/common/model" diff --git a/internal/static/integrations/v2/autoscrape/autoscrape_test.go b/static/integrations/v2/autoscrape/autoscrape_test.go similarity index 98% rename from internal/static/integrations/v2/autoscrape/autoscrape_test.go rename to static/integrations/v2/autoscrape/autoscrape_test.go index 9aaa148ecdc8..e716f6165e0b 100644 --- a/internal/static/integrations/v2/autoscrape/autoscrape_test.go +++ b/static/integrations/v2/autoscrape/autoscrape_test.go @@ -6,8 +6,8 @@ import ( "testing" "time" - "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/metrics/instance" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/model" prom_config "github.com/prometheus/prometheus/config" diff --git a/internal/static/integrations/v2/blackbox_exporter/blackbox.go b/static/integrations/v2/blackbox_exporter/blackbox.go similarity index 93% rename from internal/static/integrations/v2/blackbox_exporter/blackbox.go rename to static/integrations/v2/blackbox_exporter/blackbox.go index e06a20d96838..4456cd5f5653 100644 --- a/internal/static/integrations/v2/blackbox_exporter/blackbox.go +++ b/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/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" + "github.com/grafana/agent/static/integrations/blackbox_exporter" + "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/autoscrape" + "github.com/grafana/agent/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/internal/static/integrations/v2/blackbox_exporter/blackbox_exporter.go b/static/integrations/v2/blackbox_exporter/blackbox_exporter.go similarity index 92% rename from internal/static/integrations/v2/blackbox_exporter/blackbox_exporter.go rename to static/integrations/v2/blackbox_exporter/blackbox_exporter.go index 1f4ffdc48916..c9f8417ffa02 100644 --- a/internal/static/integrations/v2/blackbox_exporter/blackbox_exporter.go +++ b/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/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" + "github.com/grafana/agent/static/integrations/blackbox_exporter" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" blackbox_config "github.com/prometheus/blackbox_exporter/config" "gopkg.in/yaml.v3" ) diff --git a/internal/static/integrations/v2/blackbox_exporter/blackbox_test.go b/static/integrations/v2/blackbox_exporter/blackbox_test.go similarity index 80% rename from internal/static/integrations/v2/blackbox_exporter/blackbox_test.go rename to static/integrations/v2/blackbox_exporter/blackbox_test.go index 9b798f1ad31a..f6aa00a3292a 100644 --- a/internal/static/integrations/v2/blackbox_exporter/blackbox_test.go +++ b/static/integrations/v2/blackbox_exporter/blackbox_test.go @@ -3,11 +3,11 @@ package blackbox_exporter_v2 import ( "testing" - "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/grafana/agent/static/integrations/blackbox_exporter" + "github.com/grafana/agent/static/integrations/v2" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + autoscrape "github.com/grafana/agent/static/integrations/v2/autoscrape" + "github.com/grafana/agent/static/integrations/v2/common" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/stretchr/testify/require" diff --git a/internal/static/integrations/v2/common/metrics.go b/static/integrations/v2/common/metrics.go similarity index 93% rename from internal/static/integrations/v2/common/metrics.go rename to static/integrations/v2/common/metrics.go index 1e83a8bb94f8..61e16822a5d0 100644 --- a/internal/static/integrations/v2/common/metrics.go +++ b/static/integrations/v2/common/metrics.go @@ -1,7 +1,7 @@ package common import ( - "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/static/integrations/v2/autoscrape" "github.com/prometheus/prometheus/model/labels" ) diff --git a/internal/static/integrations/v2/controller.go b/static/integrations/v2/controller.go similarity index 99% rename from internal/static/integrations/v2/controller.go rename to static/integrations/v2/controller.go index b01a6661191d..24276707e996 100644 --- a/internal/static/integrations/v2/controller.go +++ b/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/internal/static/integrations/v2/autoscrape" + "github.com/grafana/agent/static/integrations/v2/autoscrape" "github.com/prometheus/prometheus/discovery" http_sd "github.com/prometheus/prometheus/discovery/http" "go.uber.org/atomic" diff --git a/internal/static/integrations/v2/controller_httpintegration_test.go b/static/integrations/v2/controller_httpintegration_test.go similarity index 100% rename from internal/static/integrations/v2/controller_httpintegration_test.go rename to static/integrations/v2/controller_httpintegration_test.go diff --git a/internal/static/integrations/v2/controller_metricsintegration_test.go b/static/integrations/v2/controller_metricsintegration_test.go similarity index 98% rename from internal/static/integrations/v2/controller_metricsintegration_test.go rename to static/integrations/v2/controller_metricsintegration_test.go index 67222e61fe2b..fd9c9e7f83b4 100644 --- a/internal/static/integrations/v2/controller_metricsintegration_test.go +++ b/static/integrations/v2/controller_metricsintegration_test.go @@ -6,8 +6,8 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/integrations/v2/autoscrape" "github.com/prometheus/common/model" prom_config "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/internal/static/integrations/v2/controller_test.go b/static/integrations/v2/controller_test.go similarity index 100% rename from internal/static/integrations/v2/controller_test.go rename to static/integrations/v2/controller_test.go diff --git a/internal/static/integrations/v2/controller_updateintegration_test.go b/static/integrations/v2/controller_updateintegration_test.go similarity index 100% rename from internal/static/integrations/v2/controller_updateintegration_test.go rename to static/integrations/v2/controller_updateintegration_test.go diff --git a/internal/static/integrations/v2/eventhandler/eventhandler.go b/static/integrations/v2/eventhandler/eventhandler.go similarity index 99% rename from internal/static/integrations/v2/eventhandler/eventhandler.go rename to static/integrations/v2/eventhandler/eventhandler.go index efb94e206deb..430f6f127eda 100644 --- a/internal/static/integrations/v2/eventhandler/eventhandler.go +++ b/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/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/logs" "github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" diff --git a/internal/static/integrations/v2/eventhandler/eventhandler_test.go b/static/integrations/v2/eventhandler/eventhandler_test.go similarity index 100% rename from internal/static/integrations/v2/eventhandler/eventhandler_test.go rename to static/integrations/v2/eventhandler/eventhandler_test.go diff --git a/internal/static/integrations/v2/eventhandler/integration.go b/static/integrations/v2/eventhandler/integration.go similarity index 98% rename from internal/static/integrations/v2/eventhandler/integration.go rename to static/integrations/v2/eventhandler/integration.go index caba0084e239..5059cfe05a50 100644 --- a/internal/static/integrations/v2/eventhandler/integration.go +++ b/static/integrations/v2/eventhandler/integration.go @@ -2,7 +2,7 @@ package eventhandler import ( "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2" "github.com/prometheus/prometheus/model/labels" ) diff --git a/internal/static/integrations/v2/eventhandler/testdata/eventhandler.cache b/static/integrations/v2/eventhandler/testdata/eventhandler.cache similarity index 100% rename from internal/static/integrations/v2/eventhandler/testdata/eventhandler.cache rename to static/integrations/v2/eventhandler/testdata/eventhandler.cache diff --git a/internal/static/integrations/v2/integrations.go b/static/integrations/v2/integrations.go similarity index 96% rename from internal/static/integrations/v2/integrations.go rename to static/integrations/v2/integrations.go index 1896280e3f13..3a23252d5580 100644 --- a/internal/static/integrations/v2/integrations.go +++ b/static/integrations/v2/integrations.go @@ -25,11 +25,11 @@ import ( "net/url" "github.com/go-kit/log" - "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/grafana/agent/static/integrations/v2/autoscrape" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/static/metrics" + "github.com/grafana/agent/static/server" + "github.com/grafana/agent/static/traces" "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/targetgroup" ) diff --git a/internal/static/integrations/v2/metricsutils/metricshandler_integration.go b/static/integrations/v2/metricsutils/metricshandler_integration.go similarity index 95% rename from internal/static/integrations/v2/metricsutils/metricshandler_integration.go rename to static/integrations/v2/metricsutils/metricshandler_integration.go index 1978619091f9..3a8bd8db55f1 100644 --- a/internal/static/integrations/v2/metricsutils/metricshandler_integration.go +++ b/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/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" - "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/autoscrape" + "github.com/grafana/agent/static/integrations/v2/common" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/internal/static/integrations/v2/metricsutils/metricshandler_integration_test.go b/static/integrations/v2/metricsutils/metricshandler_integration_test.go similarity index 95% rename from internal/static/integrations/v2/metricsutils/metricshandler_integration_test.go rename to static/integrations/v2/metricsutils/metricshandler_integration_test.go index 643b2ff25bcd..dfcd59321b55 100644 --- a/internal/static/integrations/v2/metricsutils/metricshandler_integration_test.go +++ b/static/integrations/v2/metricsutils/metricshandler_integration_test.go @@ -7,8 +7,8 @@ import ( "testing" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/discovery/targetgroup" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/static/integrations/v2/metricsutils/versionshim.go b/static/integrations/v2/metricsutils/versionshim.go similarity index 95% rename from internal/static/integrations/v2/metricsutils/versionshim.go rename to static/integrations/v2/metricsutils/versionshim.go index 75908ec9ce62..f60f140ff47d 100644 --- a/internal/static/integrations/v2/metricsutils/versionshim.go +++ b/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/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" + v1 "github.com/grafana/agent/static/integrations" + v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" ) // NewNamedShim returns a v2.UpgradeFunc which will upgrade a v1.Config to a diff --git a/internal/static/integrations/v2/register.go b/static/integrations/v2/register.go similarity index 99% rename from internal/static/integrations/v2/register.go rename to static/integrations/v2/register.go index 30e80641745c..562b2a707ddd 100644 --- a/internal/static/integrations/v2/register.go +++ b/static/integrations/v2/register.go @@ -8,9 +8,9 @@ import ( "gopkg.in/yaml.v2" - v1 "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/v2/common" "github.com/grafana/agent/internal/util" + v1 "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/v2/common" ) var ( diff --git a/internal/static/integrations/v2/register_test.go b/static/integrations/v2/register_test.go similarity index 98% rename from internal/static/integrations/v2/register_test.go rename to static/integrations/v2/register_test.go index 5515910229b4..d7d5a06be860 100644 --- a/internal/static/integrations/v2/register_test.go +++ b/static/integrations/v2/register_test.go @@ -5,8 +5,8 @@ import ( "time" "github.com/go-kit/log" - v1 "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/v2/common" + v1 "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/v2/common" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) diff --git a/internal/static/integrations/v2/snmp_exporter/snmp.go b/static/integrations/v2/snmp_exporter/snmp.go similarity index 92% rename from internal/static/integrations/v2/snmp_exporter/snmp.go rename to static/integrations/v2/snmp_exporter/snmp.go index dc78dad5edb9..071c0de4c7e9 100644 --- a/internal/static/integrations/v2/snmp_exporter/snmp.go +++ b/static/integrations/v2/snmp_exporter/snmp.go @@ -7,10 +7,10 @@ import ( "path" "github.com/gorilla/mux" - "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/grafana/agent/static/integrations/snmp_exporter" + "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/autoscrape" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/config" "github.com/prometheus/prometheus/discovery" diff --git a/internal/static/integrations/v2/snmp_exporter/snmp_exporter.go b/static/integrations/v2/snmp_exporter/snmp_exporter.go similarity index 91% rename from internal/static/integrations/v2/snmp_exporter/snmp_exporter.go rename to static/integrations/v2/snmp_exporter/snmp_exporter.go index bea9d944de1e..4e594ec4a3e5 100644 --- a/internal/static/integrations/v2/snmp_exporter/snmp_exporter.go +++ b/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/internal/static/integrations/snmp_exporter" - integrations_v2 "github.com/grafana/agent/internal/static/integrations/v2" - "github.com/grafana/agent/internal/static/integrations/v2/common" + "github.com/grafana/agent/static/integrations/snmp_exporter" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" snmp_config "github.com/prometheus/snmp_exporter/config" ) diff --git a/internal/static/integrations/v2/snmp_exporter/snmp_exporter_test.go b/static/integrations/v2/snmp_exporter/snmp_exporter_test.go similarity index 100% rename from internal/static/integrations/v2/snmp_exporter/snmp_exporter_test.go rename to static/integrations/v2/snmp_exporter/snmp_exporter_test.go diff --git a/internal/static/integrations/v2/subsystem.go b/static/integrations/v2/subsystem.go similarity index 98% rename from internal/static/integrations/v2/subsystem.go rename to static/integrations/v2/subsystem.go index ca128a192605..8af397ac251b 100644 --- a/internal/static/integrations/v2/subsystem.go +++ b/static/integrations/v2/subsystem.go @@ -10,8 +10,8 @@ import ( "github.com/go-kit/log" "github.com/gorilla/mux" - "github.com/grafana/agent/internal/static/integrations/v2/autoscrape" - "github.com/grafana/agent/internal/static/metrics" + "github.com/grafana/agent/static/integrations/v2/autoscrape" + "github.com/grafana/agent/static/metrics" "github.com/prometheus/common/model" http_sd "github.com/prometheus/prometheus/discovery/http" ) diff --git a/internal/static/integrations/v2/subsystem_test.go b/static/integrations/v2/subsystem_test.go similarity index 91% rename from internal/static/integrations/v2/subsystem_test.go rename to static/integrations/v2/subsystem_test.go index ddc223b736d7..d7b4cd749505 100644 --- a/internal/static/integrations/v2/subsystem_test.go +++ b/static/integrations/v2/subsystem_test.go @@ -3,8 +3,8 @@ package integrations import ( "testing" - v1 "github.com/grafana/agent/internal/static/integrations" - "github.com/grafana/agent/internal/static/integrations/v2/common" + v1 "github.com/grafana/agent/static/integrations" + "github.com/grafana/agent/static/integrations/v2/common" "github.com/stretchr/testify/require" "gopkg.in/yaml.v2" ) diff --git a/internal/static/integrations/v2/targetgroup.go b/static/integrations/v2/targetgroup.go similarity index 100% rename from internal/static/integrations/v2/targetgroup.go rename to static/integrations/v2/targetgroup.go diff --git a/internal/static/integrations/v2/utils.go b/static/integrations/v2/utils.go similarity index 100% rename from internal/static/integrations/v2/utils.go rename to static/integrations/v2/utils.go diff --git a/internal/static/integrations/v2/vmware_exporter/vmware_exporter.go b/static/integrations/v2/vmware_exporter/vmware_exporter.go similarity index 93% rename from internal/static/integrations/v2/vmware_exporter/vmware_exporter.go rename to static/integrations/v2/vmware_exporter/vmware_exporter.go index 257ed8081264..74ec7bf3aac2 100644 --- a/internal/static/integrations/v2/vmware_exporter/vmware_exporter.go +++ b/static/integrations/v2/vmware_exporter/vmware_exporter.go @@ -6,9 +6,9 @@ import ( "time" "github.com/go-kit/log" - "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/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/common" + "github.com/grafana/agent/static/integrations/v2/metricsutils" "github.com/grafana/vmware_exporter/vsphere" config_util "github.com/prometheus/common/config" ) diff --git a/internal/static/integrations/v2/workers.go b/static/integrations/v2/workers.go similarity index 100% rename from internal/static/integrations/v2/workers.go rename to static/integrations/v2/workers.go diff --git a/internal/static/integrations/vmware_exporter/vmware_exporter.go b/static/integrations/vmware_exporter/vmware_exporter.go similarity index 97% rename from internal/static/integrations/vmware_exporter/vmware_exporter.go rename to static/integrations/vmware_exporter/vmware_exporter.go index b84e209d9763..a9ca7e907b74 100644 --- a/internal/static/integrations/vmware_exporter/vmware_exporter.go +++ b/static/integrations/vmware_exporter/vmware_exporter.go @@ -6,7 +6,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/static/integrations" "github.com/grafana/vmware_exporter/vsphere" config_util "github.com/prometheus/common/config" ) diff --git a/internal/static/integrations/windows_exporter/config.go b/static/integrations/windows_exporter/config.go similarity index 95% rename from internal/static/integrations/windows_exporter/config.go rename to static/integrations/windows_exporter/config.go index f3c3cadafe14..819eb6ba3946 100644 --- a/internal/static/integrations/windows_exporter/config.go +++ b/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/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/static/integrations" + integrations_v2 "github.com/grafana/agent/static/integrations/v2" + "github.com/grafana/agent/static/integrations/v2/metricsutils" ) func init() { diff --git a/internal/static/integrations/windows_exporter/config_windows.go b/static/integrations/windows_exporter/config_windows.go similarity index 100% rename from internal/static/integrations/windows_exporter/config_windows.go rename to static/integrations/windows_exporter/config_windows.go diff --git a/internal/static/integrations/windows_exporter/windows_exporter.go b/static/integrations/windows_exporter/windows_exporter.go similarity index 94% rename from internal/static/integrations/windows_exporter/windows_exporter.go rename to static/integrations/windows_exporter/windows_exporter.go index 55d02ac496bb..50bd8aeb4213 100644 --- a/internal/static/integrations/windows_exporter/windows_exporter.go +++ b/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/internal/static/integrations/config" + "github.com/grafana/agent/static/integrations/config" ) // Integration is the windows_exporter integration. On non-Windows platforms, diff --git a/internal/static/integrations/windows_exporter/windows_exporter_windows.go b/static/integrations/windows_exporter/windows_exporter_windows.go similarity index 96% rename from internal/static/integrations/windows_exporter/windows_exporter_windows.go rename to static/integrations/windows_exporter/windows_exporter_windows.go index 83faf6c27d99..3c041596c9e1 100644 --- a/internal/static/integrations/windows_exporter/windows_exporter_windows.go +++ b/static/integrations/windows_exporter/windows_exporter_windows.go @@ -7,7 +7,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/internal/static/integrations" + "github.com/grafana/agent/static/integrations" "github.com/prometheus-community/windows_exporter/pkg/collector" ) diff --git a/internal/static/logs/config.go b/static/logs/config.go similarity index 100% rename from internal/static/logs/config.go rename to static/logs/config.go diff --git a/internal/static/logs/config_test.go b/static/logs/config_test.go similarity index 100% rename from internal/static/logs/config_test.go rename to static/logs/config_test.go diff --git a/internal/static/logs/global.go b/static/logs/global.go similarity index 100% rename from internal/static/logs/global.go rename to static/logs/global.go diff --git a/internal/static/logs/http.go b/static/logs/http.go similarity index 97% rename from internal/static/logs/http.go rename to static/logs/http.go index b3e7a00d8883..a41aa405c7d3 100644 --- a/internal/static/logs/http.go +++ b/static/logs/http.go @@ -6,7 +6,7 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/internal/static/metrics/cluster/configapi" + "github.com/grafana/agent/static/metrics/cluster/configapi" "github.com/grafana/loki/clients/pkg/promtail/targets/target" "github.com/prometheus/common/model" ) diff --git a/internal/static/logs/http_test.go b/static/logs/http_test.go similarity index 100% rename from internal/static/logs/http_test.go rename to static/logs/http_test.go diff --git a/internal/static/logs/logs.go b/static/logs/logs.go similarity index 100% rename from internal/static/logs/logs.go rename to static/logs/logs.go diff --git a/internal/static/logs/logs_test.go b/static/logs/logs_test.go similarity index 100% rename from internal/static/logs/logs_test.go rename to static/logs/logs_test.go diff --git a/internal/static/metrics/agent.go b/static/metrics/agent.go similarity index 98% rename from internal/static/metrics/agent.go rename to static/metrics/agent.go index 0c2c74530050..487462d8da2c 100644 --- a/internal/static/metrics/agent.go +++ b/static/metrics/agent.go @@ -16,10 +16,10 @@ import ( "go.uber.org/atomic" "google.golang.org/grpc" - "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/grafana/agent/static/metrics/cluster" + "github.com/grafana/agent/static/metrics/cluster/client" + "github.com/grafana/agent/static/metrics/instance" "github.com/prometheus/prometheus/discovery" ) diff --git a/internal/static/metrics/agent_test.go b/static/metrics/agent_test.go similarity index 99% rename from internal/static/metrics/agent_test.go rename to static/metrics/agent_test.go index bd311a07cd82..6f5f46b293ff 100644 --- a/internal/static/metrics/agent_test.go +++ b/static/metrics/agent_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/metrics/instance" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/prometheus/scrape" "github.com/prometheus/prometheus/storage" diff --git a/internal/static/metrics/cleaner.go b/static/metrics/cleaner.go similarity index 98% rename from internal/static/metrics/cleaner.go rename to static/metrics/cleaner.go index 0bf577a5b672..91a35f825b5c 100644 --- a/internal/static/metrics/cleaner.go +++ b/static/metrics/cleaner.go @@ -8,8 +8,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/internal/static/metrics/instance" - "github.com/grafana/agent/internal/static/metrics/wal" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/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/internal/static/metrics/cleaner_test.go b/static/metrics/cleaner_test.go similarity index 98% rename from internal/static/metrics/cleaner_test.go rename to static/metrics/cleaner_test.go index f8aeac7fa7c3..020b8b481c0f 100644 --- a/internal/static/metrics/cleaner_test.go +++ b/static/metrics/cleaner_test.go @@ -7,7 +7,7 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance" "github.com/stretchr/testify/require" ) diff --git a/internal/static/metrics/cluster/client/client.go b/static/metrics/cluster/client/client.go similarity index 97% rename from internal/static/metrics/cluster/client/client.go rename to static/metrics/cluster/client/client.go index 1b90feb99f92..c34da9d4f06d 100644 --- a/internal/static/metrics/cluster/client/client.go +++ b/static/metrics/cluster/client/client.go @@ -5,8 +5,8 @@ import ( "io" "reflect" - "github.com/grafana/agent/internal/static/agentproto" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/agentproto" "github.com/grafana/dskit/grpcclient" "github.com/grafana/dskit/middleware" otgrpc "github.com/opentracing-contrib/go-grpc" diff --git a/internal/static/metrics/cluster/cluster.go b/static/metrics/cluster/cluster.go similarity index 96% rename from internal/static/metrics/cluster/cluster.go rename to static/metrics/cluster/cluster.go index 9ab498f7e492..fde88fe3fefa 100644 --- a/internal/static/metrics/cluster/cluster.go +++ b/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/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/grafana/agent/static/agentproto" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance/configstore" "github.com/prometheus/client_golang/prometheus" "google.golang.org/grpc" ) diff --git a/internal/static/metrics/cluster/config.go b/static/metrics/cluster/config.go similarity index 98% rename from internal/static/metrics/cluster/config.go rename to static/metrics/cluster/config.go index f51a529c04fa..ad2af234b302 100644 --- a/internal/static/metrics/cluster/config.go +++ b/static/metrics/cluster/config.go @@ -6,9 +6,9 @@ import ( "strings" "time" - "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/agent/static/metrics/cluster/client" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/ring" ) diff --git a/internal/static/metrics/cluster/config_test.go b/static/metrics/cluster/config_test.go similarity index 100% rename from internal/static/metrics/cluster/config_test.go rename to static/metrics/cluster/config_test.go diff --git a/internal/static/metrics/cluster/config_watcher.go b/static/metrics/cluster/config_watcher.go similarity index 98% rename from internal/static/metrics/cluster/config_watcher.go rename to static/metrics/cluster/config_watcher.go index 2544975c8d59..e3457ad3ec17 100644 --- a/internal/static/metrics/cluster/config_watcher.go +++ b/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/internal/static/metrics/instance" - "github.com/grafana/agent/internal/static/metrics/instance/configstore" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance/configstore" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" ) diff --git a/internal/static/metrics/cluster/config_watcher_test.go b/static/metrics/cluster/config_watcher_test.go similarity index 98% rename from internal/static/metrics/cluster/config_watcher_test.go rename to static/metrics/cluster/config_watcher_test.go index e91bffe5d83d..5f0bdab6d9ad 100644 --- a/internal/static/metrics/cluster/config_watcher_test.go +++ b/static/metrics/cluster/config_watcher_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - "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/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance/configstore" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/require" ) diff --git a/internal/static/metrics/cluster/configapi/types.go b/static/metrics/cluster/configapi/types.go similarity index 100% rename from internal/static/metrics/cluster/configapi/types.go rename to static/metrics/cluster/configapi/types.go diff --git a/internal/static/metrics/cluster/node.go b/static/metrics/cluster/node.go similarity index 98% rename from internal/static/metrics/cluster/node.go rename to static/metrics/cluster/node.go index fab9bc6b9461..0b1e6fa55a68 100644 --- a/internal/static/metrics/cluster/node.go +++ b/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/internal/static/agentproto" - "github.com/grafana/agent/internal/static/metrics/cluster/client" "github.com/grafana/agent/internal/util" + pb "github.com/grafana/agent/static/agentproto" + "github.com/grafana/agent/static/metrics/cluster/client" "github.com/grafana/dskit/backoff" "github.com/grafana/dskit/kv" "github.com/grafana/dskit/ring" diff --git a/internal/static/metrics/cluster/node_test.go b/static/metrics/cluster/node_test.go similarity index 99% rename from internal/static/metrics/cluster/node_test.go rename to static/metrics/cluster/node_test.go index 15df4ab7fbc7..f7581ccb25d5 100644 --- a/internal/static/metrics/cluster/node_test.go +++ b/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/internal/static/agentproto" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/agentproto" "github.com/grafana/dskit/ring" "github.com/grafana/dskit/services" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/static/metrics/cluster/validation.go b/static/metrics/cluster/validation.go similarity index 98% rename from internal/static/metrics/cluster/validation.go rename to static/metrics/cluster/validation.go index 6821a8beeb21..2ef2ddd76b97 100644 --- a/internal/static/metrics/cluster/validation.go +++ b/static/metrics/cluster/validation.go @@ -3,7 +3,7 @@ package cluster import ( "fmt" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/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/internal/static/metrics/cluster/validation_test.go b/static/metrics/cluster/validation_test.go similarity index 97% rename from internal/static/metrics/cluster/validation_test.go rename to static/metrics/cluster/validation_test.go index 180a0bfabb1f..dd730f2421dd 100644 --- a/internal/static/metrics/cluster/validation_test.go +++ b/static/metrics/cluster/validation_test.go @@ -5,8 +5,8 @@ import ( "strings" "testing" - "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/metrics/instance" "github.com/stretchr/testify/require" ) diff --git a/internal/static/metrics/http.go b/static/metrics/http.go similarity index 98% rename from internal/static/metrics/http.go rename to static/metrics/http.go index 51e5aa64e6a6..fe033df53f7e 100644 --- a/internal/static/metrics/http.go +++ b/static/metrics/http.go @@ -9,7 +9,7 @@ import ( "github.com/go-kit/log/level" "github.com/gorilla/mux" - "github.com/grafana/agent/internal/static/metrics/cluster/configapi" + "github.com/grafana/agent/static/metrics/cluster/configapi" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" "github.com/prometheus/prometheus/scrape" diff --git a/internal/static/metrics/http_test.go b/static/metrics/http_test.go similarity index 98% rename from internal/static/metrics/http_test.go rename to static/metrics/http_test.go index 7f557a5a40d2..ea199874ecd8 100644 --- a/internal/static/metrics/http_test.go +++ b/static/metrics/http_test.go @@ -8,8 +8,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/metrics/instance" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/static/metrics/instance/configstore/api.go b/static/metrics/instance/configstore/api.go similarity index 98% rename from internal/static/metrics/instance/configstore/api.go rename to static/metrics/instance/configstore/api.go index 552b6ba40499..0e81f0162c19 100644 --- a/internal/static/metrics/instance/configstore/api.go +++ b/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/internal/static/metrics/cluster/configapi" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/metrics/cluster/configapi" + "github.com/grafana/agent/static/metrics/instance" "github.com/prometheus/client_golang/prometheus" ) diff --git a/internal/static/metrics/instance/configstore/api_test.go b/static/metrics/instance/configstore/api_test.go similarity index 98% rename from internal/static/metrics/instance/configstore/api_test.go rename to static/metrics/instance/configstore/api_test.go index 71bd55881047..43e0d1fe599c 100644 --- a/internal/static/metrics/instance/configstore/api_test.go +++ b/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/internal/static/client" - "github.com/grafana/agent/internal/static/metrics/cluster/configapi" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/client" + "github.com/grafana/agent/static/metrics/cluster/configapi" + "github.com/grafana/agent/static/metrics/instance" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) diff --git a/internal/static/metrics/instance/configstore/codec.go b/static/metrics/instance/configstore/codec.go similarity index 100% rename from internal/static/metrics/instance/configstore/codec.go rename to static/metrics/instance/configstore/codec.go diff --git a/internal/static/metrics/instance/configstore/codec_test.go b/static/metrics/instance/configstore/codec_test.go similarity index 100% rename from internal/static/metrics/instance/configstore/codec_test.go rename to static/metrics/instance/configstore/codec_test.go diff --git a/internal/static/metrics/instance/configstore/errors.go b/static/metrics/instance/configstore/errors.go similarity index 100% rename from internal/static/metrics/instance/configstore/errors.go rename to static/metrics/instance/configstore/errors.go diff --git a/internal/static/metrics/instance/configstore/mock.go b/static/metrics/instance/configstore/mock.go similarity index 96% rename from internal/static/metrics/instance/configstore/mock.go rename to static/metrics/instance/configstore/mock.go index 5ff303669cf6..fc1359f84dd1 100644 --- a/internal/static/metrics/instance/configstore/mock.go +++ b/static/metrics/instance/configstore/mock.go @@ -3,7 +3,7 @@ package configstore import ( "context" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance" ) // Mock is a Mock Store. Useful primarily for testing. diff --git a/internal/static/metrics/instance/configstore/remote.go b/static/metrics/instance/configstore/remote.go similarity index 99% rename from internal/static/metrics/instance/configstore/remote.go rename to static/metrics/instance/configstore/remote.go index a97df01e257b..7307bd3ccbbe 100644 --- a/internal/static/metrics/instance/configstore/remote.go +++ b/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/internal/static/metrics/instance" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/metrics/instance" "github.com/grafana/dskit/kv" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promauto" diff --git a/internal/static/metrics/instance/configstore/remote_test.go b/static/metrics/instance/configstore/remote_test.go similarity index 99% rename from internal/static/metrics/instance/configstore/remote_test.go rename to static/metrics/instance/configstore/remote_test.go index 682438dd278d..e402f22ee26f 100644 --- a/internal/static/metrics/instance/configstore/remote_test.go +++ b/static/metrics/instance/configstore/remote_test.go @@ -9,8 +9,8 @@ import ( "time" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/metrics/instance" "github.com/grafana/dskit/kv" "github.com/prometheus/client_golang/prometheus" "github.com/stretchr/testify/require" diff --git a/internal/static/metrics/instance/configstore/store.go b/static/metrics/instance/configstore/store.go similarity index 96% rename from internal/static/metrics/instance/configstore/store.go rename to static/metrics/instance/configstore/store.go index 799bafc882ad..f67842f48970 100644 --- a/internal/static/metrics/instance/configstore/store.go +++ b/static/metrics/instance/configstore/store.go @@ -5,7 +5,7 @@ package configstore import ( "context" - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance" ) // Store is some interface to retrieving instance configurations. diff --git a/internal/static/metrics/instance/configstore/unique.go b/static/metrics/instance/configstore/unique.go similarity index 93% rename from internal/static/metrics/instance/configstore/unique.go rename to static/metrics/instance/configstore/unique.go index 203b77ba45ef..8214e14b933e 100644 --- a/internal/static/metrics/instance/configstore/unique.go +++ b/static/metrics/instance/configstore/unique.go @@ -1,7 +1,7 @@ package configstore import ( - "github.com/grafana/agent/internal/static/metrics/instance" + "github.com/grafana/agent/static/metrics/instance" ) // checkUnique validates that cfg is unique from all, ensuring that no two diff --git a/internal/static/metrics/instance/errors.go b/static/metrics/instance/errors.go similarity index 100% rename from internal/static/metrics/instance/errors.go rename to static/metrics/instance/errors.go diff --git a/internal/static/metrics/instance/global.go b/static/metrics/instance/global.go similarity index 100% rename from internal/static/metrics/instance/global.go rename to static/metrics/instance/global.go diff --git a/internal/static/metrics/instance/group_manager.go b/static/metrics/instance/group_manager.go similarity index 100% rename from internal/static/metrics/instance/group_manager.go rename to static/metrics/instance/group_manager.go diff --git a/internal/static/metrics/instance/group_manager_test.go b/static/metrics/instance/group_manager_test.go similarity index 100% rename from internal/static/metrics/instance/group_manager_test.go rename to static/metrics/instance/group_manager_test.go diff --git a/internal/static/metrics/instance/host_filter.go b/static/metrics/instance/host_filter.go similarity index 100% rename from internal/static/metrics/instance/host_filter.go rename to static/metrics/instance/host_filter.go diff --git a/internal/static/metrics/instance/host_filter_test.go b/static/metrics/instance/host_filter_test.go similarity index 100% rename from internal/static/metrics/instance/host_filter_test.go rename to static/metrics/instance/host_filter_test.go diff --git a/internal/static/metrics/instance/instance.go b/static/metrics/instance/instance.go similarity index 99% rename from internal/static/metrics/instance/instance.go rename to static/metrics/instance/instance.go index a0de2176272f..1e264ca76b8c 100644 --- a/internal/static/metrics/instance/instance.go +++ b/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/internal/util" + "github.com/grafana/agent/static/metrics/wal" "github.com/oklog/run" "github.com/prometheus/client_golang/prometheus" config_util "github.com/prometheus/common/config" diff --git a/internal/static/metrics/instance/instance_integration_test.go b/static/metrics/instance/instance_integration_test.go similarity index 100% rename from internal/static/metrics/instance/instance_integration_test.go rename to static/metrics/instance/instance_integration_test.go diff --git a/internal/static/metrics/instance/instance_test.go b/static/metrics/instance/instance_test.go similarity index 100% rename from internal/static/metrics/instance/instance_test.go rename to static/metrics/instance/instance_test.go diff --git a/internal/static/metrics/instance/manager.go b/static/metrics/instance/manager.go similarity index 100% rename from internal/static/metrics/instance/manager.go rename to static/metrics/instance/manager.go diff --git a/internal/static/metrics/instance/manager_test.go b/static/metrics/instance/manager_test.go similarity index 100% rename from internal/static/metrics/instance/manager_test.go rename to static/metrics/instance/manager_test.go diff --git a/internal/static/metrics/instance/marshal.go b/static/metrics/instance/marshal.go similarity index 100% rename from internal/static/metrics/instance/marshal.go rename to static/metrics/instance/marshal.go diff --git a/internal/static/metrics/instance/marshal_test.go b/static/metrics/instance/marshal_test.go similarity index 100% rename from internal/static/metrics/instance/marshal_test.go rename to static/metrics/instance/marshal_test.go diff --git a/internal/static/metrics/instance/modal_manager.go b/static/metrics/instance/modal_manager.go similarity index 100% rename from internal/static/metrics/instance/modal_manager.go rename to static/metrics/instance/modal_manager.go diff --git a/internal/static/metrics/instance/noop.go b/static/metrics/instance/noop.go similarity index 100% rename from internal/static/metrics/instance/noop.go rename to static/metrics/instance/noop.go diff --git a/internal/static/metrics/wal/series.go b/static/metrics/wal/series.go similarity index 100% rename from internal/static/metrics/wal/series.go rename to static/metrics/wal/series.go diff --git a/internal/static/metrics/wal/util.go b/static/metrics/wal/util.go similarity index 100% rename from internal/static/metrics/wal/util.go rename to static/metrics/wal/util.go diff --git a/internal/static/metrics/wal/wal.go b/static/metrics/wal/wal.go similarity index 100% rename from internal/static/metrics/wal/wal.go rename to static/metrics/wal/wal.go diff --git a/internal/static/metrics/wal/wal_test.go b/static/metrics/wal/wal_test.go similarity index 100% rename from internal/static/metrics/wal/wal_test.go rename to static/metrics/wal/wal_test.go diff --git a/internal/static/operator/apis/monitoring/doc.go b/static/operator/apis/monitoring/doc.go similarity index 100% rename from internal/static/operator/apis/monitoring/doc.go rename to static/operator/apis/monitoring/doc.go diff --git a/internal/static/operator/apis/monitoring/v1alpha1/deployment.go b/static/operator/apis/monitoring/v1alpha1/deployment.go similarity index 96% rename from internal/static/operator/apis/monitoring/v1alpha1/deployment.go rename to static/operator/apis/monitoring/v1alpha1/deployment.go index 0b8d2d1503fa..7bb453f08285 100644 --- a/internal/static/operator/apis/monitoring/v1alpha1/deployment.go +++ b/static/operator/apis/monitoring/v1alpha1/deployment.go @@ -1,7 +1,7 @@ package v1alpha1 import ( - "github.com/grafana/agent/internal/static/operator/assets" + "github.com/grafana/agent/static/operator/assets" promv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1" ) diff --git a/internal/static/operator/apis/monitoring/v1alpha1/doc.go b/static/operator/apis/monitoring/v1alpha1/doc.go similarity index 100% rename from internal/static/operator/apis/monitoring/v1alpha1/doc.go rename to static/operator/apis/monitoring/v1alpha1/doc.go diff --git a/internal/static/operator/apis/monitoring/v1alpha1/group.go b/static/operator/apis/monitoring/v1alpha1/group.go similarity index 100% rename from internal/static/operator/apis/monitoring/v1alpha1/group.go rename to static/operator/apis/monitoring/v1alpha1/group.go diff --git a/internal/static/operator/apis/monitoring/v1alpha1/types.go b/static/operator/apis/monitoring/v1alpha1/types.go similarity index 100% rename from internal/static/operator/apis/monitoring/v1alpha1/types.go rename to static/operator/apis/monitoring/v1alpha1/types.go diff --git a/internal/static/operator/apis/monitoring/v1alpha1/types_integrations.go b/static/operator/apis/monitoring/v1alpha1/types_integrations.go similarity index 100% rename from internal/static/operator/apis/monitoring/v1alpha1/types_integrations.go rename to static/operator/apis/monitoring/v1alpha1/types_integrations.go diff --git a/internal/static/operator/apis/monitoring/v1alpha1/types_logs.go b/static/operator/apis/monitoring/v1alpha1/types_logs.go similarity index 100% rename from internal/static/operator/apis/monitoring/v1alpha1/types_logs.go rename to static/operator/apis/monitoring/v1alpha1/types_logs.go diff --git a/internal/static/operator/apis/monitoring/v1alpha1/types_metrics.go b/static/operator/apis/monitoring/v1alpha1/types_metrics.go similarity index 100% rename from internal/static/operator/apis/monitoring/v1alpha1/types_metrics.go rename to static/operator/apis/monitoring/v1alpha1/types_metrics.go diff --git a/internal/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go b/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go similarity index 99% rename from internal/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go rename to static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go index 97872384f868..19ab5cf2ce61 100644 --- a/internal/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go +++ b/static/operator/apis/monitoring/v1alpha1/zz_generated.deepcopy.go @@ -6,7 +6,7 @@ package v1alpha1 import ( - "github.com/grafana/agent/internal/static/operator/assets" + "github.com/grafana/agent/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/internal/static/operator/assets/assets.go b/static/operator/assets/assets.go similarity index 100% rename from internal/static/operator/assets/assets.go rename to static/operator/assets/assets.go diff --git a/internal/static/operator/build_hierarchy.go b/static/operator/build_hierarchy.go similarity index 96% rename from internal/static/operator/build_hierarchy.go rename to static/operator/build_hierarchy.go index 0830ad43ca33..91a264cb3b23 100644 --- a/internal/static/operator/build_hierarchy.go +++ b/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/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" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/assets" + "github.com/grafana/agent/static/operator/config" + "github.com/grafana/agent/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/internal/static/operator/build_hierarchy_test.go b/static/operator/build_hierarchy_test.go similarity index 97% rename from internal/static/operator/build_hierarchy_test.go rename to static/operator/build_hierarchy_test.go index 735545f0c063..310ea9a751fa 100644 --- a/internal/static/operator/build_hierarchy_test.go +++ b/static/operator/build_hierarchy_test.go @@ -9,11 +9,11 @@ import ( "testing" "time" - 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" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/hierarchy" 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/internal/static/operator/clientutil/clientutil.go b/static/operator/clientutil/clientutil.go similarity index 100% rename from internal/static/operator/clientutil/clientutil.go rename to static/operator/clientutil/clientutil.go diff --git a/internal/static/operator/clientutil/merge.go b/static/operator/clientutil/merge.go similarity index 100% rename from internal/static/operator/clientutil/merge.go rename to static/operator/clientutil/merge.go diff --git a/internal/static/operator/config/config.go b/static/operator/config/config.go similarity index 96% rename from internal/static/operator/config/config.go rename to static/operator/config/config.go index ea32ddaf0a45..cc776cce221c 100644 --- a/internal/static/operator/config/config.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/internal/static/operator/assets" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/assets" "gopkg.in/yaml.v3" ) diff --git a/internal/static/operator/config/config_references.go b/static/operator/config/config_references.go similarity index 100% rename from internal/static/operator/config/config_references.go rename to static/operator/config/config_references.go diff --git a/internal/static/operator/config/config_references_test.go b/static/operator/config/config_references_test.go similarity index 96% rename from internal/static/operator/config/config_references_test.go rename to static/operator/config/config_references_test.go index 515858a37991..2efd37c84015 100644 --- a/internal/static/operator/config/config_references_test.go +++ b/static/operator/config/config_references_test.go @@ -3,7 +3,7 @@ package config import ( "testing" - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/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/internal/static/operator/config/config_test.go b/static/operator/config/config_test.go similarity index 98% rename from internal/static/operator/config/config_test.go rename to static/operator/config/config_test.go index 2d499134c590..1395ea9f6869 100644 --- a/internal/static/operator/config/config_test.go +++ b/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/internal/static/operator/assets" "github.com/grafana/agent/internal/util" "github.com/grafana/agent/internal/util/subset" + "github.com/grafana/agent/static/operator/assets" - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" ) func TestBuildConfigMetrics(t *testing.T) { diff --git a/internal/static/operator/config/fs_importer.go b/static/operator/config/fs_importer.go similarity index 100% rename from internal/static/operator/config/fs_importer.go rename to static/operator/config/fs_importer.go diff --git a/internal/static/operator/config/integration_templates_test.go b/static/operator/config/integration_templates_test.go similarity index 94% rename from internal/static/operator/config/integration_templates_test.go rename to static/operator/config/integration_templates_test.go index 61a9b54763cc..20daf4006c0c 100644 --- a/internal/static/operator/config/integration_templates_test.go +++ b/static/operator/config/integration_templates_test.go @@ -3,9 +3,9 @@ package config import ( "testing" - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" "github.com/grafana/agent/internal/util" "github.com/grafana/agent/internal/util/subset" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" "github.com/stretchr/testify/require" apiext_v1 "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" "sigs.k8s.io/yaml" diff --git a/internal/static/operator/config/logs_templates_test.go b/static/operator/config/logs_templates_test.go similarity index 99% rename from internal/static/operator/config/logs_templates_test.go rename to static/operator/config/logs_templates_test.go index 5f38b801a229..fa4d1e84add1 100644 --- a/internal/static/operator/config/logs_templates_test.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/internal/static/operator/assets" "github.com/grafana/agent/internal/util" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/assets" ) func TestLogsClientConfig(t *testing.T) { diff --git a/internal/static/operator/config/metrics_templates_test.go b/static/operator/config/metrics_templates_test.go similarity index 99% rename from internal/static/operator/config/metrics_templates_test.go rename to static/operator/config/metrics_templates_test.go index e750ee8aa09c..44d093085e96 100644 --- a/internal/static/operator/config/metrics_templates_test.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/internal/static/operator/assets" "github.com/grafana/agent/internal/util" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/assets" ) func TestExternalLabels(t *testing.T) { diff --git a/internal/static/operator/config/templates/agent-integrations.libsonnet b/static/operator/config/templates/agent-integrations.libsonnet similarity index 100% rename from internal/static/operator/config/templates/agent-integrations.libsonnet rename to static/operator/config/templates/agent-integrations.libsonnet diff --git a/internal/static/operator/config/templates/agent-logs.libsonnet b/static/operator/config/templates/agent-logs.libsonnet similarity index 100% rename from internal/static/operator/config/templates/agent-logs.libsonnet rename to static/operator/config/templates/agent-logs.libsonnet diff --git a/internal/static/operator/config/templates/agent-metrics.libsonnet b/static/operator/config/templates/agent-metrics.libsonnet similarity index 100% rename from internal/static/operator/config/templates/agent-metrics.libsonnet rename to static/operator/config/templates/agent-metrics.libsonnet diff --git a/internal/static/operator/config/templates/component/logs/client.libsonnet b/static/operator/config/templates/component/logs/client.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/logs/client.libsonnet rename to static/operator/config/templates/component/logs/client.libsonnet diff --git a/internal/static/operator/config/templates/component/logs/external_labels.libsonnet b/static/operator/config/templates/component/logs/external_labels.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/logs/external_labels.libsonnet rename to static/operator/config/templates/component/logs/external_labels.libsonnet diff --git a/internal/static/operator/config/templates/component/logs/pod_logs.libsonnet b/static/operator/config/templates/component/logs/pod_logs.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/logs/pod_logs.libsonnet rename to static/operator/config/templates/component/logs/pod_logs.libsonnet diff --git a/internal/static/operator/config/templates/component/logs/relabel_config.libsonnet b/static/operator/config/templates/component/logs/relabel_config.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/logs/relabel_config.libsonnet rename to static/operator/config/templates/component/logs/relabel_config.libsonnet diff --git a/internal/static/operator/config/templates/component/logs/stages.libsonnet b/static/operator/config/templates/component/logs/stages.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/logs/stages.libsonnet rename to static/operator/config/templates/component/logs/stages.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/external_labels.libsonnet b/static/operator/config/templates/component/metrics/external_labels.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/external_labels.libsonnet rename to static/operator/config/templates/component/metrics/external_labels.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/kube_sd_config.libsonnet b/static/operator/config/templates/component/metrics/kube_sd_config.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/kube_sd_config.libsonnet rename to static/operator/config/templates/component/metrics/kube_sd_config.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/pod_monitor.libsonnet b/static/operator/config/templates/component/metrics/pod_monitor.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/pod_monitor.libsonnet rename to static/operator/config/templates/component/metrics/pod_monitor.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/probe.libsonnet b/static/operator/config/templates/component/metrics/probe.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/probe.libsonnet rename to static/operator/config/templates/component/metrics/probe.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/relabel_config.libsonnet b/static/operator/config/templates/component/metrics/relabel_config.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/relabel_config.libsonnet rename to static/operator/config/templates/component/metrics/relabel_config.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/remote_write.libsonnet b/static/operator/config/templates/component/metrics/remote_write.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/remote_write.libsonnet rename to static/operator/config/templates/component/metrics/remote_write.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/safe_tls_config.libsonnet b/static/operator/config/templates/component/metrics/safe_tls_config.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/safe_tls_config.libsonnet rename to static/operator/config/templates/component/metrics/safe_tls_config.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/service_monitor.libsonnet b/static/operator/config/templates/component/metrics/service_monitor.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/service_monitor.libsonnet rename to static/operator/config/templates/component/metrics/service_monitor.libsonnet diff --git a/internal/static/operator/config/templates/component/metrics/tls_config.libsonnet b/static/operator/config/templates/component/metrics/tls_config.libsonnet similarity index 100% rename from internal/static/operator/config/templates/component/metrics/tls_config.libsonnet rename to static/operator/config/templates/component/metrics/tls_config.libsonnet diff --git a/internal/static/operator/config/templates/ext/marshal.libsonnet b/static/operator/config/templates/ext/marshal.libsonnet similarity index 100% rename from internal/static/operator/config/templates/ext/marshal.libsonnet rename to static/operator/config/templates/ext/marshal.libsonnet diff --git a/internal/static/operator/config/templates/ext/optionals.libsonnet b/static/operator/config/templates/ext/optionals.libsonnet similarity index 100% rename from internal/static/operator/config/templates/ext/optionals.libsonnet rename to static/operator/config/templates/ext/optionals.libsonnet diff --git a/internal/static/operator/config/templates/ext/secrets.libsonnet b/static/operator/config/templates/ext/secrets.libsonnet similarity index 100% rename from internal/static/operator/config/templates/ext/secrets.libsonnet rename to static/operator/config/templates/ext/secrets.libsonnet diff --git a/internal/static/operator/config/templates/integrations.libsonnet b/static/operator/config/templates/integrations.libsonnet similarity index 100% rename from internal/static/operator/config/templates/integrations.libsonnet rename to static/operator/config/templates/integrations.libsonnet diff --git a/internal/static/operator/config/templates/logs.libsonnet b/static/operator/config/templates/logs.libsonnet similarity index 100% rename from internal/static/operator/config/templates/logs.libsonnet rename to static/operator/config/templates/logs.libsonnet diff --git a/internal/static/operator/config/templates/metrics.libsonnet b/static/operator/config/templates/metrics.libsonnet similarity index 100% rename from internal/static/operator/config/templates/metrics.libsonnet rename to static/operator/config/templates/metrics.libsonnet diff --git a/internal/static/operator/config/templates/utils/k8s.libsonnet b/static/operator/config/templates/utils/k8s.libsonnet similarity index 100% rename from internal/static/operator/config/templates/utils/k8s.libsonnet rename to static/operator/config/templates/utils/k8s.libsonnet diff --git a/internal/static/operator/config/utils.go b/static/operator/config/utils.go similarity index 97% rename from internal/static/operator/config/utils.go rename to static/operator/config/utils.go index 3d53474f8925..dc7aea49c7ef 100644 --- a/internal/static/operator/config/utils.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" "sigs.k8s.io/yaml" ) diff --git a/internal/static/operator/config/utils_test.go b/static/operator/config/utils_test.go similarity index 100% rename from internal/static/operator/config/utils_test.go rename to static/operator/config/utils_test.go diff --git a/internal/static/operator/defaults.go b/static/operator/defaults.go similarity index 100% rename from internal/static/operator/defaults.go rename to static/operator/defaults.go diff --git a/internal/static/operator/defaults.go.t b/static/operator/defaults.go.t similarity index 100% rename from internal/static/operator/defaults.go.t rename to static/operator/defaults.go.t diff --git a/internal/static/operator/hierarchy/hierarchy.go b/static/operator/hierarchy/hierarchy.go similarity index 100% rename from internal/static/operator/hierarchy/hierarchy.go rename to static/operator/hierarchy/hierarchy.go diff --git a/internal/static/operator/hierarchy/hierarchy_test.go b/static/operator/hierarchy/hierarchy_test.go similarity index 100% rename from internal/static/operator/hierarchy/hierarchy_test.go rename to static/operator/hierarchy/hierarchy_test.go diff --git a/internal/static/operator/hierarchy/list.go b/static/operator/hierarchy/list.go similarity index 100% rename from internal/static/operator/hierarchy/list.go rename to static/operator/hierarchy/list.go diff --git a/internal/static/operator/hierarchy/selector.go b/static/operator/hierarchy/selector.go similarity index 100% rename from internal/static/operator/hierarchy/selector.go rename to static/operator/hierarchy/selector.go diff --git a/internal/static/operator/kubelet.go b/static/operator/kubelet.go similarity index 97% rename from internal/static/operator/kubelet.go rename to static/operator/kubelet.go index 1e7687551931..af2f872e1719 100644 --- a/internal/static/operator/kubelet.go +++ b/static/operator/kubelet.go @@ -7,8 +7,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" - "github.com/grafana/agent/internal/static/operator/clientutil" - "github.com/grafana/agent/internal/static/operator/logutil" + "github.com/grafana/agent/static/operator/clientutil" + "github.com/grafana/agent/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/internal/static/operator/kubelet_test.go b/static/operator/kubelet_test.go similarity index 97% rename from internal/static/operator/kubelet_test.go rename to static/operator/kubelet_test.go index 99e5ff036401..6b458451e135 100644 --- a/internal/static/operator/kubelet_test.go +++ b/static/operator/kubelet_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "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/static/operator/logutil" "github.com/stretchr/testify/require" "sigs.k8s.io/controller-runtime/pkg/reconcile" diff --git a/internal/static/operator/logutil/log.go b/static/operator/logutil/log.go similarity index 100% rename from internal/static/operator/logutil/log.go rename to static/operator/logutil/log.go diff --git a/internal/static/operator/operator.go b/static/operator/operator.go similarity index 98% rename from internal/static/operator/operator.go rename to static/operator/operator.go index 12a5791ea6a0..0c1785fbc9f9 100644 --- a/internal/static/operator/operator.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/internal/static/operator/hierarchy" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/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/internal/static/operator/operator_test.go b/static/operator/operator_test.go similarity index 98% rename from internal/static/operator/operator_test.go rename to static/operator/operator_test.go index 6ab889e6130b..1ea012345dcf 100644 --- a/internal/static/operator/operator_test.go +++ b/static/operator/operator_test.go @@ -12,10 +12,10 @@ import ( "time" "github.com/go-kit/log" - "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/grafana/agent/static/operator/logutil" "github.com/stretchr/testify/require" "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured" "sigs.k8s.io/controller-runtime/pkg/client" diff --git a/internal/static/operator/reconciler.go b/static/operator/reconciler.go similarity index 92% rename from internal/static/operator/reconciler.go rename to static/operator/reconciler.go index 05708aaa1e04..576c28492bce 100644 --- a/internal/static/operator/reconciler.go +++ b/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/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" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/clientutil" + "github.com/grafana/agent/static/operator/config" + "github.com/grafana/agent/static/operator/hierarchy" + "github.com/grafana/agent/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/internal/static/operator/reconciler_integrations.go b/static/operator/reconciler_integrations.go similarity index 94% rename from internal/static/operator/reconciler_integrations.go rename to static/operator/reconciler_integrations.go index 46eb87390704..fe776f3cd40d 100644 --- a/internal/static/operator/reconciler_integrations.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/internal/static/operator/clientutil" - "github.com/grafana/agent/internal/static/operator/config" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/clientutil" + "github.com/grafana/agent/static/operator/config" apps_v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/types" ) diff --git a/internal/static/operator/reconciler_integrations_test.go b/static/operator/reconciler_integrations_test.go similarity index 95% rename from internal/static/operator/reconciler_integrations_test.go rename to static/operator/reconciler_integrations_test.go index 6f0d0c96867d..adcd54869ef5 100644 --- a/internal/static/operator/reconciler_integrations_test.go +++ b/static/operator/reconciler_integrations_test.go @@ -3,7 +3,7 @@ package operator import ( "testing" - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" "github.com/stretchr/testify/require" meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" ) diff --git a/internal/static/operator/reconciler_logs.go b/static/operator/reconciler_logs.go similarity index 87% rename from internal/static/operator/reconciler_logs.go rename to static/operator/reconciler_logs.go index cf1234885188..026e8ed565b8 100644 --- a/internal/static/operator/reconciler_logs.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/internal/static/operator/clientutil" - "github.com/grafana/agent/internal/static/operator/config" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/clientutil" + "github.com/grafana/agent/static/operator/config" apps_v1 "k8s.io/api/apps/v1" "k8s.io/apimachinery/pkg/types" ) diff --git a/internal/static/operator/reconciler_metrics.go b/static/operator/reconciler_metrics.go similarity index 96% rename from internal/static/operator/reconciler_metrics.go rename to static/operator/reconciler_metrics.go index 86b43c11da71..0742ad884f2e 100644 --- a/internal/static/operator/reconciler_metrics.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" - "github.com/grafana/agent/internal/static/operator/clientutil" - "github.com/grafana/agent/internal/static/operator/config" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/clientutil" + "github.com/grafana/agent/static/operator/config" ) // createMetricsConfigurationSecret creates the Grafana Agent metrics configuration and stores diff --git a/internal/static/operator/resources_integrations.go b/static/operator/resources_integrations.go similarity index 97% rename from internal/static/operator/resources_integrations.go rename to static/operator/resources_integrations.go index f1520ff3b134..ecef55b3038f 100644 --- a/internal/static/operator/resources_integrations.go +++ b/static/operator/resources_integrations.go @@ -3,9 +3,9 @@ package operator import ( "fmt" - 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" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/assets" + "github.com/grafana/agent/static/operator/config" apps_v1 "k8s.io/api/apps/v1" core_v1 "k8s.io/api/core/v1" ) diff --git a/internal/static/operator/resources_logs.go b/static/operator/resources_logs.go similarity index 96% rename from internal/static/operator/resources_logs.go rename to static/operator/resources_logs.go index 5edf4c786006..72f22ecf2cbb 100644 --- a/internal/static/operator/resources_logs.go +++ b/static/operator/resources_logs.go @@ -1,7 +1,7 @@ package operator import ( - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" apps_v1 "k8s.io/api/apps/v1" v1 "k8s.io/api/core/v1" ) diff --git a/internal/static/operator/resources_metrics.go b/static/operator/resources_metrics.go similarity index 98% rename from internal/static/operator/resources_metrics.go rename to static/operator/resources_metrics.go index f3facae94955..b3ce7f370015 100644 --- a/internal/static/operator/resources_metrics.go +++ b/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/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" ) const ( diff --git a/internal/static/operator/resources_metrics_test.go b/static/operator/resources_metrics_test.go similarity index 87% rename from internal/static/operator/resources_metrics_test.go rename to static/operator/resources_metrics_test.go index 5041d70463b3..a754353a3e81 100644 --- a/internal/static/operator/resources_metrics_test.go +++ b/static/operator/resources_metrics_test.go @@ -3,7 +3,7 @@ package operator import ( "testing" - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/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/internal/static/operator/resources_pod_template.go b/static/operator/resources_pod_template.go similarity index 98% rename from internal/static/operator/resources_pod_template.go rename to static/operator/resources_pod_template.go index 322d6c6c4233..abf2a348a4db 100644 --- a/internal/static/operator/resources_pod_template.go +++ b/static/operator/resources_pod_template.go @@ -10,8 +10,8 @@ import ( "k8s.io/utils/ptr" "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" + gragent "github.com/grafana/agent/static/operator/apis/monitoring/v1alpha1" + "github.com/grafana/agent/static/operator/clientutil" ) type podTemplateOptions struct { diff --git a/internal/static/operator/resources_pod_template_test.go b/static/operator/resources_pod_template_test.go similarity index 98% rename from internal/static/operator/resources_pod_template_test.go rename to static/operator/resources_pod_template_test.go index 89b84a36b2db..4c94b91b682a 100644 --- a/internal/static/operator/resources_pod_template_test.go +++ b/static/operator/resources_pod_template_test.go @@ -3,7 +3,7 @@ package operator import ( "testing" - gragent "github.com/grafana/agent/internal/static/operator/apis/monitoring/v1alpha1" + gragent "github.com/grafana/agent/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/internal/static/operator/testdata/test-custom-mounts.in.yaml b/static/operator/testdata/test-custom-mounts.in.yaml similarity index 100% rename from internal/static/operator/testdata/test-custom-mounts.in.yaml rename to static/operator/testdata/test-custom-mounts.in.yaml diff --git a/internal/static/operator/testdata/test-custom-mounts.out.yaml b/static/operator/testdata/test-custom-mounts.out.yaml similarity index 100% rename from internal/static/operator/testdata/test-custom-mounts.out.yaml rename to static/operator/testdata/test-custom-mounts.out.yaml diff --git a/internal/static/operator/testdata/test-integrations.in.yaml b/static/operator/testdata/test-integrations.in.yaml similarity index 100% rename from internal/static/operator/testdata/test-integrations.in.yaml rename to static/operator/testdata/test-integrations.in.yaml diff --git a/internal/static/operator/testdata/test-integrations.out.yaml b/static/operator/testdata/test-integrations.out.yaml similarity index 100% rename from internal/static/operator/testdata/test-integrations.out.yaml rename to static/operator/testdata/test-integrations.out.yaml diff --git a/internal/static/operator/testdata/test-metrics-instance.in.yaml b/static/operator/testdata/test-metrics-instance.in.yaml similarity index 100% rename from internal/static/operator/testdata/test-metrics-instance.in.yaml rename to static/operator/testdata/test-metrics-instance.in.yaml diff --git a/internal/static/operator/testdata/test-metrics-instance.out.yaml b/static/operator/testdata/test-metrics-instance.out.yaml similarity index 100% rename from internal/static/operator/testdata/test-metrics-instance.out.yaml rename to static/operator/testdata/test-metrics-instance.out.yaml diff --git a/internal/static/operator/testdata/test-resource-hierarchy.yaml b/static/operator/testdata/test-resource-hierarchy.yaml similarity index 100% rename from internal/static/operator/testdata/test-resource-hierarchy.yaml rename to static/operator/testdata/test-resource-hierarchy.yaml diff --git a/internal/static/server/config.go b/static/server/config.go similarity index 100% rename from internal/static/server/config.go rename to static/server/config.go diff --git a/internal/static/server/config_test.go b/static/server/config_test.go similarity index 100% rename from internal/static/server/config_test.go rename to static/server/config_test.go diff --git a/internal/static/server/flags.go b/static/server/flags.go similarity index 100% rename from internal/static/server/flags.go rename to static/server/flags.go diff --git a/internal/static/server/logger.go b/static/server/logger.go similarity index 100% rename from internal/static/server/logger.go rename to static/server/logger.go diff --git a/internal/static/server/logger_test.go b/static/server/logger_test.go similarity index 100% rename from internal/static/server/logger_test.go rename to static/server/logger_test.go diff --git a/internal/static/server/logger_windows.go b/static/server/logger_windows.go similarity index 100% rename from internal/static/server/logger_windows.go rename to static/server/logger_windows.go diff --git a/internal/static/server/server.go b/static/server/server.go similarity index 100% rename from internal/static/server/server.go rename to static/server/server.go diff --git a/internal/static/server/server_test.go b/static/server/server_test.go similarity index 100% rename from internal/static/server/server_test.go rename to static/server/server_test.go diff --git a/internal/static/server/signal_context.go b/static/server/signal_context.go similarity index 100% rename from internal/static/server/signal_context.go rename to static/server/signal_context.go diff --git a/internal/static/server/testdata/example-cert.pem b/static/server/testdata/example-cert.pem similarity index 100% rename from internal/static/server/testdata/example-cert.pem rename to static/server/testdata/example-cert.pem diff --git a/internal/static/server/testdata/example-key.pem b/static/server/testdata/example-key.pem similarity index 100% rename from internal/static/server/testdata/example-key.pem rename to static/server/testdata/example-key.pem diff --git a/internal/static/server/testdata/windows/CLIENT_CA_CERT.cer b/static/server/testdata/windows/CLIENT_CA_CERT.cer similarity index 100% rename from internal/static/server/testdata/windows/CLIENT_CA_CERT.cer rename to static/server/testdata/windows/CLIENT_CA_CERT.cer diff --git a/internal/static/server/testdata/windows/README.md b/static/server/testdata/windows/README.md similarity index 100% rename from internal/static/server/testdata/windows/README.md rename to static/server/testdata/windows/README.md diff --git a/internal/static/server/testdata/windows/agent-config.yml b/static/server/testdata/windows/agent-config.yml similarity index 100% rename from internal/static/server/testdata/windows/agent-config.yml rename to static/server/testdata/windows/agent-config.yml diff --git a/internal/static/server/testdata/windows/client_cert.crt b/static/server/testdata/windows/client_cert.crt similarity index 100% rename from internal/static/server/testdata/windows/client_cert.crt rename to static/server/testdata/windows/client_cert.crt diff --git a/internal/static/server/testdata/windows/client_cert.pfx b/static/server/testdata/windows/client_cert.pfx similarity index 100% rename from internal/static/server/testdata/windows/client_cert.pfx rename to static/server/testdata/windows/client_cert.pfx diff --git a/internal/static/server/testdata/windows/client_key.key b/static/server/testdata/windows/client_key.key similarity index 100% rename from internal/static/server/testdata/windows/client_key.key rename to static/server/testdata/windows/client_key.key diff --git a/internal/static/server/testdata/windows/client_key_unencrypted.key b/static/server/testdata/windows/client_key_unencrypted.key similarity index 100% rename from internal/static/server/testdata/windows/client_key_unencrypted.key rename to static/server/testdata/windows/client_key_unencrypted.key diff --git a/internal/static/server/testdata/windows/server_cert.crt b/static/server/testdata/windows/server_cert.crt similarity index 100% rename from internal/static/server/testdata/windows/server_cert.crt rename to static/server/testdata/windows/server_cert.crt diff --git a/internal/static/server/tls.go b/static/server/tls.go similarity index 100% rename from internal/static/server/tls.go rename to static/server/tls.go diff --git a/internal/static/server/tls_certstore_stub.go b/static/server/tls_certstore_stub.go similarity index 100% rename from internal/static/server/tls_certstore_stub.go rename to static/server/tls_certstore_stub.go diff --git a/internal/static/server/tls_certstore_windows.go b/static/server/tls_certstore_windows.go similarity index 100% rename from internal/static/server/tls_certstore_windows.go rename to static/server/tls_certstore_windows.go diff --git a/internal/static/server/tls_certstore_windows_test.go b/static/server/tls_certstore_windows_test.go similarity index 100% rename from internal/static/server/tls_certstore_windows_test.go rename to static/server/tls_certstore_windows_test.go diff --git a/internal/static/server/tls_test.go b/static/server/tls_test.go similarity index 100% rename from internal/static/server/tls_test.go rename to static/server/tls_test.go diff --git a/internal/static/supportbundle/supportbundle.go b/static/supportbundle/supportbundle.go similarity index 99% rename from internal/static/supportbundle/supportbundle.go rename to static/supportbundle/supportbundle.go index 3963c2a9ccb5..82c08387d27f 100644 --- a/internal/static/supportbundle/supportbundle.go +++ b/static/supportbundle/supportbundle.go @@ -15,7 +15,7 @@ import ( "time" "github.com/grafana/agent/internal/build" - "github.com/grafana/agent/internal/static/server" + "github.com/grafana/agent/static/server" "github.com/mackerelio/go-osstat/uptime" "gopkg.in/yaml.v3" ) diff --git a/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor.go b/static/traces/automaticloggingprocessor/automaticloggingprocessor.go similarity index 98% rename from internal/static/traces/automaticloggingprocessor/automaticloggingprocessor.go rename to static/traces/automaticloggingprocessor/automaticloggingprocessor.go index 63a6fbb6c29b..6736eb2eef8f 100644 --- a/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor.go +++ b/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/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/agent/static/logs" + "github.com/grafana/agent/static/operator/config" + "github.com/grafana/agent/static/traces/contextkeys" "github.com/grafana/loki/clients/pkg/promtail/api" "github.com/grafana/loki/pkg/logproto" "github.com/prometheus/common/model" diff --git a/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go b/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go similarity index 99% rename from internal/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go rename to static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go index 310a09c0ad7b..915f33f62d66 100644 --- a/internal/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go +++ b/static/traces/automaticloggingprocessor/automaticloggingprocessor_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/agent/internal/static/logs" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/logs" "github.com/prometheus/common/model" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" diff --git a/internal/static/traces/automaticloggingprocessor/factory.go b/static/traces/automaticloggingprocessor/factory.go similarity index 98% rename from internal/static/traces/automaticloggingprocessor/factory.go rename to static/traces/automaticloggingprocessor/factory.go index bab898f97287..549576bc6238 100644 --- a/internal/static/traces/automaticloggingprocessor/factory.go +++ b/static/traces/automaticloggingprocessor/factory.go @@ -5,7 +5,7 @@ import ( "fmt" "time" - "github.com/grafana/agent/internal/static/logs" + "github.com/grafana/agent/static/logs" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" "go.opentelemetry.io/collector/processor" diff --git a/internal/static/traces/config.go b/static/traces/config.go similarity index 98% rename from internal/static/traces/config.go rename to static/traces/config.go index 93364ea5ee37..2468a3073084 100644 --- a/internal/static/traces/config.go +++ b/static/traces/config.go @@ -11,7 +11,7 @@ import ( "strings" "time" - promsdconsumer "github.com/grafana/agent/internal/static/traces/promsdprocessor/consumer" + promsdconsumer "github.com/grafana/agent/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/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" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/static/traces/automaticloggingprocessor" + "github.com/grafana/agent/static/traces/noopreceiver" + "github.com/grafana/agent/static/traces/promsdprocessor" + "github.com/grafana/agent/static/traces/pushreceiver" + "github.com/grafana/agent/static/traces/remotewriteexporter" + "github.com/grafana/agent/static/traces/servicegraphprocessor" ) const ( diff --git a/internal/static/traces/config_test.go b/static/traces/config_test.go similarity index 99% rename from internal/static/traces/config_test.go rename to static/traces/config_test.go index b7b2af4946e0..15f226ff6ea8 100644 --- a/internal/static/traces/config_test.go +++ b/static/traces/config_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/grafana/agent/internal/static/traces/pushreceiver" + "github.com/grafana/agent/static/traces/pushreceiver" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component" diff --git a/internal/static/traces/contextkeys/keys.go b/static/traces/contextkeys/keys.go similarity index 100% rename from internal/static/traces/contextkeys/keys.go rename to static/traces/contextkeys/keys.go diff --git a/internal/static/traces/instance.go b/static/traces/instance.go similarity index 93% rename from internal/static/traces/instance.go rename to static/traces/instance.go index 9e518a06794e..ebb922c95264 100644 --- a/internal/static/traces/instance.go +++ b/static/traces/instance.go @@ -18,13 +18,13 @@ import ( "go.uber.org/zap/zapcore" "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" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/traces/automaticloggingprocessor" + "github.com/grafana/agent/static/traces/contextkeys" + "github.com/grafana/agent/static/traces/servicegraphprocessor" + "github.com/grafana/agent/static/traces/traceutils" prom_client "github.com/prometheus/client_golang/prometheus" "go.opentelemetry.io/otel/trace/noop" ) diff --git a/internal/static/traces/noopreceiver/factory.go b/static/traces/noopreceiver/factory.go similarity index 100% rename from internal/static/traces/noopreceiver/factory.go rename to static/traces/noopreceiver/factory.go diff --git a/internal/static/traces/noopreceiver/receiver.go b/static/traces/noopreceiver/receiver.go similarity index 100% rename from internal/static/traces/noopreceiver/receiver.go rename to static/traces/noopreceiver/receiver.go diff --git a/internal/static/traces/promsdprocessor/consumer/consumer.go b/static/traces/promsdprocessor/consumer/consumer.go similarity index 100% rename from internal/static/traces/promsdprocessor/consumer/consumer.go rename to static/traces/promsdprocessor/consumer/consumer.go diff --git a/internal/static/traces/promsdprocessor/consumer/consumer_test.go b/static/traces/promsdprocessor/consumer/consumer_test.go similarity index 100% rename from internal/static/traces/promsdprocessor/consumer/consumer_test.go rename to static/traces/promsdprocessor/consumer/consumer_test.go diff --git a/internal/static/traces/promsdprocessor/factory.go b/static/traces/promsdprocessor/factory.go similarity index 100% rename from internal/static/traces/promsdprocessor/factory.go rename to static/traces/promsdprocessor/factory.go diff --git a/internal/static/traces/promsdprocessor/prom_sd_processor.go b/static/traces/promsdprocessor/prom_sd_processor.go similarity index 98% rename from internal/static/traces/promsdprocessor/prom_sd_processor.go rename to static/traces/promsdprocessor/prom_sd_processor.go index c88bfbca33b2..5dc617d49243 100644 --- a/internal/static/traces/promsdprocessor/prom_sd_processor.go +++ b/static/traces/promsdprocessor/prom_sd_processor.go @@ -7,8 +7,8 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "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" + promsdconsumer "github.com/grafana/agent/static/traces/promsdprocessor/consumer" "github.com/prometheus/prometheus/config" promdiscovery "github.com/prometheus/prometheus/discovery" "github.com/prometheus/prometheus/discovery/targetgroup" diff --git a/internal/static/traces/promsdprocessor/prom_sd_processor_test.go b/static/traces/promsdprocessor/prom_sd_processor_test.go similarity index 100% rename from internal/static/traces/promsdprocessor/prom_sd_processor_test.go rename to static/traces/promsdprocessor/prom_sd_processor_test.go diff --git a/internal/static/traces/pushreceiver/factory.go b/static/traces/pushreceiver/factory.go similarity index 100% rename from internal/static/traces/pushreceiver/factory.go rename to static/traces/pushreceiver/factory.go diff --git a/internal/static/traces/pushreceiver/receiver.go b/static/traces/pushreceiver/receiver.go similarity index 100% rename from internal/static/traces/pushreceiver/receiver.go rename to static/traces/pushreceiver/receiver.go diff --git a/internal/static/traces/remotewriteexporter/exporter.go b/static/traces/remotewriteexporter/exporter.go similarity index 98% rename from internal/static/traces/remotewriteexporter/exporter.go rename to static/traces/remotewriteexporter/exporter.go index 5f99af577a83..88176d3037c3 100644 --- a/internal/static/traces/remotewriteexporter/exporter.go +++ b/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/internal/static/metrics/instance" - "github.com/grafana/agent/internal/static/traces/contextkeys" util "github.com/grafana/agent/internal/util/log" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/traces/contextkeys" "github.com/prometheus/prometheus/model/labels" "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/consumer" diff --git a/internal/static/traces/remotewriteexporter/exporter_test.go b/static/traces/remotewriteexporter/exporter_test.go similarity index 97% rename from internal/static/traces/remotewriteexporter/exporter_test.go rename to static/traces/remotewriteexporter/exporter_test.go index 63025ec12016..d3c0f5e1a219 100644 --- a/internal/static/traces/remotewriteexporter/exporter_test.go +++ b/static/traces/remotewriteexporter/exporter_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "github.com/grafana/agent/internal/static/metrics/instance" - "github.com/grafana/agent/internal/static/traces/contextkeys" + "github.com/grafana/agent/static/metrics/instance" + "github.com/grafana/agent/static/traces/contextkeys" "github.com/prometheus/prometheus/model/exemplar" "github.com/prometheus/prometheus/model/histogram" "github.com/prometheus/prometheus/model/labels" diff --git a/internal/static/traces/remotewriteexporter/factory.go b/static/traces/remotewriteexporter/factory.go similarity index 100% rename from internal/static/traces/remotewriteexporter/factory.go rename to static/traces/remotewriteexporter/factory.go diff --git a/internal/static/traces/servicegraphprocessor/factory.go b/static/traces/servicegraphprocessor/factory.go similarity index 100% rename from internal/static/traces/servicegraphprocessor/factory.go rename to static/traces/servicegraphprocessor/factory.go diff --git a/internal/static/traces/servicegraphprocessor/processor.go b/static/traces/servicegraphprocessor/processor.go similarity index 100% rename from internal/static/traces/servicegraphprocessor/processor.go rename to static/traces/servicegraphprocessor/processor.go diff --git a/internal/static/traces/servicegraphprocessor/processor_test.go b/static/traces/servicegraphprocessor/processor_test.go similarity index 99% rename from internal/static/traces/servicegraphprocessor/processor_test.go rename to static/traces/servicegraphprocessor/processor_test.go index 705a14bdd8f2..091bd7c15a72 100644 --- a/internal/static/traces/servicegraphprocessor/processor_test.go +++ b/static/traces/servicegraphprocessor/processor_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/grafana/agent/internal/static/traces/traceutils" + "github.com/grafana/agent/static/traces/traceutils" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/testutil" "github.com/stretchr/testify/assert" diff --git a/internal/static/traces/servicegraphprocessor/store.go b/static/traces/servicegraphprocessor/store.go similarity index 100% rename from internal/static/traces/servicegraphprocessor/store.go rename to static/traces/servicegraphprocessor/store.go diff --git a/internal/static/traces/servicegraphprocessor/store_test.go b/static/traces/servicegraphprocessor/store_test.go similarity index 100% rename from internal/static/traces/servicegraphprocessor/store_test.go rename to static/traces/servicegraphprocessor/store_test.go diff --git a/internal/static/traces/servicegraphprocessor/testdata/trace-sample.json b/static/traces/servicegraphprocessor/testdata/trace-sample.json similarity index 100% rename from internal/static/traces/servicegraphprocessor/testdata/trace-sample.json rename to static/traces/servicegraphprocessor/testdata/trace-sample.json diff --git a/internal/static/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json b/static/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json similarity index 100% rename from internal/static/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json rename to static/traces/servicegraphprocessor/testdata/unpaired-trace-sample.json diff --git a/internal/static/traces/traces.go b/static/traces/traces.go similarity index 96% rename from internal/static/traces/traces.go rename to static/traces/traces.go index 3226e8084dbd..9e4e47eeee28 100644 --- a/internal/static/traces/traces.go +++ b/static/traces/traces.go @@ -5,9 +5,9 @@ import ( "sync" "github.com/go-kit/log" - "github.com/grafana/agent/internal/static/logs" - "github.com/grafana/agent/internal/static/metrics/instance" "github.com/grafana/agent/internal/util/zapadapter" + "github.com/grafana/agent/static/logs" + "github.com/grafana/agent/static/metrics/instance" prom_client "github.com/prometheus/client_golang/prometheus" "go.uber.org/zap" ) diff --git a/internal/static/traces/traces_test.go b/static/traces/traces_test.go similarity index 97% rename from internal/static/traces/traces_test.go rename to static/traces/traces_test.go index 5fc3fa4d8880..645457bf008c 100644 --- a/internal/static/traces/traces_test.go +++ b/static/traces/traces_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "github.com/grafana/agent/internal/static/server" - "github.com/grafana/agent/internal/static/traces/traceutils" "github.com/grafana/agent/internal/util" + "github.com/grafana/agent/static/server" + "github.com/grafana/agent/static/traces/traceutils" "github.com/grafana/dskit/log" "github.com/opentracing/opentracing-go" "github.com/prometheus/client_golang/prometheus" diff --git a/internal/static/traces/traceutils/otel_meter_settings.go b/static/traces/traceutils/otel_meter_settings.go similarity index 100% rename from internal/static/traces/traceutils/otel_meter_settings.go rename to static/traces/traceutils/otel_meter_settings.go diff --git a/internal/static/traces/traceutils/server.go b/static/traces/traceutils/server.go similarity index 100% rename from internal/static/traces/traceutils/server.go rename to static/traces/traceutils/server.go diff --git a/tools/gen-crd-docs/config.json b/tools/gen-crd-docs/config.json index 8ae1e273e85d..ce41aff8a197 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/internal/static/operator/assets\\.SecretStore$", - "docsURLTemplate": "https://pkg.go.dev/github.com/grafana/agent/internal/static/operator/assets#SecretStore" + "typeMatchPrefix": "^github\\.com/grafana/agent/static/operator/assets\\.SecretStore$", + "docsURLTemplate": "https://pkg.go.dev/github.com/grafana/agent/static/operator/assets#SecretStore" } ], "typeDisplayNamePrefixOverrides": { diff --git a/tools/generate-crds.bash b/tools/generate-crds.bash index 6bf999ce5264..e0ee4d2dc1e2 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/internal/static/operator/apis/monitoring/v1alpha1 +cd $ROOT/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