@sentry/tracing
Extensions for Sentry AM
Last updated 4 years ago by sentry-bot .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install @sentry/tracing 
SYNC missed versions from official npm registry.

Sentry

Sentry Tracing Extensions

npm version npm dm npm dt

Links

General

This package contains extensions to the @sentry/hub to enable Sentry AM related functionality. It also provides integrations for Browser and Node that provide a good experience out of the box.

Migrating from @sentry/apm to @sentry/tracing

The tracing integration for JavaScript SDKs has moved from @sentry/apm to @sentry/tracing. While the two packages are similar, some imports and APIs have changed slightly.

The old package @sentry/apm is deprecated in favor of @sentry/tracing. Future support for @sentry/apm is limited to bug fixes only.

Migrating from @sentry/apm to @sentry/tracing

Browser (CDN bundle)

If you were using the Browser CDN bundle, switch from the old bundle.apm.min.js to the new tracing bundle:

<script
  src="https://browser.sentry-cdn.com/{{ packages.version('sentry.javascript.browser') }}/bundle.tracing.min.js"
  integrity="sha384-{{ packages.checksum('sentry.javascript.browser', 'bundle.tracing.min.js', 'sha384-base64') }}"
  crossorigin="anonymous"
></script>

And then update Sentry.init:

 Sentry.init({
-  integrations: [new Sentry.Integrations.Tracing()]
+  integrations: [new Sentry.Integrations.BrowserTracing()]
 });

Browser (npm package)

If you were using automatic instrumentation, update the import statement and update Sentry.init to use the new BrowserTracing integration:

 import * as Sentry from "@sentry/browser";
-import { Integrations } from "@sentry/apm";
+import { Integrations } from "@sentry/tracing";

 Sentry.init({
   integrations: [
-    new Integrations.Tracing(),
+    new Integrations.BrowserTracing(),
   ]
 });

If you were using the beforeNavigate option from the Tracing integration, the API in BrowserTracing has changed slightly. Instead of passing in a location and returning a string representing transaction name, beforeNavigate now accepts a transaction context and is expected to return a transaction context. You can now add extra tags or change the op based on different parameters. If you want to access the location like before, you can get it from window.location.

For example, if you had a function like so that computed a custom transaction name:

import * as Sentry from "@sentry/browser";
import { Integrations } from "@sentry/apm";

Sentry.init({
  integrations: [
    new Integrations.Tracing({
      beforeNavigate: location => {
        return getTransactionName(location);
      },
    }),
  ],
});

You would now leverage the context to do the same thing:

import * as Sentry from "@sentry/browser";
import { Integrations } from "@sentry/tracing";

Sentry.init({
  integrations: [
    new Integrations.BrowserTracing({
      beforeNavigate: context => {
        return {
          ...context,
          // Can even look at context tags or other data to adjust
          // transaction name
          name: getTransactionName(window.location),
        };
      },
    }),
  ],
});

For the full diff:

 import * as Sentry from "@sentry/browser";
