{"name":"@sentry/apm","version":"5.21.2","description":"Extensions for APM","repository":{"type":"git","url":"git://github.com/getsentry/sentry-javascript.git"},"homepage":"https://github.com/getsentry/sentry-javascript/tree/master/packages/apm","author":{"name":"Sentry"},"license":"BSD-3-Clause","engines":{"node":">=6"},"main":"dist/index.js","module":"esm/index.js","types":"dist/index.d.ts","publishConfig":{"access":"public"},"dependencies":{"@sentry/browser":"5.21.2","@sentry/hub":"5.21.2","@sentry/minimal":"5.21.2","@sentry/types":"5.21.2","@sentry/utils":"5.21.2","tslib":"^1.9.3"},"devDependencies":{"@sentry-internal/eslint-config-sdk":"5.21.2","@types/express":"^4.17.1","eslint":"7.6.0","jest":"^24.7.1","npm-run-all":"^4.1.2","prettier":"1.17.0","rimraf":"^2.6.3","rollup":"^1.10.1","rollup-plugin-commonjs":"^9.3.4","rollup-plugin-license":"^0.8.1","rollup-plugin-node-resolve":"^4.2.3","rollup-plugin-terser":"^4.0.4","rollup-plugin-typescript2":"^0.21.0","typescript":"3.9.7"},"scripts":{"build":"run-p build:es5 build:esm build:bundle","build:bundle":"rollup --config","build:bundle:watch":"rollup --config --watch","build:es5":"tsc -p tsconfig.build.json","build:esm":"tsc -p tsconfig.esm.json","build:watch":"run-p build:watch:es5 build:watch:esm","build:watch:es5":"tsc -p tsconfig.build.json -w --preserveWatchOutput","build:watch:esm":"tsc -p tsconfig.esm.json -w --preserveWatchOutput","clean":"rimraf dist coverage build esm","link:yarn":"yarn link","lint":"run-s lint:prettier lint:eslint","lint:prettier":"prettier --check \"{src,test}/**/*.ts\"","lint:eslint":"eslint . --cache --cache-location '../../eslintcache/' --format stylish","fix":"run-s fix:eslint fix:prettier","fix:prettier":"prettier --write \"{src,test}/**/*.ts\"","fix:eslint":"eslint . --format stylish --fix","test":"jest","test:watch":"jest --watch","pack":"npm pack"},"jest":{"collectCoverage":true,"transform":{"^.+\\.ts$":"ts-jest"},"moduleFileExtensions":["js","ts"],"testEnvironment":"node","testMatch":["**/*.test.ts"],"globals":{"ts-jest":{"tsConfig":"./tsconfig.json","diagnostics":false}}},"sideEffects":["./src/index.ts"],"_resolved":"","_integrity":"","_from":"file:/var/folders/7d/4fxc2_s94_z6ygyf5yk74t700000gn/T/craft-1V6hm0/sentry-apm-5.21.2.tgz","bugs":{"url":"https://github.com/getsentry/sentry-javascript/issues"},"_id":"@sentry/apm@5.21.2","_nodeVersion":"14.8.0","_npmVersion":"6.14.7","dist":{"integrity":"sha512-OBfL2Q2vbd8pvFDhYGEMxXyy4tBAsigCrjS0fTPbLkzF0YV9DNE133KXpXfivahCFQ/+cPHbQ+dLMM86KB2+Pg==","shasum":"0d78502f0b556f3bdb6de0b79e3b671fd071740b","tarball":"http://registry-npm.ywwl.com/@sentry/apm/download/@sentry/apm-5.21.2.tgz","fileCount":82,"unpackedSize":401866,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfQBI4CRA9TVsSAnZWagAA/bYP/j9OjX9Aez0nrHq7hjA5\nWNqKNuKBsjL+f69UOpCuAQu23hNC1xO57GkH4iLvR/PnZTuEI3+AC/nIlSC6\nlgDoUMmBIlWsMoQnja4TUOMMFjPyhElk+R8a7brB2xDkxtlYeKgXlLoCc7Xw\n5naaJn5be/Q1mo4KS5mm08RFEMYODPjcCBBKLGjO7T98qWvLSsQm6emKKpGC\nFcLDVIx3f62opKnzSfFBU+RqDdDh5j2ss2rLJ6gS8bFTVDh8Ne2hPW/3fmXA\nKD4MlxmvP2+EvebVkxeP/i9Gs9YsjooQjyiWatxIryxtmgBdQfkIpbKBhhHR\nY9ldVjih6Jk6n48Ipqx7VuFmqMVYNiipoME+qylSZztT+vauq8IqRVGoB1gu\nhNA9yxC3Qare6WT+4UbwMirE9TcUlB8umMfZTZNfOfTD1EQQbe/mPnUbX22F\n69N+c25LYLfrbS90We5pnbx2pcp5m2qJeY9pFKWN7ebMr2QcpCdw/qYMOAd4\nvXiRG3nuGpZxsWtCthGU2SdRtjpM42Xi0+4V0Zcvdefvh9mAoFpd83t4dVCX\n/Q3++vBNtERAfnKUq9m00dQ/6gPMafB8WE1Wb4jAtRpWeogfOIufvlBHIUyF\noj5h+VOAbdnDj/BPFsDIlKRfaBcjQhkYD6E1WKp16mwGDo3CpAu0C1gONzY2\nAiVM\r\n=Uchn\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDoHtOiLx9+HZI9ZS4zzt20RncWsmnBipwB6MPEHAxRoAiEA3THgSPNr5uc3z3rsZt0pCmks9ag2j73e4S4sYSbB3Rc="}],"size":76979,"noattachment":false,"key":"/@sentry/apm/-/@sentry/apm-5.21.2.tgz"},"maintainers":[{"email":"ben@benv.ca","name":"benvinegar"},{"email":"npm@mmo.me","name":"billyvg"},{"email":"evanpurkhiser@gmail.com","name":"evanpurkhiser"},{"email":"daniel.griesser.86@gmail.com","name":"haza"},{"email":"account@jauer.org","name":"jauer"},{"email":"kamil.ogorek@gmail.com","name":"kamilogorek"},{"email":"danny@dongwei.li","name":"leedongwei"},{"email":"lyn.nagara@gmail.com","name":"lynnagara"},{"email":"mark@mark-story.com","name":"markstory"},{"email":"m@robenolt.com","name":"mattrobenolt"},{"email":"armin.ronacher@active-4.com","name":"mitsuhiko"},{"email":"accounts@sentry.io","name":"sentry-bot"},{"email":"dcramer@gmail.com","name":"zeeg"}],"_npmUser":{"name":"haza","email":"daniel.griesser.86@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apm_5.21.2_1598034487937_0.19846723467185878"},"_hasShrinkwrap":false,"deprecated":"Please migrate to @sentry/tracing; see: https://www.npmjs.com/package/@sentry/apm","readme":"# Deprecated\n\nThe tracing integration for JavaScript SDKs has moved from\n[`@sentry/apm`](https://www.npmjs.com/package/@sentry/apm) to\n[`@sentry/tracing`](https://www.npmjs.com/package/@sentry/tracing). While the\ntwo packages are similar, some imports and APIs have changed slightly.\n\nThe old package `@sentry/apm` is deprecated in favor of `@sentry/tracing`.\nFuture support for `@sentry/apm` is limited to bug fixes only.\n\n## Migrating from @sentry/apm to @sentry/tracing\n\n### Browser (CDN bundle)\n\nIf you were using the Browser CDN bundle, switch from the old\n`bundle.apm.min.js` to the new tracing bundle:\n\n```html\n<script\n  src=\"https://browser.sentry-cdn.com/xxx/bundle.tracing.min.js\"\n  integrity=\"sha384-sha\"\n  crossorigin=\"anonymous\"\n></script>\n```\n\nAnd then update `Sentry.init`:\n\n```diff\n Sentry.init({\n-  integrations: [new Sentry.Integrations.Tracing()]\n+  integrations: [new Sentry.Integrations.BrowserTracing()]\n });\n```\n\n### Browser (npm package)\n\nIf you were using automatic instrumentation, update the import statement and\nupdate `Sentry.init` to use the new `BrowserTracing` integration:\n\n```diff\n import * as Sentry from \"@sentry/browser\";\n-import { Integrations } from \"@sentry/apm\";\n+import { Integrations } from \"@sentry/tracing\";\n\n Sentry.init({\n   integrations: [\n-    new Integrations.Tracing(),\n+    new Integrations.BrowserTracing(),\n   ]\n });\n```\n\nIf you were using the `beforeNavigate` option from the `Tracing` integration,\nthe API in `BrowserTracing` has changed slightly. Instead of passing in a\nlocation and returning a string representing transaction name, `beforeNavigate`\nnow accepts a transaction context and is expected to return a transaction\ncontext. You can now add extra tags or change the `op` based on different\nparameters. If you want to access the location like before, you can get it from\n`window.location`.\n\nFor example, if you had a function like so that computed a custom transaction\nname:\n\n```javascript\nimport * as Sentry from \"@sentry/browser\";\nimport { Integrations } from \"@sentry/apm\";\n\nSentry.init({\n  integrations: [\n    new Integrations.Tracing({\n      beforeNavigate: location => {\n        return getTransactionName(location);\n      },\n    }),\n  ],\n});\n```\n\nYou would now leverage the context to do the same thing:\n\n```javascript\nimport * as Sentry from \"@sentry/browser\";\nimport { Integrations } from \"@sentry/tracing\";\n\nSentry.init({\n  integrations: [\n    new Integrations.BrowserTracing({\n      beforeNavigate: context => {\n        return {\n          ...context,\n          // Can even look at context tags or other data to adjust\n          // transaction name\n          name: getTransactionName(window.location),\n        };\n      },\n    }),\n  ],\n});\n```\n\nFor the full diff:\n\n```diff\n import * as Sentry from \"@sentry/browser\";\n-import { Integrations } from \"@sentry/apm\";\n+import { Integrations } from \"@sentry/tracing\";\n\n Sentry.init({\n   integrations: [\n-    new Integrations.Tracing({\n-      beforeNavigate: (location) => {\n-        return getTransactionName(location)\n+    new Integrations.BrowserTracing({\n+      beforeNavigate: (ctx) => {\n+        return {\n+          ...ctx,\n+          name: getTransactionName(ctx.name, window.location)\n+        }\n       }\n     }),\n   ]\n });\n```\n\n### Node\n\nIf you were using the Express integration for automatic instrumentation, the\nonly necessary change is to update the import statement:\n\n```diff\n import * as Sentry from \"@sentry/node\";\n-import { Integrations } from \"@sentry/apm\";\n+import { Integrations } from \"@sentry/tracing\";\n\n Sentry.init({\n   integrations: [\n     new Integrations.Express(),\n   ]\n });\n```\n","publish_time":1598034488120,"_cnpm_publish_time":1598034488120,"dist-tags":{"latest":"5.27.1","next":"5.27.0-beta.1"}}