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
[v3.0.0-alpha.1] Disable exporting traces by default #4270
Comments
I experience same issue with new image specifically this env variable: |
I appreciate you sharing the OpenTelemetry docs @Thumbiceq! I saw a mention on one of the PRs about suggesting that we not use the config yaml since apparently it's standard for OpenTelemetry implementations on apps to use the env vars but hadn't looked into what it would take to explicitly disable it. |
@mbentley , can you please link this communication? I would also expect the tracing to be off by default and explicitly enabled on demand via config option. By config option I mean the well-known config of the project, not and env var such as The fact that logs are spammed with
makes me think that either the default tracing thingy is wrongly configured by default or it requires additional things to make it work properly (maybe running something that serves on that port). @gotgelf @corhere @milosgajdos could you help getting this issue fixed? |
I guess, that's it: #4184 (comment). |
Yes, that's it. |
From https://opentelemetry.io/docs/specs/otel/configuration/sdk-environment-variables/
We are following the OpenTelemetry Environment Variable Specification to the letter. Per the spec, the distribution daemon's OpenTelemetry integration is configured using the standardized environment variables, and will by default attempt to export telemetry traces to an OTLP collector at localhost:4318. If no OTLP collector is listening, the trace data is discarded. Aside from the unexpected log messages, how are these defaults problematic? Would you be satisfied if the new behaviour was documented?
|
Just as an example, I don't see similar behavior when using BuildKit but I am not sure if it is a scenario where it is just not being logged. I would just expect that the default configuration would default to not being configured, expecting that something like tracing should be something where it explicitly needs to be enabled. While maybe not likely, I suppose a scenario could occur where there is a listening port host/port of |
Don't use BuildKit as an example of any OTEL best practices. It is abusing the OpenTelemetry SDK in awful ways which inflicts tremendous pain on the Moby project. |
Someone familiar with the OpenTelemetry ecosystem might expect exporting spans to localhost:4318 using OTLP to be the default. That being said, I concede that while defaulting to tracing enabled is a reasonable default for an SDK which may be incorporated into bespoke software that is deployed only by its author, it might not be the right default for software projects such as distribution that are deployed by third parties. Neither nginx nor Envoy enable tracing by default, for example. |
Thank you for bringing up this important consideration regarding the default configuration for tracing. It's clear that having sensible defaults that align with the expectations of both developers and third-party deployers is crucial for the usability and adoption of our software. Taking this into account, i see next potential paths to address this concern:
Wdyt? |
Environment variables are for users to configure, and are literally global variables. We shouldn't tamper with them ourselves unless we have no other choice. I don't think we should modify the default value of I think that the right way to disable exporting traces by default is to disable exporting traces by default. Frustratingly, the autoexport package almost makes it possible to do that without tampering with environment variables by providing @gotgelf would you have any interest in opening a feature request or PR on opentelemetry-go-contrib to afford changing the |
Yes, definitely. |
Description
I thought I would update my registries to the
3.0.0-alpha.1
for testing and I am seeing that it looks like the registry is trying to connect to an endpoint for tracing but I have not configured anything.Reproduce
Expected behavior
I would expect that tracing is not enabled by default and is only enabled if configuration is passed.
registry version
3.0.0-alpha.1
Additional Info
Not sure if this comes from #4188 but I don't see docs that were written for that PR on the configuration.
The text was updated successfully, but these errors were encountered: