-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Latest opentelemetry version is causing dd-trace to break. #3624
Comments
Hi |
Same had to fix opentelemetry in
|
I submitted the same issue to open-telemetry. Looks like they are working on reverting the breaking change. |
thanks @ksstoneware i add the thread issue here for linking purpose |
It looks like this was caused because dd-trace does not specify a maximum opentelemetry API version https://github.com/DataDog/dd-trace-js/blob/master/package.json#L76. If you look in the otel SDK you'll see we actually have a specific max version there https://github.com/open-telemetry/opentelemetry-js/blob/main/packages/opentelemetry-sdk-trace-base/package.json#L93. I apologize if we weren't clear about that, but the otel maintainers view "breakingness" from the user perspective not from the implementers perspective. I will make sure we discuss this and in the future we will take this into consideration. I looked at all previous minor version updates and we've never had this in the past. The only function signature update we've done added an optional parameter to the end of the list which is not breaking in the same way. Regarding reverting, the change was breaking for implementers like dd-trace which do not specify a max api version, but reverting would be breaking for users because it removes the new argument. NPM does not allow us to unpublish 1.5.0 so we need to consider the fact it is already released and downloaded more than 100k times. Please join the discussion at open-telemetry/opentelemetry-js#4136 if you have an opinion here as we want to make sure we don't cause even bigger problems fixing the issue. |
@opentelemetry/api 1.6.0 has been released, which reverts the breaking interface changes. New installations of dd-trace should be working again now. |
@BrettHoutz Thanks! I confirmed it's working now. |
clean install of dd-trace works now |
Looks like this resolved itself. I'll close for now but feel free to reopen if I misunderstood. FYI @Qard |
dd-trace has these dependencies:
"@opentelemetry/api": "^1.0.0", "@opentelemetry/core": "^1.14.0",
opentelemtry updated their versions (and apparently contain breaking changes) on 9-11-2023. They did a minor version change. Because dd-trace pulls in any minor/patch change, the breaking changes are being pulled in. We are blocked with the following errors:
Error: node_modules/dd-trace/index.d.ts(1666,20): error TS[24](https://github.com/---/actions/runs/6146278516/job/16676040443#step:16:25)30: Interface 'import("/home/runner/work/---/node_modules/dd-trace/index").opentelemetry.TracerProvider' incorrectly extends interface 'import("/home/runner/work/---/node_modules/@opentelemetry/api/build/src/trace/tracer_provider").TracerProvider'. The types of 'getTracer(...).startSpan(...).recordException' are incompatible between these types. Type '(exception: Exception, time?: TimeInput) => void' is not assignable to type '{ (exception: Exception, time?: TimeInput): void; (exception: Exception, attributes?: Attributes, time?: TimeInput): void; }'. Types of parameters 'time' and 'attributes' are incompatible. Type 'Attributes' is not assignable to type 'TimeInput'. Type 'Attributes' is missing the following properties from type 'Date': toDateString, toTimeString, toLocaleDateString, toLocaleTimeString, and 37 more. Error: node_modules/dd-trace/index.d.ts(1697,20): error TS2430: Interface 'import("/home/runner/work/---/node_modules/dd-trace/index").opentelemetry.Tracer' incorrectly extends interface 'import("/home/runner/work/---/node_modules/@opentelemetry/api/build/src/trace/tracer").Tracer'. Error: node_modules/dd-trace/index.d.ts(1772,20): error TS24[30](https://github.com/---/actions/runs/6146278516/job/16676040443#step:16:31): Interface 'import("/home/runner/work/---/node_modules/dd-trace/index").opentelemetry.Span' incorrectly extends interface 'import("/home/runner/work/---/node_modules/@opentelemetry/api/build/src/trace/span").Span'. Types of property 'recordException' are incompatible. Type '(exception: Exception, time?: TimeInput) => void' is not assignable to type '{ (exception: Exception, time?: TimeInput): void; (exception: Exception, attributes?: Attributes, time?: TimeInput): void; }'. Error: Process completed with exit code 2.
The text was updated successfully, but these errors were encountered: