{"name":"@sentry/apm","version":"5.10.0","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/core","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/hub":"5.10.0","@sentry/minimal":"5.10.0","@sentry/types":"5.10.0","@sentry/utils":"5.10.0","tslib":"^1.9.3"},"devDependencies":{"@types/express":"^4.17.1","jest":"^24.7.1","npm-run-all":"^4.1.2","prettier":"^1.17.0","prettier-check":"^2.0.0","rimraf":"^2.6.3","tslint":"^5.16.0","typescript":"^3.4.5"},"scripts":{"build":"run-p build:es5 build:esm","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","link:yarn":"yarn link","lint":"run-s lint:prettier lint:tslint","lint:prettier":"prettier-check \"{src,test}/**/*.ts\"","lint:tslint":"tslint -t stylish -p .","lint:tslint:json":"tslint --format json -p . | tee lint-results.json","fix":"run-s fix:tslint fix:prettier","fix:prettier":"prettier --write \"{src,test}/**/*.ts\"","fix:tslint":"tslint --fix -t stylish -p .","test":"jest","test:watch":"jest --watch"},"jest":{"collectCoverage":true,"transform":{"^.+\\.ts$":"ts-jest"},"moduleFileExtensions":["js","ts"],"testEnvironment":"node","testMatch":["**/*.test.ts"],"globals":{"ts-jest":{"tsConfig":"./tsconfig.json","diagnostics":false}}},"sideEffects":false,"_resolved":"","_integrity":"","_from":"file:/var/folders/0s/ftn28b_s49756n596ljmfhmw0000gn/T/craft-GxK9u5/sentry-apm-5.10.0.tgz","bugs":{"url":"https://github.com/getsentry/sentry-javascript/issues"},"_id":"@sentry/apm@5.10.0","_nodeVersion":"12.13.1","_npmVersion":"6.12.1","dist":{"integrity":"sha512-GyMWR38DaTOZ0Zdu677kt3/HDbZI4SyNNGvt/8/kzqRhmPUhEuLfuh1CJVA8ysUMD+ucllJifCGP2TflMA7LYQ==","shasum":"ba0c34298f599c8821d03b7fa0e95435b6340801","tarball":"http://registry-npm.ywwl.com/@sentry/apm/download/@sentry/apm-5.10.0.tgz","fileCount":50,"unpackedSize":199604,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJd58a6CRA9TVsSAnZWagAAeaAQAJgPyqOeOgs0MjiLHH/Z\nnX0snvnHkKHN39kM74HOK3ungVasVyxVtY70l+Q4J5YE37NJOhBLqXkJmJ3U\nOTsF6x3dUZ4Y5p7BObeydydCU2cMTIhInhS1cxAHMRmw8Z3yDE0PTAoqDtxK\n0krI6qqwknIFGbjFekah84epyxJcDd2jLIxQ776ByZU1uoFWJsEyZ/S1qb0r\nocixrUierrk8Gd9DUUrCBN4ix+ks7vn5NwfaWdMgFSNAHzELZ8f0BtWx3uLs\n8fiUANdYaTg0U1Bs8X/D8fkKOisOFrwz+D9WPDx39fUiffxPr4rX2NoGenrp\nBm13Whu0xQoCpRXJdrJxzIXyP7Dx/VsxBJKdSVFo09mkrbf8+xdFyyCx1rZP\nPlZopwANXn+C9SjL/eLnYD7xOP6lp0GzQYHGGgFmNpmk7RGJvp0RGgydDc90\nSS2TmtIkQqfXHlr8yweA0zjASfDEeHZrwkO9DE2Um4LFMxDUOV9T7N0WuYy9\n689esR7qLh9TyFccyVcca1T35f4PdYdu1WDSnnPMDr30gwEGkMaxxlzxnKIc\ndZc4deV2jLtyi5pmglY8shmWSUrhoVD0j2+ObPpR15hHRamFzhVY3XBwOEza\nL9t9e0jlGCnfhjtbKRyuyNr1L732WO26M6IZ79/S2T+TWxFSjsKIROCs5wnv\npA43\r\n=RkEF\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDqybFMhIWpKnnw48ODGygdVNK/CvB8STpp4ySNX7Y1VgIgfz1nWdjOdSfQ7om9AQMmPKEgMotG/RnBy0FZaKU9qRw="}],"size":28271,"noattachment":false,"key":"/@sentry/apm/-/@sentry/apm-5.10.0.tgz"},"maintainers":[{"name":"benvinegar","email":"ben@benv.ca"},{"name":"billyvg","email":"npm@mmo.me"},{"name":"evanpurkhiser","email":"evanpurkhiser@gmail.com"},{"name":"haza","email":"daniel.griesser.86@gmail.com"},{"name":"jauer","email":"account@jauer.org"},{"name":"kamilogorek","email":"kamil.ogorek@gmail.com"},{"name":"leedongwei","email":"danny@dongwei.li"},{"name":"lynnagara","email":"lyn.nagara@gmail.com"},{"name":"markstory","email":"mark@mark-story.com"},{"name":"mattrobenolt","email":"m@robenolt.com"},{"name":"mitsuhiko","email":"armin.ronacher@active-4.com"},{"name":"sentry-bot","email":"accounts@sentry.io"}],"_npmUser":{"name":"kamilogorek","email":"kamil.ogorek@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/apm_5.10.0_1575470777880_0.6537687122942613"},"_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":1575470778098,"_cnpm_publish_time":1575470778098,"dist-tags":{"latest":"5.27.1","next":"5.27.0-beta.1"}}