diff --git a/CHANGELOG4.asciidoc b/CHANGELOG4.asciidoc index f3caf93163..e69f6a69bb 100644 --- a/CHANGELOG4.asciidoc +++ b/CHANGELOG4.asciidoc @@ -10,6 +10,10 @@ Users of earlier Node.js versions can use elastic-apm-node v3.x, which supports back to Node.js v8.6. +* Ignore a `timer` option passed to `startTransaction()` and `startSpan()` APIs. + This option was never documented. It would be surprising if any user is + impacted by this. + * Remove long deprecated support for the `ELASTIC_APM_`-prefixed environment variables for the <>. For example, one must use `KUBERNETES_POD_NAME` and not diff --git a/lib/instrumentation/span.js b/lib/instrumentation/span.js index 6bfd485797..a10a77f247 100644 --- a/lib/instrumentation/span.js +++ b/lib/instrumentation/span.js @@ -34,11 +34,8 @@ function Span(transaction, ...args) { const [name, ...tsaArgs] = args; // "tsa" === Type, Subtype, Action if (opts.timer) { - process.emitWarning( - 'specifying the `timer` option to `new Span()` was never a public API and will be removed', - 'DeprecationWarning', - 'ELASTIC_APM_SPAN_TIMER_OPTION', - ); + // Before 4.x this option could be passed in. It was never publicly documented. + delete opts.timer; } if (!opts.childOf) { const defaultChildOf = diff --git a/lib/instrumentation/transaction.js b/lib/instrumentation/transaction.js index c6e7cdd4d2..ae8ca4abc8 100644 --- a/lib/instrumentation/transaction.js +++ b/lib/instrumentation/transaction.js @@ -53,11 +53,8 @@ function Transaction(agent, name, ...args) { typeof args[args.length - 1] === 'object' ? args.pop() || {} : {}; if (opts.timer) { - process.emitWarning( - 'specifying the `timer` option to `new Transaction()` was never a public API and will be removed', - 'DeprecationWarning', - 'ELASTIC_APM_SPAN_TIMER_OPTION', - ); + // Before 4.x this option could be passed in. It was never publicly documented. + delete opts.timer; } if (opts.tracestate) { opts.tracestate = TraceState.fromStringFormatString(opts.tracestate);