dd-trace-js icon indicating copy to clipboard operation
dd-trace-js copied to clipboard

OTel Author Note - API minor versions MAY contain additions to existing interfaces

Open dyladan opened this issue 10 months ago • 1 comments

Refs #3624

In version 1.5.0 of @opentelemetry/api a change was released which extended the recordException API in a way that was backwards-compatible for end users but not for SDK implementations. Because dd-trace depends on a permissive version range (^1.0.0) of the API, users of dd-trace automatically received the latest API which failed to compile with the dd-trace SDK.

The OpenTelemetry specification is being updated with more clarity around this situation https://github.com/open-telemetry/opentelemetry-specification/pull/3695

Short version: an SDK implementation should expect that minor versions of the API may include new methods. Minor version stability is guaranteed for users but not implementers. The OpenTelemetry authors recommend the following: dd-trace should define not only a minimum API level but also a maximum. This will ensure that users do not update to versions of the API which are not yet supported by the dd-trace. See an example of this in the upstream SDK here: https://github.com/open-telemetry/opentelemetry-js/blob/24997089daf6d422494d112cf5531fe115eaa201/packages/opentelemetry-sdk-trace-base/package.json#L94

dyladan avatar Sep 26 '23 18:09 dyladan