diff --git a/.changesets/log-error-for-appsignal-tracer-function-calls-.md b/.changesets/log-error-for-appsignal-tracer-function-calls-.md new file mode 100644 index 00000000..7a67b2b8 --- /dev/null +++ b/.changesets/log-error-for-appsignal-tracer-function-calls-.md @@ -0,0 +1,6 @@ +--- +bump: "patch" +type: "change" +--- + +Log an error for appsignal.tracer function calls. Inform the user to update instrumentation code to be compatible with the latest version of our package. diff --git a/src/client.ts b/src/client.ts index cfc212fa..71fad74f 100644 --- a/src/client.ts +++ b/src/client.ts @@ -386,4 +386,10 @@ export class Client { private storeInGlobal(): void { global.__APPSIGNAL__ = this } + + tracer(): void { + console.error( + "The `appsignal.tracer()` function was called, but it has been removed in AppSignal for Node.js package version 3.x. Please read our migration guide to upgrade to this new version of our package: https://docs.appsignal.com/nodejs/3.x/migration-guide.html. It is also possible to downgrade to version 2.x, after which this code will work again." + ) + } }