Rewrites the Datadog v5 Span.addLink(context, attributes) overload to the v6
single-argument object shape:
span.addLink({ context: otherSpan.context(), attributes: { foo: 'bar' } })The transform rewrites .addLink(...) calls with exactly two positional
arguments only when the receiver is statically tied to Datadog:
- a direct
tracer.scope().active()ortracer.startSpan(...)chain - a local variable initialized from one of those factories
- a parameter typed as
Spanimported fromdd-trace
Existing object-form calls, unrelated addLink methods, and calls with a
different arity are left unchanged.