Skip to content

Commit 45d5dc0

Browse files
authored
Stop using otelhttp due to memory leak #4922
#4922
2 parents ced3a3f + 53da128 commit 45d5dc0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

pkg/util/httproute/httprouteotel/httprouteotel.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,15 @@ type OTelRouter struct {
1919
router Router
2020
}
2121

22-
func NewOTelRouter(router Router) *OTelRouter {
23-
return &OTelRouter{
24-
router: router,
25-
}
22+
func NewOTelRouter(router Router) Router {
23+
// It is observed that otelhttp >=v0.56 <=v0.57 has memory leak that
24+
// causing memory usage increase over time.
25+
// See https://github.com/open-telemetry/opentelemetry-go-contrib/issues/6315
26+
// So let's stop using it.
27+
// return &OTelRouter{
28+
// router: router,
29+
// }
30+
return router
2631
}
2732

2833
func (r *OTelRouter) wrapHandler(route httproute.Route, h http.Handler) http.Handler {

0 commit comments

Comments
 (0)