open-telemetry / opentelemetry-swift

OpenTelemetry API for Swift
https://opentelemetry.io/docs/instrumentation/swift/
Apache License 2.0
209 stars 129 forks source link

Large number of unnessary [transitive] dependencies #595

Closed rob0rt closed 1 week ago

rob0rt commented 3 weeks ago

I'm using the opentelemetry-swift library for tracing/ metrics with a simple OTLP HTTP collector in an iPad/ iOS target, but there are many dependencies included that are not useful or relevant to my use-case that are still pulled in. Without too much investigation to determine if they're actually unused, some of these dependencies that appear to be unused for my use-case include:

It would be ideal/ preferred for the packages to be separated in such a way that only the specific dependencies for each library are brought in.

bryce-b commented 3 weeks ago

Hi @rob0rt, This is actually an issue with Swift package manager; which doesn't distinguish between which libraries in the package you're depending on. However, these superfluous packages are not linked in the final product, or included in the application package.