
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@sentry/apm
Advanced tools
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.
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/xxx/bundle.tracing.min.js"
integrity="sha384-sha"
crossorigin="anonymous"
></script>
And then update Sentry.init:
Sentry.init({
- integrations: [new Sentry.Integrations.Tracing()]
+ integrations: [new Sentry.Integrations.BrowserTracing()]
});
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)
+ }
}
}),
]
});
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(),
]
});
FAQs
Extensions for APM
The npm package @sentry/apm receives a total of 15,132 weekly downloads. As such, @sentry/apm popularity was classified as popular.
We found that @sentry/apm demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.