You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
Please answer these questions before submitting a bug report.
What version of OpenCensus are you using?
v0.22.5
What version of Go are you using?
1.13.15
What did you do?
import (
"go.opencensus.io/trace"
_ "go.opencensus.io/zpages" // internal.LocalSpanStoreEnabled = true
)
type SpanTest struct {
Ctx context.Context
Count int
}
func (s *SpanTest) Inc() {
span := trace.StartSpan(s.Ctx, "test")
defer span.End()
}
func main() {
test := &SpanTest{
Ctx: context.Background(),
}
go func() {
for {
test.Inc()
}
}()
for {}
}
it make memory usage gradually increasing.
and i have found the problem:
opencensus-go/trace/trace.go line:269 ss.add(NewSpan(s))
opencensus-go/trace/trace.go line:294 s.spanStore.finished(NewSpan(s), sd)
when add a new span to the spanStore active set. it wrote a wrong way to release the active set, it shouldn't use NewSpan() to wrap the *span and pass to the finished function
The text was updated successfully, but these errors were encountered:
Please answer these questions before submitting a bug report.
What version of OpenCensus are you using?
v0.22.5
What version of Go are you using?
1.13.15
What did you do?
it make memory usage gradually increasing.
and i have found the problem:
opencensus-go/trace/trace.go line:269 ss.add(NewSpan(s))
opencensus-go/trace/trace.go line:294 s.spanStore.finished(NewSpan(s), sd)
when add a new span to the spanStore active set. it wrote a wrong way to release the active set, it shouldn't use NewSpan() to wrap the *span and pass to the finished function
The text was updated successfully, but these errors were encountered: