Skip to content

Commit

Permalink
Use otel global instead of otel/metric/global (#3518)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrAlias authored Mar 2, 2023
1 parent 3ffe346 commit 487dc02
Show file tree
Hide file tree
Showing 48 changed files with 131 additions and 136 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (

"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/global"
"go.opentelemetry.io/otel/trace"

"github.com/astaxie/beego"
Expand Down Expand Up @@ -59,7 +58,7 @@ func ctxTest() (context.Context, func(*testing.T, context.Context)) {
func TestSpanFromContextDefaultProvider(t *testing.T) {
defer replaceBeego()
provider := metric.NewNoopMeterProvider()
global.SetMeterProvider(provider)
otel.SetMeterProvider(provider)
otel.SetTracerProvider(trace.NewNoopTracerProvider())

ctx, eval := ctxTest()
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/github.com/astaxie/beego/otelbeego/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package otelbeego // import "go.opentelemetry.io/contrib/instrumentation/github.
import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/global"
"go.opentelemetry.io/otel/propagation"
"go.opentelemetry.io/otel/trace"
)
Expand Down Expand Up @@ -99,7 +98,7 @@ func WithSpanNameFormatter(f SpanNameFormatter) Option {
func newConfig(options ...Option) *config {
config := &config{
tracerProvider: otel.GetTracerProvider(),
meterProvider: global.MeterProvider(),
meterProvider: otel.GetMeterProvider(),
propagators: otel.GetTextMapPropagator(),
filters: []Filter{},
formatter: defaultSpanNameFormatter,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ replace (
require (
github.com/astaxie/beego v1.12.3
go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego v0.40.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0
go.opentelemetry.io/otel/sdk v1.14.0
go.opentelemetry.io/otel/trace v1.14.0
Expand All @@ -32,7 +32,7 @@ require (
github.com/prometheus/procfs v0.8.0 // indirect
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/sys v0.5.0 // indirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,12 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46 h1:u8wIXbumphAd8i747F0PYvai81f2jREKe1IT9jbzUNM=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46/go.mod h1:zyzLMogl6w2wQRqaTSqm3fP4vXcc8FLPzxfWY36qDoA=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 h1:sEL90JjOO/4yhquXl5zTAkLLsZ5+MycAgX99SDsxGc8=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0/go.mod h1:oCslUcizYdpKYyS9e8srZEqM6BB8fq41VJBjLAE6z1w=
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs=
go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 h1:43yTLNMMU3l+MSTmP1vhXWZ8e/kqBVNTFsV+rS008HM=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M=
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/github.com/astaxie/beego/otelbeego/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ require (
github.com/astaxie/beego v1.12.3
github.com/stretchr/testify v1.8.2
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel/metric v0.37.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/trace v1.14.0
)

Expand Down
8 changes: 4 additions & 4 deletions instrumentation/github.com/astaxie/beego/otelbeego/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -265,10 +265,10 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs=
go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46 h1:u8wIXbumphAd8i747F0PYvai81f2jREKe1IT9jbzUNM=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46/go.mod h1:zyzLMogl6w2wQRqaTSqm3fP4vXcc8FLPzxfWY36qDoA=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 h1:43yTLNMMU3l+MSTmP1vhXWZ8e/kqBVNTFsV+rS008HM=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M=
go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require (
github.com/stretchr/testify v1.8.2
go.opentelemetry.io/contrib/instrumentation/github.com/astaxie/beego/otelbeego v0.40.0
go.opentelemetry.io/contrib/propagators/b3 v1.15.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/sdk v1.14.0
)

Expand All @@ -29,7 +29,7 @@ require (
github.com/prometheus/procfs v0.8.0 // indirect
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
golang.org/x/crypto v0.1.0 // indirect
golang.org/x/net v0.7.0 // indirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs=
go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46 h1:u8wIXbumphAd8i747F0PYvai81f2jREKe1IT9jbzUNM=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46/go.mod h1:zyzLMogl6w2wQRqaTSqm3fP4vXcc8FLPzxfWY36qDoA=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 h1:43yTLNMMU3l+MSTmP1vhXWZ8e/kqBVNTFsV+rS008HM=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-lambda-go/otellambda v0.40.0
go.opentelemetry.io/contrib/instrumentation/github.com/aws/aws-sdk-go-v2/otelaws v0.40.0
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.40.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0
go.opentelemetry.io/otel/sdk v1.14.0
)
Expand Down Expand Up @@ -46,7 +46,7 @@ require (
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
golang.org/x/sys v0.5.0 // indirect
)
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,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/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46 h1:u8wIXbumphAd8i747F0PYvai81f2jREKe1IT9jbzUNM=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46/go.mod h1:zyzLMogl6w2wQRqaTSqm3fP4vXcc8FLPzxfWY36qDoA=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0 h1:sEL90JjOO/4yhquXl5zTAkLLsZ5+MycAgX99SDsxGc8=
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0/go.mod h1:oCslUcizYdpKYyS9e8srZEqM6BB8fq41VJBjLAE6z1w=
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs=
go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 h1:43yTLNMMU3l+MSTmP1vhXWZ8e/kqBVNTFsV+rS008HM=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M=
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/github.com/gocql/gocql/otelgocql/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import (

"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/global"
"go.opentelemetry.io/otel/trace"
)

Expand Down Expand Up @@ -120,7 +119,7 @@ func WithConnectInstrumentation(enabled bool) Option {
func newConfig(options ...Option) *config {
cfg := &config{
tracerProvider: otel.GetTracerProvider(),
meterProvider: global.MeterProvider(),
meterProvider: otel.GetMeterProvider(),
instrumentQuery: true,
instrumentBatch: true,
instrumentConnect: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ import (
"go.opentelemetry.io/otel"
otelprom "go.opentelemetry.io/otel/exporters/prometheus"
"go.opentelemetry.io/otel/exporters/zipkin"
"go.opentelemetry.io/otel/metric/global"
"go.opentelemetry.io/otel/sdk/metric"
"go.opentelemetry.io/otel/sdk/metric/aggregation"
"go.opentelemetry.io/otel/sdk/trace"
Expand Down Expand Up @@ -159,7 +158,7 @@ func initMetrics() error {
metric.WithReader(exporter),
metric.WithView(vs...),
)
global.SetMeterProvider(provider)
otel.SetMeterProvider(provider)

http.Handle("/", promhttp.Handler())
log.Print("Serving metrics at :2222/")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ require (
github.com/gocql/gocql v1.3.1
github.com/prometheus/client_golang v1.14.0
go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql v0.40.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/exporters/prometheus v0.37.0
go.opentelemetry.io/otel/exporters/zipkin v1.14.0
go.opentelemetry.io/otel/metric v0.37.0
go.opentelemetry.io/otel/sdk v1.14.0
go.opentelemetry.io/otel/sdk/metric v0.37.0
)
Expand All @@ -29,6 +28,7 @@ require (
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
golang.org/x/sys v0.5.0 // indirect
google.golang.org/protobuf v1.28.1 // indirect
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,14 @@ go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8=
go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46 h1:u8wIXbumphAd8i747F0PYvai81f2jREKe1IT9jbzUNM=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46/go.mod h1:zyzLMogl6w2wQRqaTSqm3fP4vXcc8FLPzxfWY36qDoA=
go.opentelemetry.io/otel/exporters/prometheus v0.37.0 h1:NQc0epfL0xItsmGgSXgfbH2C1fq2VLXkZoDFsfRNHpc=
go.opentelemetry.io/otel/exporters/prometheus v0.37.0/go.mod h1:hB8qWjsStK36t50/R0V2ULFb4u95X/Q6zupXLgvjTh8=
go.opentelemetry.io/otel/exporters/zipkin v1.14.0 h1:reEVE1upBF9tcujgvSqLJS0SrI7JQPaTKP4s4rymnSs=
go.opentelemetry.io/otel/exporters/zipkin v1.14.0/go.mod h1:RcjvOAcvhzcufQP8aHmzRw1gE9g/VEZufDdo2w+s4sk=
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs=
go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 h1:43yTLNMMU3l+MSTmP1vhXWZ8e/kqBVNTFsV+rS008HM=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
go.opentelemetry.io/otel/sdk/metric v0.37.0 h1:haYBBtZZxiI3ROwSmkZnI+d0+AVzBWeviuYQDeBWosU=
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/github.com/gocql/gocql/otelgocql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.18
require (
github.com/gocql/gocql v1.3.1
github.com/stretchr/testify v1.8.2
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel/metric v0.37.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/trace v1.14.0
)

Expand Down
8 changes: 4 additions & 4 deletions instrumentation/github.com/gocql/gocql/otelgocql/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs=
go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46 h1:u8wIXbumphAd8i747F0PYvai81f2jREKe1IT9jbzUNM=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46/go.mod h1:zyzLMogl6w2wQRqaTSqm3fP4vXcc8FLPzxfWY36qDoA=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 h1:43yTLNMMU3l+MSTmP1vhXWZ8e/kqBVNTFsV+rS008HM=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M=
go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/github.com/gocql/gocql/otelgocql/test/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/stretchr/testify v1.8.2
go.opentelemetry.io/contrib v1.15.0
go.opentelemetry.io/contrib/instrumentation/github.com/gocql/gocql/otelgocql v0.40.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/sdk v1.14.0
go.opentelemetry.io/otel/sdk/metric v0.37.0
go.opentelemetry.io/otel/trace v1.14.0
Expand All @@ -20,7 +20,7 @@ require (
github.com/golang/snappy v0.0.3 // indirect
github.com/hailocab/go-hostpool v0.0.0-20160125115350-e80d13ce29ed // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 // indirect
golang.org/x/sys v0.5.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions instrumentation/github.com/gocql/gocql/otelgocql/test/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM=
go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU=
go.opentelemetry.io/otel/metric v0.37.0 h1:pHDQuLQOZwYD+Km0eb657A25NaRzy0a+eLyKfDXedEs=
go.opentelemetry.io/otel/metric v0.37.0/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46 h1:u8wIXbumphAd8i747F0PYvai81f2jREKe1IT9jbzUNM=
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46/go.mod h1:zyzLMogl6w2wQRqaTSqm3fP4vXcc8FLPzxfWY36qDoA=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 h1:43yTLNMMU3l+MSTmP1vhXWZ8e/kqBVNTFsV+rS008HM=
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46/go.mod h1:DmdaHfGt54iV6UKxsV9slj2bBRJcKC1B1uvDLIioc1s=
go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY=
go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM=
go.opentelemetry.io/otel/sdk/metric v0.37.0 h1:haYBBtZZxiI3ROwSmkZnI+d0+AVzBWeviuYQDeBWosU=
Expand Down
3 changes: 1 addition & 2 deletions instrumentation/google.golang.org/grpc/otelgrpc/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/attribute"
"go.opentelemetry.io/otel/metric"
"go.opentelemetry.io/otel/metric/global"
"go.opentelemetry.io/otel/metric/instrument"
"go.opentelemetry.io/otel/propagation"
semconv "go.opentelemetry.io/otel/semconv/v1.17.0"
Expand Down Expand Up @@ -58,7 +57,7 @@ func newConfig(opts []Option) *config {
c := &config{
Propagators: otel.GetTextMapPropagator(),
TracerProvider: otel.GetTracerProvider(),
MeterProvider: global.MeterProvider(),
MeterProvider: otel.GetMeterProvider(),
}
for _, o := range opts {
o.apply(c)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ replace go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelg
require (
github.com/golang/protobuf v1.5.2
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.40.0
go.opentelemetry.io/otel v1.14.0
go.opentelemetry.io/otel v1.14.1-0.20230301191603-813936187e46
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.14.0
go.opentelemetry.io/otel/sdk v1.14.0
go.opentelemetry.io/otel/trace v1.14.0
Expand All @@ -18,7 +18,7 @@ require (
require (
github.com/go-logr/logr v1.2.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
go.opentelemetry.io/otel/metric v0.37.0 // indirect
go.opentelemetry.io/otel/metric v0.37.1-0.20230301191603-813936187e46 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/genproto v0.0.0-20230110181048-76db0878b65f // indirect
Expand Down
Loading

0 comments on commit 487dc02

Please sign in to comment.