-import { Integrations } from "@sentry/apm";
+import { Integrations } from "@sentry/tracing";

 Sentry.init({
   integrations: [
-    new Integrations.Tracing({
-      beforeNavigate: (location) => {
-        return getTransactionName(location)
+    new Integrations.BrowserTracing({
+      beforeNavigate: (ctx) => {
+        return {
+          ...ctx,
+          name: getTransactionName(ctx.name, window.location)
+        }
       }
     }),
   ]
 });

Node

If you were using the Express integration for automatic instrumentation, the only necessary change is to update the import statement:

 import * as Sentry from "@sentry/node";
-import { Integrations } from "@sentry/apm";
+import { Integrations } from "@sentry/tracing";

 Sentry.init({
   integrations: [
     new Integrations.Express(),
   ]
 });

Current Tags

  • 7.45.0                                ...           latest (2 years ago)
  • 7.34.0-beta.0                                ...           next (2 years ago)

204 Versions

  • 7.45.0                                ...           2 years ago
  • 7.44.2                                ...           2 years ago
  • 7.44.1                                ...           2 years ago
  • 7.44.0                                ...           2 years ago
  • 7.43.0                                ...           2 years ago
  • 7.42.0                                ...           2 years ago
  • 7.41.0                                ...           2 years ago
  • 7.40.0                                ...           2 years ago
  • 7.39.0                                ...           2 years ago
  • 7.38.0                                ...           2 years ago
  • 7.37.2                                ...           2 years ago
  • 7.37.1                                ...           2 years ago
  • 7.37.0                                ...           2 years ago
  • 7.36.0                                ...           2 years ago
  • 7.35.0                                ...           2 years ago
  • 7.34.0                                ...           2 years ago
  • 7.34.0-beta.0                                ...           2 years ago
  • 7.33.0                                ...           2 years ago
  • 7.32.1                                ...           2 years ago
  • 7.32.0                                ...           2 years ago
  • 7.31.1                                ...           2 years ago
  • 7.31.0                                ...           2 years ago
  • 7.30.0                                ...           2 years ago
  • 7.29.0                                ...           2 years ago
  • 7.28.1                                ...           2 years ago
  • 7.28.0                                ...           2 years ago
  • 7.27.0                                ...           2 years ago
  • 7.26.0                                ...           2 years ago
  • 7.25.0                                ...           2 years ago
  • 7.24.2                                ...           2 years ago
  • 7.24.1                                ...           2 years ago
  • 7.24.0                                ...           2 years ago
  • 7.23.0                                ...           2 years ago
  • 7.22.0                                ...           2 years ago
  • 7.21.1                                ...           2 years ago
  • 7.21.0                                ...           2 years ago
  • 7.20.1                                ...           2 years ago
  • 7.20.0                                ...           2 years ago
  • 7.19.0                                ...           2 years ago
  • 7.18.0                                ...           2 years ago
  • 7.17.4                                ...           2 years ago
  • 7.17.3                                ...           2 years ago
  • 7.17.2                                ...           2 years ago
  • 7.17.1                                ...           2 years ago
  • 7.17.0                                ...           2 years ago
  • 7.16.0                                ...           2 years ago
  • 7.15.0                                ...           2 years ago
  • 7.14.2                                ...           2 years ago
  • 7.14.1                                ...           2 years ago
  • 7.14.0                                ...           2 years ago
  • 7.13.0                                ...           2 years ago
  • 7.12.1                                ...           2 years ago
  • 7.12.0                                ...           2 years ago
  • 7.11.1                                ...           2 years ago
  • 7.11.0                                ...           2 years ago
  • 7.10.0                                ...           2 years ago
  • 7.9.0                                ...           2 years ago
  • 7.8.1                                ...           2 years ago
  • 7.8.0                                ...           2 years ago
  • 7.7.0                                ...           2 years ago
  • 7.6.0                                ...           2 years ago
  • 7.5.1                                ...           2 years ago
  • 7.5.0                                ...           2 years ago
  • 7.4.1                                ...           2 years ago
  • 7.4.0                                ...           2 years ago
  • 7.3.1                                ...           2 years ago
  • 7.3.0                                ...           2 years ago
  • 7.2.0                                ...           2 years ago
  • 7.1.1                                ...           3 years ago
  • 7.1.0                                ...           3 years ago
  • 7.0.0                                ...           3 years ago
  • 7.0.0-rc.0                                ...           3 years ago
  • 7.0.0-beta.2                                ...           3 years ago
  • 7.0.0-beta.1                                ...           3 years ago
  • 7.0.0-beta.0                                ...           3 years ago
  • 6.19.7                                ...           3 years ago
  • 7.0.0-alpha.1                                ...           3 years ago
  • 7.0.0-alpha.0                                ...           3 years ago
  • 6.19.6                                ...           3 years ago
  • 6.19.5                                ...           3 years ago
  • 6.19.4                                ...           3 years ago
  • 6.19.3                                ...           3 years ago
  • 6.19.2                                ...           3 years ago
  • 6.19.1                                ...           3 years ago
  • 6.19.0                                ...           3 years ago
  • 6.18.2                                ...           3 years ago
  • 6.18.1-beta.0                                ...           3 years ago
  • 6.18.1                                ...           3 years ago
  • 6.18.0                                ...           3 years ago
  • 6.17.9                                ...           3 years ago
  • 6.17.8                                ...           3 years ago
  • 6.17.8-beta.0                                ...           3 years ago
  • 6.17.7                                ...           3 years ago
  • 6.17.6                                ...           3 years ago
  • 6.17.5                                ...           3 years ago
  • 6.17.4                                ...           3 years ago
  • 6.17.3                                ...           3 years ago
  • 6.17.2                                ...           3 years ago
  • 6.17.1                                ...           3 years ago
  • 6.17.0                                ...           3 years ago
  • 6.17.0-beta.0                                ...           3 years ago
  • 6.16.1                                ...           3 years ago
  • 6.16.0                                ...           3 years ago
  • 6.15.0                                ...           3 years ago
  • 6.14.3                                ...           3 years ago
  • 6.14.2 [deprecated]           ...           3 years ago
  • 6.14.1                                ...           3 years ago
  • 6.14.0                                ...           3 years ago
  • 6.13.3                                ...           3 years ago
  • 6.13.2                                ...           3 years ago
  • 6.13.1                                ...           3 years ago
  • 6.13.0                                ...           3 years ago
  • 6.13.0-beta.3                                ...           3 years ago
  • 6.13.0-beta.2                                ...           3 years ago
  • 6.13.0-beta.1                                ...           3 years ago
  • 6.13.0-beta.0                                ...           3 years ago
  • 6.12.0                                ...           3 years ago
  • 6.12.0-beta.2                                ...           3 years ago
  • 6.12.0-beta.1                                ...           3 years ago
  • 6.11.0                                ...           3 years ago
  • 6.10.0                                ...           3 years ago
  • 6.10.0-beta.3                                ...           3 years ago
  • 6.10.0-beta.2                                ...           3 years ago
  • 6.10.0-beta                                ...           3 years ago
  • 6.9.0                                ...           3 years ago
  • 6.8.0                                ...           3 years ago
  • 6.7.2                                ...           3 years ago
  • 6.7.1                                ...           3 years ago
  • 6.7.0                                ...           3 years ago
  • 6.6.0                                ...           4 years ago
  • 6.5.1                                ...           4 years ago
  • 6.5.0                                ...           4 years ago
  • 6.5.0-beta.2                                ...           4 years ago
  • 6.5.0-beta.1                                ...           4 years ago
  • 6.5.0-beta.0                                ...           4 years ago
  • 6.4.1                                ...           4 years ago
  • 6.4.0                                ...           4 years ago
  • 6.3.6                                ...           4 years ago
  • 6.3.5                                ...           4 years ago
  • 6.3.4                                ...           4 years ago
  • 6.3.4-beta.3                                ...           4 years ago
  • 6.3.4-beta.2                                ...           4 years ago
  • 6.3.4-beta.1                                ...           4 years ago
  • 6.3.4-beta.0                                ...           4 years ago
  • 6.3.3                                ...           4 years ago
  • 6.3.2                                ...           4 years ago
  • 6.3.1                                ...           4 years ago
  • 6.3.0                                ...           4 years ago
  • 6.3.0-beta.7                                ...           4 years ago
  • 6.3.0-beta.6                                ...           4 years ago
  • 6.3.0-beta.5                                ...           4 years ago
  • 6.2.5                                ...           4 years ago
  • 6.2.4                                ...           4 years ago
  • 6.2.3                                ...           4 years ago
  • 6.2.2                                ...           4 years ago
  • 6.3.0-beta.4                                ...           4 years ago
  • 6.3.0-beta.3                                ...           4 years ago
  • 6.3.0-beta.2                                ...           4 years ago
  • 6.3.0-beta.1                                ...           4 years ago
  • 6.3.0-beta.0                                ...           4 years ago
  • 6.2.1                                ...           4 years ago
  • 6.2.0                                ...           4 years ago
  • 6.1.0                                ...           4 years ago
  • 6.1.0-beta.0                                ...           4 years ago
  • 6.0.4                                ...           4 years ago
  • 6.0.3                                ...           4 years ago
  • 6.0.2                                ...           4 years ago
  • 6.0.1                                ...           4 years ago
  • 6.0.0                                ...           4 years ago
  • 5.30.0                                ...           4 years ago
  • 5.29.2                                ...           4 years ago
  • 5.29.1                                ...           4 years ago
  • 5.29.0                                ...           4 years ago
  • 5.28.0                                ...           4 years ago
  • 5.27.7-beta.0                                ...           4 years ago
  • 5.27.6                                ...           4 years ago
  • 5.27.5                                ...           4 years ago
  • 5.27.4                                ...           4 years ago
  • 5.27.3                                ...           4 years ago
  • 5.27.2                                ...           4 years ago
  • 5.27.1                                ...           4 years ago
  • 5.27.0                                ...           4 years ago
  • 5.27.0-beta.1                                ...           4 years ago
  • 5.27.0-beta.0                                ...           4 years ago
  • 5.26.0                                ...           4 years ago
  • 5.25.0                                ...           4 years ago
  • 5.25.0-beta.2                                ...           4 years ago
  • 5.25.0-beta.1                                ...           4 years ago
  • 5.25.0-beta.0                                ...           4 years ago
  • 5.24.2                                ...           4 years ago
  • 5.24.1                                ...           4 years ago
  • 5.24.0                                ...           4 years ago
  • 5.23.0                                ...           4 years ago
  • 5.22.3                                ...           4 years ago
  • 5.22.2                                ...           4 years ago
  • 5.22.1                                ...           4 years ago
  • 5.22.0                                ...           4 years ago
  • 5.21.4                                ...           4 years ago
  • 5.21.3                                ...           4 years ago
  • 5.21.2                                ...           4 years ago
  • 5.21.1                                ...           4 years ago
  • 5.21.0                                ...           4 years ago
  • 5.20.1                                ...           4 years ago
  • 5.20.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |