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
I'm using dd-trace-go in both development and production environments.
While I'm using a "true" tracer in production environment,
I'm using a mocktracer in development environment:
ifos.Getenv("ENV") =="production" {
tracer.Start()
} else {
mocktracer.Start()
}
// share the same code in both production and development environmentsspan:=tracer.StartSpan("some-resource")
// do somethingspan.Finish() // actual tracing happens only in production environment
Recently I have noticed that the memory usage in development environment was increasing.
This is because mocktracers keep all finished spans in memory.
Context
I'm using dd-trace-go in both development and production environments.
While I'm using a "true" tracer in production environment,
I'm using a mocktracer in development environment:
Recently I have noticed that the memory usage in development environment was increasing.
This is because mocktracers keep all finished spans in memory.
dd-trace-go/ddtrace/mocktracer/mockspan.go
Line 203 in 1efe3a4
Feature request
I would like "noop" tracers.
There already exists NoopTracer in the internal package, so how about exposing it?
dd-trace-go/ddtrace/internal/globaltracer.go
Line 44 in 1efe3a4
Or, it may be better to add an option to mocktracers to disable keeping finished spans.
The text was updated successfully, but these errors were encountered: