DataDog / dd-sdk-ios

Datadog SDK for iOS - Swift and Objective-C.
Apache License 2.0
219 stars 127 forks source link

Fork of OpenTelemetry API since release 2.14.0 #1989

Closed GerardPaligot closed 3 months ago

GerardPaligot commented 3 months ago

Question

Since the release 2.14.0, Datadog iOS SDK include a fork of OpenTelemetry API in their dependency to be able to remove transitive dependencies.

It is nice but the issue is: If a library is using Datadog iOS SDK and an iOS application uses it as a dependency but want to use OpenTelemetry to instrument the codebase, it is impossible and Xcode show this error:

multiple targets named 'OpenTelemetryApi' in: 'opentelemetry-swift', 'opentelemetry-swift-packages'

I just want to know if it is possible to rename the OpenTelemetry dependency with something like DDOpenTelemetryApi to be able to use open telemetry without any issue?

Original post here: https://github.com/DataDog/dd-sdk-ios/issues/1877#issuecomment-2265848754

ganeshnj commented 3 months ago

👋 @GerardPaligot

We took a direct dependency on the otel-swift which didn't go well with all the issues mentioned on https://github.com/DataDog/dd-sdk-ios/issues/1877 and had to change our approach to use a fork of it.

FYI, we have an active issue opened in otel-swift where we asked to split the API and SDK into two separate repos to handle exactly such type of issues. There is spec change related to this issue https://github.com/open-telemetry/opentelemetry-specification/pull/4125, hence I'm hoping at some point otel-swift will fix their package structure to allow vendor specific implementations of otel APIs without problems mentioned in above issue.

We prefer not to do breaking changes and changing the package name is definitely one.

GerardPaligot commented 3 months ago

👋 @ganeshnj

Thanks for these explanations and for the full context!

But from what I can see in the issue you show me, a decision has been already be given by OpenTelemetry contributors and it's not favorable. :(

I can understand your willingness not to break changes but not changing the name it's also your decision not to allow other instrumentations based on OpenTelemetry in the consumer side.

ganeshnj commented 3 months ago

The spec was approved after the otel swift contributors decided to not to make any change in their package structure. To keep the otel-swift compliant, they have to reconsidered it and this is where I see the change must be made.

Sadly, we can't control their prioritization but feel free to raise your concern to otel swift folks.

ganeshnj commented 3 months ago

There is no outstanding action on DD side as of now, hence closing this.