From 80959d6ac54948fe293cc54bf127fb691e1d6e02 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 | 14 ++++++++------ .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../internal/metadata/generated_telemetry_test.go | 3 +-- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 7 +++---- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- internal/tools/go.mod | 2 +- internal/tools/tools.go | 1 - .../generated_component_telemetry_test.go | 7 +++---- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- receiver/k8sclusterreceiver/e2e_test.go | 7 +++---- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- .../internal/metadata/generated_telemetry_test.go | 3 +-- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- receiver/solacereceiver/internal/model/README.md | 4 ++-- .../generated_component_telemetry_test.go | 9 ++++----- .../internal/metadata/generated_telemetry.go | 5 ++--- .../internal/metadata/generated_telemetry_test.go | 7 +++---- 68 files changed, 194 insertions(+), 262 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 c5459458f79f..25eff738aa06 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 @@ -251,7 +248,12 @@ testifylint: $(TESTIFYLINT) 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 3b6e98fa6c04..c62653facd66 100644 --- a/connector/grafanacloudconnector/generated_component_telemetry_test.go +++ b/connector/grafanacloudconnector/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 b112af6b2bcd..bf082773c35f 100644 --- a/connector/grafanacloudconnector/internal/metadata/generated_telemetry.go +++ b/connector/grafanacloudconnector/internal/metadata/generated_telemetry.go @@ -6,12 +6,11 @@ import ( "context" "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 f886c53c8cb8..24b99ca3e7af 100644 --- a/connector/grafanacloudconnector/internal/metadata/generated_telemetry_test.go +++ b/connector/grafanacloudconnector/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/connector/servicegraphconnector/generated_component_telemetry_test.go b/connector/servicegraphconnector/generated_component_telemetry_test.go index 08ef028ec62a..5e8ea0412674 100644 --- a/connector/servicegraphconnector/generated_component_telemetry_test.go +++ b/connector/servicegraphconnector/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 2d0017b7f596..46f61672c4c3 100644 --- a/connector/servicegraphconnector/internal/metadata/generated_telemetry.go +++ b/connector/servicegraphconnector/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 8a9f58d18a7a..eb68abc7eebd 100644 --- a/connector/servicegraphconnector/internal/metadata/generated_telemetry_test.go +++ b/connector/servicegraphconnector/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/exporter/loadbalancingexporter/generated_component_telemetry_test.go b/exporter/loadbalancingexporter/generated_component_telemetry_test.go index a36b5198e98a..4ed9e0e83db3 100644 --- a/exporter/loadbalancingexporter/generated_component_telemetry_test.go +++ b/exporter/loadbalancingexporter/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 e306369d6ba8..2c9631a97d67 100644 --- a/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go +++ b/exporter/loadbalancingexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 96d105ded5b5..ec230987a6e6 100644 --- a/exporter/loadbalancingexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/loadbalancingexporter/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/exporter/lokiexporter/generated_component_telemetry_test.go b/exporter/lokiexporter/generated_component_telemetry_test.go index 986640bba4ea..140623a7e5c7 100644 --- a/exporter/lokiexporter/generated_component_telemetry_test.go +++ b/exporter/lokiexporter/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 2ba43e4ace80..e61e65f25e4c 100644 --- a/exporter/lokiexporter/internal/metadata/generated_telemetry.go +++ b/exporter/lokiexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 c716bd6ecd97..636b0eaec35d 100644 --- a/exporter/lokiexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/lokiexporter/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go b/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go index 5161532ebc8c..55a3839b9b85 100644 --- a/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go +++ b/exporter/prometheusremotewriteexporter/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 d90f2654ad15..4d7086fee553 100644 --- a/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go +++ b/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 10cd283810da..c1434480e631 100644 --- a/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/prometheusremotewriteexporter/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) 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 4527d7f00f66..840a231bcc26 100644 --- a/exporter/sumologicexporter/generated_component_telemetry_test.go +++ b/exporter/sumologicexporter/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 6e4c27f6a247..72b281046fe6 100644 --- a/exporter/sumologicexporter/internal/metadata/generated_telemetry.go +++ b/exporter/sumologicexporter/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 3293920c21b7..d62d02c58ded 100644 --- a/exporter/sumologicexporter/internal/metadata/generated_telemetry_test.go +++ b/exporter/sumologicexporter/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/internal/otelarrow/generated_component_telemetry_test.go b/internal/otelarrow/generated_component_telemetry_test.go index 082fb732fe0f..6184a0d6ba99 100644 --- a/internal/otelarrow/generated_component_telemetry_test.go +++ b/internal/otelarrow/generated_component_telemetry_test.go @@ -7,14 +7,13 @@ 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" 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" ) type componentTestTelemetry struct { diff --git a/internal/otelarrow/internal/metadata/generated_telemetry.go b/internal/otelarrow/internal/metadata/generated_telemetry.go index 4f49f12bc7c8..84269aac57ba 100644 --- a/internal/otelarrow/internal/metadata/generated_telemetry.go +++ b/internal/otelarrow/internal/metadata/generated_telemetry.go @@ -6,12 +6,11 @@ import ( "context" "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 ab1411c26336..83a831011c38 100644 --- a/internal/otelarrow/internal/metadata/generated_telemetry_test.go +++ b/internal/otelarrow/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/internal/tools/go.mod b/internal/tools/go.mod index f013f582f68c..f242ab5112f8 100644 --- a/internal/tools/go.mod +++ b/internal/tools/go.mod @@ -19,7 +19,6 @@ require ( go.opentelemetry.io/collector/cmd/builder v0.114.0 go.opentelemetry.io/collector/cmd/mdatagen v0.114.0 go.uber.org/goleak v1.3.0 - golang.org/x/tools v0.26.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.25.0 // indirect golang.org/x/text v0.20.0 // indirect + golang.org/x/tools v0.26.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.1 // 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 2949ca1fc360..4777809eb75d 100644 --- a/pkg/stanza/fileconsumer/generated_component_telemetry_test.go +++ b/pkg/stanza/fileconsumer/generated_component_telemetry_test.go @@ -7,14 +7,13 @@ 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" 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" ) type componentTestTelemetry struct { diff --git a/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go b/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go index 4fb2dc7bfb03..fb40ab288344 100644 --- a/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go +++ b/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 b538e7665597..139ce3434ff9 100644 --- a/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry_test.go +++ b/pkg/stanza/fileconsumer/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go b/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go index e0df34fcd619..c51f05429ce0 100644 --- a/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go +++ b/processor/deltatocumulativeprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 0e093d55f26f..8ff94a6627e7 100644 --- a/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry.go +++ b/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry.go @@ -6,12 +6,11 @@ import ( "context" "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 487afe393eef..9c74d2146ac5 100644 --- a/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/deltatocumulativeprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/filterprocessor/generated_component_telemetry_test.go b/processor/filterprocessor/generated_component_telemetry_test.go index a0437762e184..d7590457c595 100644 --- a/processor/filterprocessor/generated_component_telemetry_test.go +++ b/processor/filterprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 e09ff3e3a6b7..e1fde85d1dea 100644 --- a/processor/filterprocessor/internal/metadata/generated_telemetry.go +++ b/processor/filterprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 0d7e36d7743c..f95f1cbd6c11 100644 --- a/processor/filterprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/filterprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/groupbyattrsprocessor/generated_component_telemetry_test.go b/processor/groupbyattrsprocessor/generated_component_telemetry_test.go index 740256a16f4e..71cb381ca940 100644 --- a/processor/groupbyattrsprocessor/generated_component_telemetry_test.go +++ b/processor/groupbyattrsprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 4510d7aac459..e19cc13ecf01 100644 --- a/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry.go +++ b/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 d943d9062622..3237c783fb2e 100644 --- a/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/groupbyattrsprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/groupbytraceprocessor/generated_component_telemetry_test.go b/processor/groupbytraceprocessor/generated_component_telemetry_test.go index 7c7fd252435e..ff151528e1a7 100644 --- a/processor/groupbytraceprocessor/generated_component_telemetry_test.go +++ b/processor/groupbytraceprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 8872905ca7b8..95a738424f27 100644 --- a/processor/groupbytraceprocessor/internal/metadata/generated_telemetry.go +++ b/processor/groupbytraceprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 5d00ebf09e34..da1f0d224103 100644 --- a/processor/groupbytraceprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/groupbytraceprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/k8sattributesprocessor/generated_component_telemetry_test.go b/processor/k8sattributesprocessor/generated_component_telemetry_test.go index 2427970516fa..90b99d1baefb 100644 --- a/processor/k8sattributesprocessor/generated_component_telemetry_test.go +++ b/processor/k8sattributesprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 ad04898e1e68..2c62677e80fe 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 e7a8845d42dc..1c83317355fb 100644 --- a/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/k8sattributesprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go b/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go index 4d79be1134b8..d9d960bb6a60 100644 --- a/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go +++ b/processor/probabilisticsamplerprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 04353105eda9..4b417b4a7c82 100644 --- a/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry.go +++ b/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 cb285dbbd929..18d99f1587c7 100644 --- a/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/probabilisticsamplerprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/routingprocessor/generated_component_telemetry_test.go b/processor/routingprocessor/generated_component_telemetry_test.go index b15006ce3734..6cf493908ed8 100644 --- a/processor/routingprocessor/generated_component_telemetry_test.go +++ b/processor/routingprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 affad96ef352..370febc6228e 100644 --- a/processor/routingprocessor/internal/metadata/generated_telemetry.go +++ b/processor/routingprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 e04d9b0edfd0..6ce003cac50f 100644 --- a/processor/routingprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/routingprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/processor/tailsamplingprocessor/generated_component_telemetry_test.go b/processor/tailsamplingprocessor/generated_component_telemetry_test.go index 25daeace52c7..2d5f3bd1bcf7 100644 --- a/processor/tailsamplingprocessor/generated_component_telemetry_test.go +++ b/processor/tailsamplingprocessor/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 d6326a39dee5..f0c75e5feff4 100644 --- a/processor/tailsamplingprocessor/internal/metadata/generated_telemetry.go +++ b/processor/tailsamplingprocessor/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 a3395236ea84..fa1727c17c1f 100644 --- a/processor/tailsamplingprocessor/internal/metadata/generated_telemetry_test.go +++ b/processor/tailsamplingprocessor/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/receiver/fluentforwardreceiver/generated_component_telemetry_test.go b/receiver/fluentforwardreceiver/generated_component_telemetry_test.go index b9e56469e632..98b355ee3d2e 100644 --- a/receiver/fluentforwardreceiver/generated_component_telemetry_test.go +++ b/receiver/fluentforwardreceiver/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 bca1ba18d6a3..8cd2f95142f6 100644 --- a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go +++ b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 06d4cc292c5f..c6ecc8bd9cd8 100644 --- a/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/fluentforwardreceiver/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/receiver/k8sclusterreceiver/e2e_test.go b/receiver/k8sclusterreceiver/e2e_test.go index 1f571d486dfd..e7b0bbb024a7 100644 --- a/receiver/k8sclusterreceiver/e2e_test.go +++ b/receiver/k8sclusterreceiver/e2e_test.go @@ -12,15 +12,14 @@ import ( "testing" "time" - "go.opentelemetry.io/collector/consumer/consumertest" - "go.opentelemetry.io/collector/receiver/otlpreceiver" - "go.opentelemetry.io/collector/receiver/receivertest" - "github.com/google/uuid" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "go.opentelemetry.io/collector/component/componenttest" + "go.opentelemetry.io/collector/consumer/consumertest" "go.opentelemetry.io/collector/pdata/pmetric" + "go.opentelemetry.io/collector/receiver/otlpreceiver" + "go.opentelemetry.io/collector/receiver/receivertest" "github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8stest" "github.com/open-telemetry/opentelemetry-collector-contrib/pkg/golden" diff --git a/receiver/kafkareceiver/generated_component_telemetry_test.go b/receiver/kafkareceiver/generated_component_telemetry_test.go index ecae9482633c..d6dc1a9f572f 100644 --- a/receiver/kafkareceiver/generated_component_telemetry_test.go +++ b/receiver/kafkareceiver/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 0a0fefbc0b5b..5723c9ec8a7e 100644 --- a/receiver/kafkareceiver/internal/metadata/generated_telemetry.go +++ b/receiver/kafkareceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 1ead19164a8a..108bdc2431fb 100644 --- a/receiver/kafkareceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/kafkareceiver/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct { diff --git a/receiver/otlpjsonfilereceiver/internal/metadata/generated_telemetry_test.go b/receiver/otlpjsonfilereceiver/internal/metadata/generated_telemetry_test.go index 3cb69319b6a5..c2b54d8b0492 100644 --- a/receiver/otlpjsonfilereceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/otlpjsonfilereceiver/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/receiver/solacereceiver/generated_component_telemetry_test.go b/receiver/solacereceiver/generated_component_telemetry_test.go index 81075778685b..9c48e6fcf3cb 100644 --- a/receiver/solacereceiver/generated_component_telemetry_test.go +++ b/receiver/solacereceiver/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 888b734f570b..0397b56f77ee 100644 --- a/receiver/solacereceiver/internal/metadata/generated_telemetry.go +++ b/receiver/solacereceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 76f015b57f4a..92b5e9d95dc6 100644 --- a/receiver/solacereceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/solacereceiver/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) 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 f84f53a26df5..05ddcfc600ac 100644 --- a/receiver/statsdreceiver/generated_component_telemetry_test.go +++ b/receiver/statsdreceiver/generated_component_telemetry_test.go @@ -7,16 +7,15 @@ import ( "testing" "github.com/stretchr/testify/require" - "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" - "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 5ef557da7f8d..55edc70c8e78 100644 --- a/receiver/statsdreceiver/internal/metadata/generated_telemetry.go +++ b/receiver/statsdreceiver/internal/metadata/generated_telemetry.go @@ -5,12 +5,11 @@ package metadata import ( "errors" + "go.opentelemetry.io/collector/component" + "go.opentelemetry.io/collector/config/configtelemetry" "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" ) 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 e10801bb12f9..a63d6e8fdd39 100644 --- a/receiver/statsdreceiver/internal/metadata/generated_telemetry_test.go +++ b/receiver/statsdreceiver/internal/metadata/generated_telemetry_test.go @@ -6,16 +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" - "go.opentelemetry.io/collector/config/configtelemetry" ) type mockMeter struct {