Skip to content

Commit bf5ef0d

Browse files
migrate otelgrpc from deprecated interceptors to stats handler API (#998)
- Replace otelgrpc.StreamServerInterceptor() and otelgrpc.UnaryServerInterceptor() with otelgrpc.NewServerHandler() - Upgrade go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc from v0.58.0 to v0.63.0 - Stats handler approach is the recommended way forward and more efficient than interceptor-based approach Amp-Thread-ID: https://ampcode.com/threads/T-2b4e5684-212d-42e5-b790-82569bc9f447 Co-authored-by: Amp <amp@ampcode.com>
1 parent 2e375df commit bf5ef0d

3 files changed

Lines changed: 62 additions & 62 deletions

File tree

go.mod

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,29 @@ require (
3131
github.com/sourcegraph/go-ctags v0.0.0-20250729094530-349a251d78d8
3232
github.com/sourcegraph/log v0.0.0-20241024013702-574f7079c888
3333
github.com/sourcegraph/mountinfo v0.0.0-20251117172727-e9f6a87f579c
34-
github.com/stretchr/testify v1.10.0
34+
github.com/stretchr/testify v1.11.1
3535
github.com/uber/jaeger-client-go v2.30.0+incompatible
3636
github.com/uber/jaeger-lib v2.4.1+incompatible
3737
github.com/xeipuuv/gojsonschema v1.2.0
3838
gitlab.com/gitlab-org/api/client-go v0.129.0
39-
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0
39+
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.63.0
4040
go.opentelemetry.io/contrib/propagators/jaeger v1.33.0
4141
go.opentelemetry.io/contrib/propagators/ot v1.33.0
42-
go.opentelemetry.io/otel v1.33.0
42+
go.opentelemetry.io/otel v1.38.0
4343
go.opentelemetry.io/otel/bridge/opentracing v1.33.0
4444
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.33.0
4545
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.33.0
4646
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.33.0
47-
go.opentelemetry.io/otel/sdk v1.33.0
48-
go.opentelemetry.io/otel/trace v1.33.0
47+
go.opentelemetry.io/otel/sdk v1.38.0
48+
go.opentelemetry.io/otel/trace v1.38.0
4949
go.uber.org/atomic v1.11.0
5050
go.uber.org/automaxprocs v1.6.0
51-
golang.org/x/net v0.34.0
51+
golang.org/x/net v0.43.0
5252
golang.org/x/oauth2 v0.30.0
53-
golang.org/x/sync v0.11.0
54-
golang.org/x/sys v0.30.0
55-
google.golang.org/grpc v1.69.4
56-
google.golang.org/protobuf v1.36.3
53+
golang.org/x/sync v0.16.0
54+
golang.org/x/sys v0.35.0
55+
google.golang.org/grpc v1.75.0
56+
google.golang.org/protobuf v1.36.8
5757
pgregory.net/rapid v1.2.0
5858
)
5959

@@ -70,7 +70,7 @@ require (
7070
cloud.google.com/go v0.118.0 // indirect
7171
cloud.google.com/go/auth v0.14.0 // indirect
7272
cloud.google.com/go/auth/oauth2adapt v0.2.7 // indirect
73-
cloud.google.com/go/compute/metadata v0.6.0 // indirect
73+
cloud.google.com/go/compute/metadata v0.7.0 // indirect
7474
code.gitea.io/sdk/gitea v0.20.0
7575
dario.cat/mergo v1.0.1 // indirect
7676
github.com/HdrHistogram/hdrhistogram-go v1.1.2 // indirect
@@ -92,7 +92,7 @@ require (
9292
github.com/go-enry/go-oniguruma v1.2.1 // indirect
9393
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
9494
github.com/go-git/go-billy/v5 v5.6.2
95-
github.com/go-logr/logr v1.4.2 // indirect
95+
github.com/go-logr/logr v1.4.3 // indirect
9696
github.com/go-logr/stdr v1.2.2 // indirect
9797
github.com/go-ole/go-ole v1.3.0 // indirect
9898
github.com/gogo/protobuf v1.3.2 // indirect
@@ -129,18 +129,17 @@ require (
129129
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
130130
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
131131
github.com/yusufpapurcu/wmi v1.2.4 // indirect
132-
go.opentelemetry.io/otel/metric v1.33.0 // indirect
132+
go.opentelemetry.io/otel/metric v1.38.0 // indirect
133133
go.opentelemetry.io/proto/otlp v1.5.0 // indirect
134134
go.uber.org/multierr v1.11.0
135135
go.uber.org/zap v1.27.0 // indirect
136-
golang.org/x/crypto v0.35.0 // indirect
137-
golang.org/x/text v0.22.0 // indirect
136+
golang.org/x/crypto v0.41.0 // indirect
137+
golang.org/x/text v0.28.0 // indirect
138138
golang.org/x/time v0.11.0 // indirect
139-
golang.org/x/tools v0.29.0 // indirect
140139
google.golang.org/api v0.217.0 // indirect
141140
google.golang.org/genproto v0.0.0-20250115164207-1a7da9e5054f // indirect
142-
google.golang.org/genproto/googleapis/api v0.0.0-20250115164207-1a7da9e5054f // indirect
143-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f // indirect
141+
google.golang.org/genproto/googleapis/api v0.0.0-20250707201910-8d1bb00bc6a7 // indirect
142+
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
144143
gopkg.in/warnings.v0 v0.1.2 // indirect
145144
gopkg.in/yaml.v3 v3.0.1 // indirect
146145
)

0 commit comments

Comments
 (0)