Skip to content

Commit

Permalink
ref(js): Adjust and update JS transaction grouping example code
Browse files Browse the repository at this point in the history
  • Loading branch information
Lms24 committed Sep 18, 2024
1 parent 93667e8 commit 13ba6c7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
```javascript
// All JavaScript-based SDKs include this function, so it's safe to replace `@sentry/node`
// All JavaScript-based SDKs include this function, so it's safe to replace `@sentry/browser`
// with your particular SDK
import { addEventProcessor } from "@sentry/node";
import { addEventProcessor } from "@sentry/browser";

addEventProcessor((event) => {
if (event.type === "transaction") {
Expand All @@ -11,7 +11,7 @@ addEventProcessor((event) => {
});
```

For browser JavaScript applications using the `BrowserTracing` integration, the `beforeStartSpan` option can be used to better group `navigation`/`pageload` transactions together based on URL.
For browser JavaScript applications using `browserTracingIntegration` integration, the `beforeStartSpan` option can be used to better group `navigation`/`pageload` transactions together based on URL.

```javascript
import * as Sentry from "@sentry/browser";
Expand Down

0 comments on commit 13ba6c7

Please sign in to comment.