Skip to content

Commit 1f32092

Browse files
author
alijozi
committed
Update OpenTelemetry to 0.17.0 and fix "undefined: otel.Meter"
1 parent 8d9ebc8 commit 1f32092

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ require (
77
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f
88
github.com/onsi/ginkgo v1.15.0
99
github.com/onsi/gomega v1.10.5
10-
go.opentelemetry.io/otel v0.16.0
10+
go.opentelemetry.io/otel v0.17.0
1111
)

internal/instruments.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package internal
33
import (
44
"context"
55

6-
"go.opentelemetry.io/otel"
76
"go.opentelemetry.io/otel/metric"
7+
"go.opentelemetry.io/otel/metric/global"
88
)
99

1010
var (
@@ -21,7 +21,7 @@ func init() {
2121
}
2222
}()
2323

24-
meter := metric.Must(otel.Meter("github.com/go-redis/redis"))
24+
meter := metric.Must(global.Meter("github.com/go-redis/redis"))
2525

2626
WritesCounter = meter.NewInt64Counter("redis.writes",
2727
metric.WithDescription("the number of writes initiated"),

0 commit comments

Comments
 (0)