diff --git a/internal/pkg/instrumentation/bpf/go.opentelemetry.io/otel/traceglobal/probe.go b/internal/pkg/instrumentation/bpf/go.opentelemetry.io/otel/traceglobal/probe.go index 040b7ec9a..05c46ee02 100644 --- a/internal/pkg/instrumentation/bpf/go.opentelemetry.io/otel/traceglobal/probe.go +++ b/internal/pkg/instrumentation/bpf/go.opentelemetry.io/otel/traceglobal/probe.go @@ -111,6 +111,7 @@ func New(logger *slog.Logger) probe.Probe { { Sym: "go.opentelemetry.io/otel/internal/global.(*tracer).newSpan", EntryProbe: "uprobe_newStart", + Optional: true, }, { Sym: "go.opentelemetry.io/otel/internal/global.(*tracer).Start", diff --git a/internal/test/e2e/autosdk/go.mod b/internal/test/e2e/autosdk/go.mod index 509ba9467..5e60cd997 100644 --- a/internal/test/e2e/autosdk/go.mod +++ b/internal/test/e2e/autosdk/go.mod @@ -3,16 +3,9 @@ module go.opentelemetry.io/auto/internal/test/e2e/autosdk go 1.22.0 require ( - go.opentelemetry.io/otel v1.32.1-0.20241210212144-ac386f383cdf + go.opentelemetry.io/auto/sdk v1.1.0 + go.opentelemetry.io/otel v1.32.0 go.opentelemetry.io/otel/trace v1.32.0 ) -require ( - github.com/go-logr/logr v1.4.2 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/stretchr/testify v1.10.0 // indirect - go.opentelemetry.io/auto/sdk v1.1.0 // indirect - go.opentelemetry.io/otel/metric v1.32.0 // indirect -) - replace go.opentelemetry.io/auto/sdk => ../../../../sdk/ diff --git a/internal/test/e2e/autosdk/go.sum b/internal/test/e2e/autosdk/go.sum index f5566ff5c..3a023267a 100644 --- a/internal/test/e2e/autosdk/go.sum +++ b/internal/test/e2e/autosdk/go.sum @@ -1,10 +1,5 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= -github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= @@ -13,10 +8,6 @@ github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOf github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= -go.opentelemetry.io/otel v1.32.1-0.20241210212144-ac386f383cdf h1:UdjRouPHKYAwmq0PNPIR+XH1gtolmJTBhkvufgwQS/g= -go.opentelemetry.io/otel v1.32.1-0.20241210212144-ac386f383cdf/go.mod h1:TV/DhW5+BLw6Z88V8qkXPPjIrjOYagH9a6HmSRrnNP0= -go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= -go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= go.opentelemetry.io/otel/trace v1.32.0/go.mod h1:+i4rkvCraA+tG6AzwloGaCtkx53Fa+L+V8e9a7YvhT8= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= diff --git a/internal/test/e2e/autosdk/main.go b/internal/test/e2e/autosdk/main.go index 10d8b1ba8..31dd02886 100644 --- a/internal/test/e2e/autosdk/main.go +++ b/internal/test/e2e/autosdk/main.go @@ -10,10 +10,11 @@ import ( "os/signal" "time" - "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/attribute" "go.opentelemetry.io/otel/codes" "go.opentelemetry.io/otel/trace" + + "go.opentelemetry.io/auto/sdk" ) const ( @@ -78,7 +79,7 @@ func main() { // give time for auto-instrumentation to start up time.Sleep(5 * time.Second) - provider := otel.GetTracerProvider() + provider := sdk.TracerProvider() tracer := provider.Tracer( pkgName, trace.WithInstrumentationVersion(pkgVer), diff --git a/internal/test/e2e/otelglobal/go.mod b/internal/test/e2e/otelglobal/go.mod index 1e7e3a7f3..76ec53b4f 100644 --- a/internal/test/e2e/otelglobal/go.mod +++ b/internal/test/e2e/otelglobal/go.mod @@ -3,12 +3,13 @@ module go.opentelemetry.io/auto/internal/test/e2e/otelglobal go 1.22.0 require ( - go.opentelemetry.io/otel v1.32.0 + go.opentelemetry.io/otel v1.32.1-0.20241210212144-ac386f383cdf go.opentelemetry.io/otel/trace v1.32.0 ) require ( github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect + go.opentelemetry.io/auto/sdk v1.1.0 // indirect go.opentelemetry.io/otel/metric v1.32.0 // indirect ) diff --git a/internal/test/e2e/otelglobal/go.sum b/internal/test/e2e/otelglobal/go.sum index c1f92a636..264e68521 100644 --- a/internal/test/e2e/otelglobal/go.sum +++ b/internal/test/e2e/otelglobal/go.sum @@ -11,8 +11,12 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +go.opentelemetry.io/auto/sdk v1.1.0 h1:cH53jehLUN6UFLY71z+NDOiNJqDdPRaXzTel0sJySYA= +go.opentelemetry.io/auto/sdk v1.1.0/go.mod h1:3wSPjt5PWp2RhlCcmmOial7AvC4DQqZb7a7wCow3W8A= go.opentelemetry.io/otel v1.32.0 h1:WnBN+Xjcteh0zdk01SVqV55d/m62NJLJdIyb4y/WO5U= go.opentelemetry.io/otel v1.32.0/go.mod h1:00DCVSB0RQcnzlwyTfqtxSm+DRr9hpYrHjNGiBHVQIg= +go.opentelemetry.io/otel v1.32.1-0.20241210212144-ac386f383cdf h1:UdjRouPHKYAwmq0PNPIR+XH1gtolmJTBhkvufgwQS/g= +go.opentelemetry.io/otel v1.32.1-0.20241210212144-ac386f383cdf/go.mod h1:TV/DhW5+BLw6Z88V8qkXPPjIrjOYagH9a6HmSRrnNP0= go.opentelemetry.io/otel/metric v1.32.0 h1:xV2umtmNcThh2/a/aCP+h64Xx5wsj8qqnkYZktzNa0M= go.opentelemetry.io/otel/metric v1.32.0/go.mod h1:jH7CIbbK6SH2V2wE16W05BHCtIDzauciCRLoc/SyMv8= go.opentelemetry.io/otel/trace v1.32.0 h1:WIC9mYrXf8TmY/EXuULKc8hR17vE+Hjv2cssQDe03fM= diff --git a/internal/test/e2e/otelglobal/traces.json b/internal/test/e2e/otelglobal/traces.json index a72fcf9eb..4cc10aa30 100644 --- a/internal/test/e2e/otelglobal/traces.json +++ b/internal/test/e2e/otelglobal/traces.json @@ -72,7 +72,7 @@ } ], "flags": 256, - "kind": 3, + "kind": 1, "name": "child override", "parentSpanId": "xxxxx", "spanId": "xxxxx", @@ -110,7 +110,7 @@ } ], "flags": 256, - "kind": 3, + "kind": 1, "name": "parent", "parentSpanId": "", "spanId": "xxxxx",