[Bug]: Impossible to disable internal-logs
if you import opentelemetry_sdk
#2972
Labels
A-common
Area:common issues that not related to specific pillar
bug
Something isn't working
triage:accepted
Has been triaged and accepted.
What happened?
A service was spamming local logs with the message:
I should be able to suppress this by disabling the
internal-logs
feature, which is on by default. In myCargo.toml
file, I have underworkspace.dependencies
:So I would expect this to not be on. However, running
cargo tree -e features --no-default-features
shows this, which I've trimmed and pruned for readability:Looking in the
Cargo.toml
file foropentelemetry_sdk
, we have:I am not a Cargo expert, but my interpretation of this is that any import of
opentelemetry_sdk
will require the defaults ofopentelemetry
and thusinternal-logs
. (And transitively also foropentelemetry-http
, if it is included.)It seems to me that every dependency of an opentelemetry crate should be
default-features = false
in allCargo.toml
files across the repository, if you want it to be possible to turn off internal logging.OpenTelemetry API Version (i.e version of
opentelemetry
crate)0.27.1, although it's also true of the current main branch (0.29).
OpenTelemetry SDK Version (i.e version of
opentelemetry_sdk
crate)0.27.1, although it's also true of the current main branch (0.29).
What Exporter(s) are you seeing the problem on?
No response
Relevant log output
The text was updated successfully, but these errors were encountered: