Skip to content

Commit

Permalink
Use otelglobal e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias committed Dec 12, 2024
1 parent ef8dda4 commit dab479a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
8 changes: 1 addition & 7 deletions internal/test/e2e/autosdk/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ module go.opentelemetry.io/auto/internal/test/e2e/autosdk
go 1.22.0

require (
go.opentelemetry.io/auto/sdk v1.1.0
go.opentelemetry.io/otel v1.33.0
go.opentelemetry.io/otel/trace v1.33.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.33.0 // indirect
)

replace go.opentelemetry.io/auto/sdk => ../../../../sdk/
7 changes: 0 additions & 7 deletions internal/test/e2e/autosdk/go.sum
Original file line number Diff line number Diff line change
@@ -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=
Expand All @@ -13,8 +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.33.0 h1:/FerN9bax5LoK51X/sI0SVYrjSE0/yUL7DpxW4K3FWw=
go.opentelemetry.io/otel v1.33.0/go.mod h1:SUUkR6csvUQl+yjReHu5uM3EtVV7MBm5FHKRlNx4I8I=
go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5WtEnklQ=
go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M=
go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s=
go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Expand Down
5 changes: 3 additions & 2 deletions internal/test/e2e/autosdk/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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),
Expand Down
4 changes: 2 additions & 2 deletions internal/test/e2e/otelglobal/traces.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
}
],
"flags": 256,
"kind": 3,
"kind": 1,
"name": "child override",
"parentSpanId": "xxxxx",
"spanId": "xxxxx",
Expand Down Expand Up @@ -110,7 +110,7 @@
}
],
"flags": 256,
"kind": 3,
"kind": 1,
"name": "parent",
"parentSpanId": "",
"spanId": "xxxxx",
Expand Down

0 comments on commit dab479a

Please sign in to comment.