Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide mechanism to disable internal tracing #10481

Closed
sirianni opened this issue Jun 28, 2024 · 2 comments
Closed

Provide mechanism to disable internal tracing #10481

sirianni opened this issue Jun 28, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@sirianni
Copy link

The collector is consuming excessive memory from internal spans

For example, the httpcheckreceiver's otelhttp instrumentation is holding on to a decent chunk of memory for its span attributes
image

There doesn't appear to be any way to opt-out of this behavior

otelOpts := []otelhttp.Option{
otelhttp.WithTracerProvider(settings.TracerProvider),
otelhttp.WithPropagators(otel.GetTextMapPropagator()),
}
if settings.MetricsLevel >= configtelemetry.LevelDetailed {
otelOpts = append(otelOpts, otelhttp.WithMeterProvider(settings.MeterProvider))
}
// wrapping http transport with otelhttp transport to enable otel instrumentation
if settings.TracerProvider != nil && settings.MeterProvider != nil {
clientTransport = otelhttp.NewTransport(clientTransport, otelOpts...)
}

The collector's telemetry config does not expose options for configuring or disabling the TracerProvider.

There is a long-standing open issue #6629 to allow for exporting these internal spans. Perhaps providing a way to disable recording of these internal spans would be a simpler start.

@sirianni sirianni added the bug Something isn't working label Jun 28, 2024
@codeboten
Copy link
Contributor

It's now possible to set the telemetry level to none for traces to use a no-op tracer provider. See #10858 for more details

@mx-psi
Copy link
Member

mx-psi commented Feb 10, 2025

Closing as completed per the last comment

@mx-psi mx-psi closed this as completed Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants