From 4812dc104d54548a431eaeb90af4043b9be376f2 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sat, 23 Nov 2024 10:18:22 +0100 Subject: [PATCH] [chore] use only gci linter Signed-off-by: Matthieu MOREL --- .golangci.yml | 6 ------ Makefile.Common | 16 +++++++++------- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../metadata/generated_telemetry_test.go | 3 +-- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 7 +++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- internal/tools/go.mod | 2 +- internal/tools/tools.go | 1 - .../generated_component_telemetry_test.go | 7 +++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- receiver/solacereceiver/internal/model/README.md | 4 ++-- .../generated_component_telemetry_test.go | 8 ++++---- .../internal/metadata/generated_telemetry.go | 6 ++---- .../metadata/generated_telemetry_test.go | 6 +++--- 66 files changed, 191 insertions(+), 239 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 83f780bdc864..ec32dbb47631 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -88,11 +88,6 @@ linters-settings: - pattern: interface{} replacement: any - goimports: - # put imports beginning with prefix after 3rd-party packages; - # it's a comma-separated list of prefixes - local-prefixes: github.com/open-telemetry/opentelemetry-collector-contrib - misspell: # Correct spellings using locale preferences for US or UK. # Default is to use a neutral variety of English. @@ -151,7 +146,6 @@ linters: - gci - gocritic - gofumpt - - goimports - gosec - govet - misspell diff --git a/Makefile.Common b/Makefile.Common index 3b742e42a2ba..52fb24d51ceb 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -66,7 +66,6 @@ MISSPELL_CORRECTION := $(TOOLS_BIN_DIR)/misspell -w LINT := $(TOOLS_BIN_DIR)/golangci-lint MULTIMOD := $(TOOLS_BIN_DIR)/multimod CHLOGGEN := $(TOOLS_BIN_DIR)/chloggen -GOIMPORTS := $(TOOLS_BIN_DIR)/goimports PORTO := $(TOOLS_BIN_DIR)/porto CHECKFILE := $(TOOLS_BIN_DIR)/checkfile CROSSLINK := $(TOOLS_BIN_DIR)/crosslink @@ -208,9 +207,7 @@ checklinks: $(MDLINKCHECK) -q -c $(SRC_ROOT)/.github/workflows/check_links_config.json || true .PHONY: fmt -fmt: $(GOFUMPT) $(GOIMPORTS) - $(GOFUMPT) -l -w . - $(GOIMPORTS) -w -local github.com/open-telemetry/opentelemetry-collector-contrib ./ +fmt: gofumpt gci .PHONY: lint lint: $(LINT) checklicense misspell @@ -245,13 +242,18 @@ moddownload: .PHONY: testifylint testifylint: $(TESTIFYLINT) @echo "running $(TESTIFYLINT)" - $(TESTIFYLINT) $(TESTIFYLINT_OPT) ./... + @$(TESTIFYLINT) $(TESTIFYLINT_OPT) ./... .PHONY: testifylint-fix testifylint-fix: @$(MAKE) testifylint TESTIFYLINT_OPT="${TESTIFYLINT_OPT} --fix" +.PHONY: gofumpt +gofumpt: $(GOFUMPT) + @echo "running $(GOFUMPT)" + @$(GOFUMPT) -l -w . + .PHONY: gci -gci: $(TOOLS_BIN_DIR)/gci +gci: $(GCI) @echo "running $(GCI)" - @$(GCI) write -s standard -s default -s "prefix(github.com/open-telemetry/opentelemetry-collector-contrib)" $(ALL_SRC_AND_DOC) + @$(GCI) write -s standard -s default -s "prefix(github.com/open-telemetry/opentelemetry-collector-contrib)" . diff --git a/connector/grafanacloudconnector/generated_component_telemetry_test.go b/connector/grafanacloudconnector/generated_component_telemetry_test.go index b118839d199b..89ccb9ca5a67 100644 --- a/connector/grafanacloudconnector/generated_component_telemetry_test.go +++ b/connector/grafanacloudconnector/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/connector/grafanacloudconnector/internal/metadata/generated_telemetry.go b/connector/grafanacloudconnector/internal/metadata/generated_telemetry.go index 5733800b40ca..63d53b2b8b09 100644 --- a/connector/grafanacloudconnector/internal/metadata/generated_telemetry.go +++ b/connector/grafanacloudconnector/internal/metadata/generated_telemetry.go @@ -6,12 +6,10 @@ import ( "context" "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/connector/grafanacloudconnector/internal/metadata/generated_telemetry_test.go b/connector/grafanacloudconnector/internal/metadata/generated_telemetry_test.go index dacf9b2ea200..c158c32dec76 100644 --- a/connector/grafanacloudconnector/internal/metadata/generated_telemetry_test.go +++ b/connector/grafanacloudconnector/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/connector/servicegraphconnector/generated_component_telemetry_test.go b/connector/servicegraphconnector/generated_component_telemetry_test.go index 1e5f0c9b4ccd..5c9e2d3d83b5 100644 --- a/connector/servicegraphconnector/generated_component_telemetry_test.go +++ b/connector/servicegraphconnector/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/connector" "go.opentelemetry.io/collector/connector/connectortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/connector/servicegraphconnector/internal/metadata/generated_telemetry.go b/connector/servicegraphconnector/internal/metadata/generated_telemetry.go index 7fd54dd4faf4..27485e4b2f87 100644 --- a/connector/servicegraphconnector/internal/metadata/generated_telemetry.go +++ b/connector/servicegraphconnector/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/connector/servicegraphconnector/internal/metadata/generated_telemetry_test.go b/connector/servicegraphconnector/internal/metadata/generated_telemetry_test.go index ce3ddb673243..433c31b7d2a3 100644 --- a/connector/servicegraphconnector/internal/metadata/generated_telemetry_test.go +++ b/connector/servicegraphconnector/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/exporter/loadbalancingexporter/generated_component_telemetry_test.go b/exporter/loadbalancingexporter/generated_component_telemetry_test.go index b8e4b136fb6b..b037b9020824 100644 --- a/exporter/loadbalancingexporter/generated_component_telemetry_test.go +++ b/exporter/loadbalancingexporter/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go b/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go index 0b94025141b4..7fb3140d7b17 100644 --- a/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go +++ b/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/exporter/loadbalancingexporter/internal/metadata/generated_telemetry_test.go b/exporter/loadbalancingexporter/internal/metadata/generated_telemetry_test.go index 813a551209f6..6137598a42cd 100644 --- a/exporter/loadbalancingexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/loadbalancingexporter/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/exporter/lokiexporter/generated_component_telemetry_test.go b/exporter/lokiexporter/generated_component_telemetry_test.go index 80c96b84caa8..c298a42bf7b0 100644 --- a/exporter/lokiexporter/generated_component_telemetry_test.go +++ b/exporter/lokiexporter/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/exporter/lokiexporter/internal/metadata/generated_telemetry.go b/exporter/lokiexporter/internal/metadata/generated_telemetry.go index e0d9797081d1..26bf43d88e93 100644 --- a/exporter/lokiexporter/internal/metadata/generated_telemetry.go +++ b/exporter/lokiexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/exporter/lokiexporter/internal/metadata/generated_telemetry_test.go b/exporter/lokiexporter/internal/metadata/generated_telemetry_test.go index 7d2808159ab4..13b0731d721e 100644 --- a/exporter/lokiexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/lokiexporter/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go b/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go index ca13452a47ec..b10ce0f538ea 100644 --- a/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go +++ b/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go b/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go index 248d453764c4..57f15ed9ea11 100644 --- a/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go +++ b/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry_test.go b/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry_test.go index 8d1a898b5da1..d98525cbb503 100644 --- a/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/exporter/splunkhecexporter/internal/metadata/generated_telemetry_test.go b/exporter/splunkhecexporter/internal/metadata/generated_telemetry_test.go index e1d0d3866490..557126e2066d 100644 --- a/exporter/splunkhecexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/splunkhecexporter/internal/metadata/generated_telemetry_test.go @@ -6,14 +6,13 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" ) type mockMeter struct { diff --git a/exporter/sumologicexporter/generated_component_telemetry_test.go b/exporter/sumologicexporter/generated_component_telemetry_test.go index a6f70aa059c4..7c9cb7edc842 100644 --- a/exporter/sumologicexporter/generated_component_telemetry_test.go +++ b/exporter/sumologicexporter/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/exporter" "go.opentelemetry.io/collector/exporter/exportertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/exporter/sumologicexporter/internal/metadata/generated_telemetry.go b/exporter/sumologicexporter/internal/metadata/generated_telemetry.go index 262cfd33c0e0..2e6d1653c74a 100644 --- a/exporter/sumologicexporter/internal/metadata/generated_telemetry.go +++ b/exporter/sumologicexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/exporter/sumologicexporter/internal/metadata/generated_telemetry_test.go b/exporter/sumologicexporter/internal/metadata/generated_telemetry_test.go index 56f300a2abe0..b8eb07445129 100644 --- a/exporter/sumologicexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/sumologicexporter/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/internal/otelarrow/generated_component_telemetry_test.go b/internal/otelarrow/generated_component_telemetry_test.go index c7a4e7ae7661..d1466ad66389 100644 --- a/internal/otelarrow/generated_component_telemetry_test.go +++ b/internal/otelarrow/generated_component_telemetry_test.go @@ -7,13 +7,12 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/internal/otelarrow/internal/metadata/generated_telemetry.go b/internal/otelarrow/internal/metadata/generated_telemetry.go index b660514567f1..7efc0cf3534a 100644 --- a/internal/otelarrow/internal/metadata/generated_telemetry.go +++ b/internal/otelarrow/internal/metadata/generated_telemetry.go @@ -6,12 +6,10 @@ import ( "context" "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/internal/otelarrow/internal/metadata/generated_telemetry_test.go b/internal/otelarrow/internal/metadata/generated_telemetry_test.go index a23e1167e3a9..2b41473791e2 100644 --- a/internal/otelarrow/internal/metadata/generated_telemetry_test.go +++ b/internal/otelarrow/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/internal/tools/go.mod b/internal/tools/go.mod index ad4467e2ebcc..4c3a15cc9a68 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -19,7 +19,6 @@ require ( go.opentelemetry.io/collector/cmd/builder v0.115.0 go.opentelemetry.io/collector/cmd/mdatagen v0.115.0 go.uber.org/goleak v1.3.0 - golang.org/x/tools v0.27.0 golang.org/x/vuln v1.1.3 gotest.tools/gotestsum v1.12.0 mvdan.cc/gofumpt v0.6.0 @@ -250,6 +249,7 @@ require ( golang.org/x/telemetry v0.0.0-20240522233618-39ace7a40ae7 // indirect golang.org/x/term v0.26.0 // indirect golang.org/x/text v0.20.0 // indirect + golang.org/x/tools v0.27.0 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240822170219-fc7c04adadcd // indirect google.golang.org/grpc v1.67.1 // indirect google.golang.org/protobuf v1.35.2 // indirect diff --git a/internal/tools/tools.go b/internal/tools/tools.go index 2dcc07248445..9ec866e4ec98 100644 --- a/internal/tools/tools.go +++ b/internal/tools/tools.go @@ -26,7 +26,6 @@ import ( _ "go.opentelemetry.io/build-tools/multimod" _ "go.opentelemetry.io/collector/cmd/builder" _ "go.opentelemetry.io/collector/cmd/mdatagen" - _ "golang.org/x/tools/cmd/goimports" _ "golang.org/x/vuln/cmd/govulncheck" _ "gotest.tools/gotestsum" _ "mvdan.cc/gofumpt" diff --git a/pkg/stanza/fileconsumer/generated_component_telemetry_test.go b/pkg/stanza/fileconsumer/generated_component_telemetry_test.go index 33ecc0a62dec..d725908b5cef 100644 --- a/pkg/stanza/fileconsumer/generated_component_telemetry_test.go +++ b/pkg/stanza/fileconsumer/generated_component_telemetry_test.go @@ -7,13 +7,12 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go b/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go index 718505df0460..eb33e215141a 100644 --- a/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go +++ b/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry_test.go b/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry_test.go index 1b7c89fb0f78..babbfab3fad7 100644 --- a/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry_test.go +++ b/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go b/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go index 81de4b732dc0..a2c168ed4f9b 100644 --- a/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go +++ b/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry.go b/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry.go index 82a4476ba92c..943b260fd38a 100644 --- a/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry.go +++ b/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry.go @@ -6,12 +6,10 @@ import ( "context" "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry_test.go b/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry_test.go index 72c9d3fd624c..32d85341e026 100644 --- a/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/filterprocessor/generated_component_telemetry_test.go b/processor/filterprocessor/generated_component_telemetry_test.go index ea374ea08e93..a182f4a4649c 100644 --- a/processor/filterprocessor/generated_component_telemetry_test.go +++ b/processor/filterprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/filterprocessor/internal/metadata/generated_telemetry.go b/processor/filterprocessor/internal/metadata/generated_telemetry.go index ea918acc4187..33373b04b447 100644 --- a/processor/filterprocessor/internal/metadata/generated_telemetry.go +++ b/processor/filterprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/filterprocessor/internal/metadata/generated_telemetry_test.go b/processor/filterprocessor/internal/metadata/generated_telemetry_test.go index e963b837d3c2..d160a9466ab0 100644 --- a/processor/filterprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/filterprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/groupbyattrsprocessor/generated_component_telemetry_test.go b/processor/groupbyattrsprocessor/generated_component_telemetry_test.go index 876acb407754..11719aae97d9 100644 --- a/processor/groupbyattrsprocessor/generated_component_telemetry_test.go +++ b/processor/groupbyattrsprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry.go b/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry.go index a2d3472e7d22..14149e70a4ec 100644 --- a/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry.go +++ b/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry_test.go b/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry_test.go index 2ddc375e5d6b..905a63326b3d 100644 --- a/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/groupbytraceprocessor/generated_component_telemetry_test.go b/processor/groupbytraceprocessor/generated_component_telemetry_test.go index a2977719e613..af1641ad05cd 100644 --- a/processor/groupbytraceprocessor/generated_component_telemetry_test.go +++ b/processor/groupbytraceprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/groupbytraceprocessor/internal/metadata/generated_telemetry.go b/processor/groupbytraceprocessor/internal/metadata/generated_telemetry.go index fa8050ff879b..171dafea86d1 100644 --- a/processor/groupbytraceprocessor/internal/metadata/generated_telemetry.go +++ b/processor/groupbytraceprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/groupbytraceprocessor/internal/metadata/generated_telemetry_test.go b/processor/groupbytraceprocessor/internal/metadata/generated_telemetry_test.go index b379ef6221dc..22bfe53f455b 100644 --- a/processor/groupbytraceprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/groupbytraceprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/k8sattributesprocessor/generated_component_telemetry_test.go b/processor/k8sattributesprocessor/generated_component_telemetry_test.go index 9f66d0f06499..da860dd6c423 100644 --- a/processor/k8sattributesprocessor/generated_component_telemetry_test.go +++ b/processor/k8sattributesprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go b/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go index de87e9f26aaa..7b2cdd4aad81 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go b/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go index 7dce31df5124..3b69b6a216e2 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go b/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go index c9d4c2a5f1bf..56093943e57a 100644 --- a/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go +++ b/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry.go b/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry.go index 92de4ca6aa6b..3fffbd5bbc2d 100644 --- a/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry.go +++ b/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry_test.go b/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry_test.go index b8fc449d0f45..7895bb78b6a5 100644 --- a/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/routingprocessor/generated_component_telemetry_test.go b/processor/routingprocessor/generated_component_telemetry_test.go index c206d5ffd848..b3d97ac5664f 100644 --- a/processor/routingprocessor/generated_component_telemetry_test.go +++ b/processor/routingprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/routingprocessor/internal/metadata/generated_telemetry.go b/processor/routingprocessor/internal/metadata/generated_telemetry.go index 7927b41652f3..08a23d30bc0c 100644 --- a/processor/routingprocessor/internal/metadata/generated_telemetry.go +++ b/processor/routingprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/routingprocessor/internal/metadata/generated_telemetry_test.go b/processor/routingprocessor/internal/metadata/generated_telemetry_test.go index 0727bbc7109e..25b1d3a18f16 100644 --- a/processor/routingprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/routingprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/processor/tailsamplingprocessor/generated_component_telemetry_test.go b/processor/tailsamplingprocessor/generated_component_telemetry_test.go index 11979c48d9f0..bd240030c673 100644 --- a/processor/tailsamplingprocessor/generated_component_telemetry_test.go +++ b/processor/tailsamplingprocessor/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/processor" "go.opentelemetry.io/collector/processor/processortest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/processor/tailsamplingprocessor/internal/metadata/generated_telemetry.go b/processor/tailsamplingprocessor/internal/metadata/generated_telemetry.go index f8fdf605ad19..8614075bfd98 100644 --- a/processor/tailsamplingprocessor/internal/metadata/generated_telemetry.go +++ b/processor/tailsamplingprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/processor/tailsamplingprocessor/internal/metadata/generated_telemetry_test.go b/processor/tailsamplingprocessor/internal/metadata/generated_telemetry_test.go index 919da43ebd7f..a18be8d8d5e3 100644 --- a/processor/tailsamplingprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/tailsamplingprocessor/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/receiver/fluentforwardreceiver/generated_component_telemetry_test.go b/receiver/fluentforwardreceiver/generated_component_telemetry_test.go index 7adb9d5872bc..fad74170b7f7 100644 --- a/receiver/fluentforwardreceiver/generated_component_telemetry_test.go +++ b/receiver/fluentforwardreceiver/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go index 04acb6ee4ad2..7553d4b0c3ee 100644 --- a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go +++ b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go index 12f1c7dda902..7e0bc64a2cd0 100644 --- a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/receiver/kafkareceiver/generated_component_telemetry_test.go b/receiver/kafkareceiver/generated_component_telemetry_test.go index 34aaceae0856..0885663d9813 100644 --- a/receiver/kafkareceiver/generated_component_telemetry_test.go +++ b/receiver/kafkareceiver/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/receiver/kafkareceiver/internal/metadata/generated_telemetry.go b/receiver/kafkareceiver/internal/metadata/generated_telemetry.go index 87c954834ef8..809d8193e45e 100644 --- a/receiver/kafkareceiver/internal/metadata/generated_telemetry.go +++ b/receiver/kafkareceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/receiver/kafkareceiver/internal/metadata/generated_telemetry_test.go b/receiver/kafkareceiver/internal/metadata/generated_telemetry_test.go index 93c12c77af4c..f3fe9537c37d 100644 --- a/receiver/kafkareceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/kafkareceiver/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/receiver/solacereceiver/generated_component_telemetry_test.go b/receiver/solacereceiver/generated_component_telemetry_test.go index b2906ddf8884..365e3ccc5785 100644 --- a/receiver/solacereceiver/generated_component_telemetry_test.go +++ b/receiver/solacereceiver/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/receiver/solacereceiver/internal/metadata/generated_telemetry.go b/receiver/solacereceiver/internal/metadata/generated_telemetry.go index 6466cee564f3..d0a4c143bf22 100644 --- a/receiver/solacereceiver/internal/metadata/generated_telemetry.go +++ b/receiver/solacereceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/receiver/solacereceiver/internal/metadata/generated_telemetry_test.go b/receiver/solacereceiver/internal/metadata/generated_telemetry_test.go index f91bb05256cb..5075326b8a4d 100644 --- a/receiver/solacereceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/solacereceiver/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct { diff --git a/receiver/solacereceiver/internal/model/README.md b/receiver/solacereceiver/internal/model/README.md index 6a88a1a7bd81..6a8e2b60fb79 100644 --- a/receiver/solacereceiver/internal/model/README.md +++ b/receiver/solacereceiver/internal/model/README.md @@ -1,11 +1,11 @@ # model -The model directory contains the protobuf models used for payload unmarshalling in the Solace receiver. Go models can be generated based on the protobuf using `protoc`. To generate the protobuf model, the [protoc-gen-go](https://developers.google.com/protocol-buffers/docs/reference/go-generated) package must be installed. To format the code correctly, we call [goimports](https://pkg.go.dev/golang.org/x/tools/cmd/goimports). +The model directory contains the protobuf models used for payload unmarshalling in the Solace receiver. Go models can be generated based on the protobuf using `protoc`. To generate the protobuf model, the [protoc-gen-go](https://developers.google.com/protocol-buffers/docs/reference/go-generated) package must be installed. To format the code correctly, we call [gci](https://github.com/daixiang0/gci). To generate the V1 model from the model directory: ``` protoc --go_out=../ --go_opt=paths=import --go_opt=Mreceive_v1.proto=model/receive/v1 receive_v1.proto protoc --go_out=../ --go_opt=paths=import --go_opt=Megress_v1.proto=model/egress/v1 egress_v1.proto protoc --go_out=../ --go_opt=paths=import --go_opt=Mmove_v1.proto=model/move/v1 move_v1.proto -goimports -w . +gci write -s standard -s default -s "prefix(github.com/open-telemetry/opentelemetry-collector-contrib)" . ``` diff --git a/receiver/statsdreceiver/generated_component_telemetry_test.go b/receiver/statsdreceiver/generated_component_telemetry_test.go index 18b55c3dd77f..b64a90afc2eb 100644 --- a/receiver/statsdreceiver/generated_component_telemetry_test.go +++ b/receiver/statsdreceiver/generated_component_telemetry_test.go @@ -7,15 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - sdkmetric "go.opentelemetry.io/otel/sdk/metric" - "go.opentelemetry.io/otel/sdk/metric/metricdata" - "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/component/componenttest" "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/collector/receiver" "go.opentelemetry.io/collector/receiver/receivertest" + "go.opentelemetry.io/otel/metric" + sdkmetric "go.opentelemetry.io/otel/sdk/metric" + "go.opentelemetry.io/otel/sdk/metric/metricdata" + "go.opentelemetry.io/otel/sdk/metric/metricdata/metricdatatest" ) type componentTestTelemetry struct { diff --git a/receiver/statsdreceiver/internal/metadata/generated_telemetry.go b/receiver/statsdreceiver/internal/metadata/generated_telemetry.go index 8412cc9d1a92..8255e092eb93 100644 --- a/receiver/statsdreceiver/internal/metadata/generated_telemetry.go +++ b/receiver/statsdreceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,10 @@ package metadata import ( "errors" - "go.opentelemetry.io/otel/metric" - "go.opentelemetry.io/otel/metric/noop" - "go.opentelemetry.io/otel/trace" - "go.opentelemetry.io/collector/component" "go.opentelemetry.io/collector/config/configtelemetry" + "go.opentelemetry.io/otel/metric" + "go.opentelemetry.io/otel/trace" ) func Meter(settings component.TelemetrySettings) metric.Meter { diff --git a/receiver/statsdreceiver/internal/metadata/generated_telemetry_test.go b/receiver/statsdreceiver/internal/metadata/generated_telemetry_test.go index d86c3da41767..f630e607dd36 100644 --- a/receiver/statsdreceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/statsdreceiver/internal/metadata/generated_telemetry_test.go @@ -6,15 +6,15 @@ import ( "testing" "github.com/stretchr/testify/require" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/config/configtelemetry" "go.opentelemetry.io/otel/metric" embeddedmetric "go.opentelemetry.io/otel/metric/embedded" noopmetric "go.opentelemetry.io/otel/metric/noop" "go.opentelemetry.io/otel/trace" embeddedtrace "go.opentelemetry.io/otel/trace/embedded" nooptrace "go.opentelemetry.io/otel/trace/noop" - - "go.opentelemetry.io/collector/component" - "go.opentelemetry.io/collector/component/componenttest" ) type mockMeter struct {