-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Describe the bug
Summary
smithy-swift's dependency on opentelemetry-swift causes an irresolvable SPM conflict with any third-party SDK that has migrated to opentelemetry-swift-core, including the Datadog iOS SDK (dd-sdk-ios v3.5.0+).
Error Message
multiple packages ('opentelemetry-swift', 'opentelemetry-swift-packages') declare targets with a conflicting name: 'OpenTelemetryApi'; target names need to be unique across the package graph
Root Cause
The OpenTelemetry Swift community has officially split the package into:
opentelemetry-swift-core: API onlyopentelemetry-swift: API + implementation
smithy-swift still depends on the older opentelemetry-swift (full package), while other vendors (e.g. Datadog as of dd-sdk-ios v3.5.0) have already migrated to opentelemetry-swift-core.
Since both packages export the same target names (e.g. OpenTelemetryApi), SPM cannot resolve the dependency graph when both are present.
Dependency Chain
amplify-swift 2.53.3
└── aws-sdk-swift 1.6.7
└── smithy-swift 0.175.0
└── opentelemetry-swift (full package) ← conflict here
dd-sdk-ios 3.5.0+
└── opentelemetry-swift-core ← conflict here
Impact
This is not a Datadog-specific issue. Any third-party SDK that adopts opentelemetry-swift-core will be incompatible with amplify-swift via SPM until smithy-swift migrates. This effectively blocks multi-vendor SDK integration for all iOS projects using AWS Amplify.
Environment
| Item | Version |
|---|---|
| amplify-swift | 2.53.3 |
| aws-sdk-swift | 1.6.7 |
| smithy-swift | 0.175.0 |
| Xcode | 26.2 |
| Swift | 6.2.3 |
| Dependency Manager | SPM |
Steps to Reproduce
- Create an iOS project with
amplify-swift(2.53.3) via SPM - Add any SDK that depends on
opentelemetry-swift-core(e.g.dd-sdk-ios3.5.0+) - SPM package resolution fails with the above error
Expected Behavior
smithy-swift migrates its dependency from opentelemetry-swift to opentelemetry-swift-core, aligning with the official OpenTelemetry Swift package split. This would allow SPM to resolve both packages without conflict.
Questions
- Is there a plan to migrate smithy-swift to
opentelemetry-swift-core? - If so, what is the expected timeline?
- Are there any recommended workarounds in the meantime?
References
- OpenTelemetry Swift core/SDK split: https://github.com/open-telemetry/opentelemetry-swift
- Datadog migration PR: RUM-12512 Upgrade OTel Api to
2.3.0& switch toopentelemetry-swift-coreDataDog/dd-sdk-ios#2614 - Datadog related issue: Conflicting package/module names with upstream OpenTelemetry. DataDog/dd-sdk-ios#2426
Expected Behavior
smithy-swift should migrate its dependency from opentelemetry-swift to opentelemetry-swift-core,
aligning with the official OpenTelemetry Swift package split.
This would allow SPM to correctly resolve the dependency graph when both amplify-swift
and SDKs depending on opentelemetry-swift-core are present in the same project,
without any target name conflicts.
Current Behavior
When adding any SDK that depends on opentelemetry-swift-core (e.g. dd-sdk-ios v3.5.0+)
alongside amplify-swift, SPM package resolution fails immediately with the following error:
"multiple packages ('opentelemetry-swift', 'opentelemetry-swift-packages') declare targets
with a conflicting name: 'OpenTelemetryApi'; target names need to be unique across the package graph"
There is currently no workaround available via SPM. The two SDKs cannot be used together.
Reproduction Steps
-
Create a new iOS project in Xcode 26.2
-
Add amplify-swift (2.53.3) via SPM:
https://github.com/aws-amplify/amplify-swift -
Add dd-sdk-ios (3.5.0+) via SPM:
https://github.com/Datadog/dd-sdk-ios.git -
Select any Datadog product (e.g. DatadogCore, DatadogRUM)
-
Attempt to resolve packages
Result: SPM resolution fails immediately with:
"multiple packages ('opentelemetry-swift', 'opentelemetry-swift-packages') declare targets
with a conflicting name: 'OpenTelemetryApi'; target names need to be unique across the package graph"
Possible Solution
No response
Additional Information/Context
No response
AWS SWIFT SDK version used
2.533.3
Compiler and Version used
Swift 6.2.3 (swiftlang-6.2.3.3.21 clang-1700.6.3.2) | | Swift Driver Version | 1.127.14.1 | | Xcode Version | 26.2 (Xcode Beta) |
Operating System and version
Operating System | macOS 15.6 (24G84) | | Target Architecture | arm64-apple-macosx15.0 |