Skip to content

Commit b39e2d9

Browse files
authored
change sentry import to correct package (#903)
* change sentry import to correct package * modify docs to reflect current sentry situation
1 parent be29d40 commit b39e2d9

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

docs/monitoring.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,12 @@ env var during runtime:
3030
fly secrets set SENTRY_DSN=<your_dsn>
3131
```
3232

33-
See the guide for the remix
34-
[here](https://docs.sentry.io/platforms/javascript/guides/remix/). Run the
35-
installation wizard but note that some of the steps included already exist in
36-
this codebase so be sure to remove any duplication.
33+
See the guides for React Router v7
34+
[here(library)](https://docs.sentry.io/platforms/javascript/guides/react/features/react-router/v7/)
35+
and
36+
[here(framwork)](https://docs.sentry.io/platforms/javascript/guides/react-router/).
37+
Note that the dedicated SDK for React Router is under development and features
38+
are lacking.
3739

3840
To generate the auth token, click
3941
[this](https://sentry.io/orgredirect/settings/:orgslug/developer-settings/new-internal/)

server/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import crypto from 'node:crypto'
22
import { createRequestHandler } from '@react-router/express'
3-
import * as Sentry from '@sentry/react'
3+
import * as Sentry from '@sentry/node'
44
import { ip as ipAddress } from 'address'
55
import chalk from 'chalk'
66
import closeWithGrace from 'close-with-grace'
@@ -144,7 +144,7 @@ const maxMultiple =
144144
!IS_PROD || process.env.PLAYWRIGHT_TEST_BASE_URL ? 10_000 : 1
145145
const rateLimitDefault = {
146146
windowMs: 60 * 1000,
147-
limit: 1000 * maxMultiple,
147+
limit: 1000 * maxMultiple,
148148
standardHeaders: true,
149149
legacyHeaders: false,
150150
validate: { trustProxy: false },
@@ -166,7 +166,7 @@ const strongestRateLimit = rateLimit({
166166
const strongRateLimit = rateLimit({
167167
...rateLimitDefault,
168168
windowMs: 60 * 1000,
169-
limit: 100 * maxMultiple,
169+
limit: 100 * maxMultiple,
170170
})
171171

172172
const generalRateLimit = rateLimit(rateLimitDefault)

server/utils/monitoring.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import { prismaIntegration, httpIntegration } from '@sentry/node'
1+
import * as Sentry from '@sentry/node'
22
import { nodeProfilingIntegration } from '@sentry/profiling-node'
3-
import * as Sentry from '@sentry/react'
43

54
export function init() {
65
Sentry.init({
@@ -18,8 +17,8 @@ export function init() {
1817
/\/site\.webmanifest/,
1918
],
2019
integrations: [
21-
prismaIntegration(),
22-
httpIntegration(),
20+
Sentry.prismaIntegration(),
21+
Sentry.httpIntegration(),
2322
nodeProfilingIntegration(),
2423
],
2524
tracesSampler(samplingContext) {

0 commit comments

Comments
 (0)