diff --git a/.golangci.yml b/.golangci.yml index fd2e2a451..2625fb6f2 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -86,7 +86,7 @@ linters-settings: # Exclude sentences prefixing a list. - ':$' goimports: - local-prefixes: go.opentelemetry.io + local-prefixes: go.opentelemetry.io/auto misspell: locale: US ignore-words: diff --git a/internal/pkg/instrumentors/bpf/database/sql/probe.go b/internal/pkg/instrumentors/bpf/database/sql/probe.go index 3c8679c0e..a5cf6fd94 100644 --- a/internal/pkg/instrumentors/bpf/database/sql/probe.go +++ b/internal/pkg/instrumentors/bpf/database/sql/probe.go @@ -29,13 +29,14 @@ import ( "github.com/cilium/ebpf/perf" "golang.org/x/sys/unix" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.18.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/auto/internal/pkg/instrumentors/utils" "go.opentelemetry.io/auto/internal/pkg/log" - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.18.0" - "go.opentelemetry.io/otel/trace" ) //go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c diff --git a/internal/pkg/instrumentors/bpf/database/sql/probe_test.go b/internal/pkg/instrumentors/bpf/database/sql/probe_test.go index f739d880f..cdecf1d61 100644 --- a/internal/pkg/instrumentors/bpf/database/sql/probe_test.go +++ b/internal/pkg/instrumentors/bpf/database/sql/probe_test.go @@ -20,11 +20,12 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/otel/attribute" semconv "go.opentelemetry.io/otel/semconv/v1.7.0" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" + "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" ) func TestInstrumentorConvertEvent(t *testing.T) { diff --git a/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe.go b/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe.go index 6a1e2bd87..6f3216e60 100644 --- a/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe.go +++ b/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe.go @@ -28,14 +28,15 @@ import ( "github.com/cilium/ebpf/perf" "golang.org/x/sys/unix" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.18.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/auto/internal/pkg/inject" "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/auto/internal/pkg/instrumentors/utils" "go.opentelemetry.io/auto/internal/pkg/log" - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.18.0" - "go.opentelemetry.io/otel/trace" ) //go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c diff --git a/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe_test.go b/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe_test.go index e586e3f51..6fe6ea9a8 100644 --- a/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe_test.go +++ b/internal/pkg/instrumentors/bpf/github.com/gin-gonic/gin/probe_test.go @@ -20,11 +20,12 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/otel/attribute" semconv "go.opentelemetry.io/otel/semconv/v1.7.0" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" + "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" ) func TestInstrumentorConvertEvent(t *testing.T) { diff --git a/internal/pkg/instrumentors/bpf/google.golang.org/grpc/probe.go b/internal/pkg/instrumentors/bpf/google.golang.org/grpc/probe.go index a27e2c6b6..026155b4b 100644 --- a/internal/pkg/instrumentors/bpf/google.golang.org/grpc/probe.go +++ b/internal/pkg/instrumentors/bpf/google.golang.org/grpc/probe.go @@ -31,14 +31,15 @@ import ( "github.com/cilium/ebpf/perf" "golang.org/x/sys/unix" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.18.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/auto/internal/pkg/inject" "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/auto/internal/pkg/instrumentors/utils" "go.opentelemetry.io/auto/internal/pkg/log" - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.18.0" - "go.opentelemetry.io/otel/trace" ) //go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c diff --git a/internal/pkg/instrumentors/bpf/google.golang.org/grpc/server/probe.go b/internal/pkg/instrumentors/bpf/google.golang.org/grpc/server/probe.go index 51a55fd00..e6d02ce34 100644 --- a/internal/pkg/instrumentors/bpf/google.golang.org/grpc/server/probe.go +++ b/internal/pkg/instrumentors/bpf/google.golang.org/grpc/server/probe.go @@ -29,14 +29,15 @@ import ( "github.com/hashicorp/go-version" "golang.org/x/sys/unix" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.18.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/auto/internal/pkg/inject" "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/auto/internal/pkg/instrumentors/utils" "go.opentelemetry.io/auto/internal/pkg/log" - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.18.0" - "go.opentelemetry.io/otel/trace" ) //go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c diff --git a/internal/pkg/instrumentors/bpf/net/http/client/probe.go b/internal/pkg/instrumentors/bpf/net/http/client/probe.go index 2913aac81..a4fcbffa9 100644 --- a/internal/pkg/instrumentors/bpf/net/http/client/probe.go +++ b/internal/pkg/instrumentors/bpf/net/http/client/probe.go @@ -27,13 +27,14 @@ import ( "github.com/cilium/ebpf/perf" "golang.org/x/sys/unix" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.7.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/auto/internal/pkg/inject" "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/auto/internal/pkg/log" - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.7.0" - "go.opentelemetry.io/otel/trace" ) //go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c diff --git a/internal/pkg/instrumentors/bpf/net/http/server/probe.go b/internal/pkg/instrumentors/bpf/net/http/server/probe.go index 9c33f4eea..72a035f84 100644 --- a/internal/pkg/instrumentors/bpf/net/http/server/probe.go +++ b/internal/pkg/instrumentors/bpf/net/http/server/probe.go @@ -27,14 +27,15 @@ import ( "github.com/cilium/ebpf/perf" "golang.org/x/sys/unix" + "go.opentelemetry.io/otel/attribute" + semconv "go.opentelemetry.io/otel/semconv/v1.18.0" + "go.opentelemetry.io/otel/trace" + "go.opentelemetry.io/auto/internal/pkg/inject" "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/auto/internal/pkg/instrumentors/utils" "go.opentelemetry.io/auto/internal/pkg/log" - "go.opentelemetry.io/otel/attribute" - semconv "go.opentelemetry.io/otel/semconv/v1.18.0" - "go.opentelemetry.io/otel/trace" ) //go:generate go run github.com/cilium/ebpf/cmd/bpf2go -target amd64,arm64 -cc clang -cflags $CFLAGS bpf ./bpf/probe.bpf.c diff --git a/internal/pkg/instrumentors/bpf/net/http/server/probe_test.go b/internal/pkg/instrumentors/bpf/net/http/server/probe_test.go index 8743a947c..3472e442b 100644 --- a/internal/pkg/instrumentors/bpf/net/http/server/probe_test.go +++ b/internal/pkg/instrumentors/bpf/net/http/server/probe_test.go @@ -20,11 +20,12 @@ import ( "github.com/stretchr/testify/assert" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/otel/attribute" semconv "go.opentelemetry.io/otel/semconv/v1.7.0" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/auto/internal/pkg/instrumentors/context" + "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" ) func TestInstrumentorConvertEvent(t *testing.T) { diff --git a/internal/pkg/opentelemetry/controller.go b/internal/pkg/opentelemetry/controller.go index 3f6ce517e..8f626ce35 100644 --- a/internal/pkg/opentelemetry/controller.go +++ b/internal/pkg/opentelemetry/controller.go @@ -25,14 +25,15 @@ import ( "golang.org/x/sys/unix" "google.golang.org/grpc" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" - "go.opentelemetry.io/auto/internal/pkg/log" "go.opentelemetry.io/otel/exporters/otlp/otlptrace" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc" "go.opentelemetry.io/otel/sdk/resource" sdktrace "go.opentelemetry.io/otel/sdk/trace" semconv "go.opentelemetry.io/otel/semconv/v1.18.0" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" + "go.opentelemetry.io/auto/internal/pkg/log" ) const ( diff --git a/internal/pkg/opentelemetry/id_generator.go b/internal/pkg/opentelemetry/id_generator.go index 86d50eb89..1bf44daa7 100644 --- a/internal/pkg/opentelemetry/id_generator.go +++ b/internal/pkg/opentelemetry/id_generator.go @@ -17,8 +17,9 @@ package opentelemetry import ( "context" - "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/auto/internal/pkg/instrumentors/events" ) type eBPFSourceIDGenerator struct{}