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
The internal-logs feature in the opentelemetry-otlp crate currently enables "opentelemetry-http/internal-logs". However, since opentelemetry-http itself depends on "opentelemetry/internal-logs", this indirection introduces an unnecessary dependency on opentelemetry-http when using grpc-tonic without default or http features.
Eliminates unnecessary dependencies
Removes forced opentelemetry-http dependency for grpc-tonic users
Aligns with dependency hierarchy
Since opentelemetry-http already depends on opentelemetry/internal-logs, this change respects the existing dependency chain
Improves compile times
Particularly for projects using grpc-tonic with default-features = false
Maintains compatibility
No breaking changes - all existing functionality preserved
opentelemetry-otlp = { version = "*", default-features = false, features = ["grpc-tonic", "internal-logs"] }
Should not pull opentelemetry-http
Additional Context
This micro-optimization supports the project's goal of maintaining a lean dependency tree, especially important for users carefully managing their dependency footprint in performance-sensitive applications.
Would you like me to submit a PR for this change?
I can prepare a minimal PR updating the feature flag if the maintainers agree this is a welcome optimization.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Summary
The
internal-logsfeature in theopentelemetry-otlpcrate currently enables"opentelemetry-http/internal-logs". However, sinceopentelemetry-httpitself depends on"opentelemetry/internal-logs", this indirection introduces an unnecessary dependency onopentelemetry-httpwhen usinggrpc-tonicwithoutdefaultorhttpfeatures.Current Behavior
In
opentelemetry-otlp/Cargo.toml:This forces users to depend on
opentelemetry-httpeven when:grpc-tonictransporthttpordefaultfeaturesinternal-logsfunctionalityProposed Change
Directly depend on
"opentelemetry/internal-logs"instead:Benefits
Removes forced
opentelemetry-httpdependency forgrpc-tonicusersSince
opentelemetry-httpalready depends onopentelemetry/internal-logs, this change respects the existing dependency chainParticularly for projects using
grpc-tonicwithdefault-features = falseNo breaking changes - all existing functionality preserved
Verification Steps
opentelemetry-http/Cargo.tomlconfirms:opentelemetry-httpAdditional Context
This micro-optimization supports the project's goal of maintaining a lean dependency tree, especially important for users carefully managing their dependency footprint in performance-sensitive applications.
Would you like me to submit a PR for this change?
I can prepare a minimal PR updating the feature flag if the maintainers agree this is a welcome optimization.
cc @lalitb @bantonsson
All reactions