Skip to content

Commit 4b21ba4

Browse files
committed
fix: Fix broken AI banner due to invalid syntax
1 parent dab3112 commit 4b21ba4

File tree

6 files changed

+224
-46
lines changed

6 files changed

+224
-46
lines changed

platform-includes/llm-rules-platform/_default.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursorrules` directory.
44

5-
{/_ ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/javascript.tsx).
6-
If you make any changes, please update the getting started doc accordingly. _/}
5+
{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/javascript.tsx).
6+
If you make any changes, please update the getting started doc accordingly. */}
77

88
````markdown {filename:rules.md}
99
These examples should be used as guidance when configuring Sentry functionality within a project.

platform-includes/llm-rules-platform/javascript.nextjs.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursorrules` directory.
44

5-
{/_ ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/nextjs.tsx).
6-
If you make any changes, please update the getting started doc accordingly. _/}
5+
{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/nextjs.tsx).
6+
If you make any changes, please update the getting started doc accordingly. */}
77

88
````markdown {filename:rules.md}
99
These examples should be used as guidance when configuring Sentry functionality within a project.

platform-includes/llm-rules-platform/javascript.node.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursorrules` directory.
44

5-
{/_ ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/node/node.tsx).
6-
If you make any changes, please update the getting started doc accordingly. _/}
5+
{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/node/node.tsx).
6+
If you make any changes, please update the getting started doc accordingly. */}
77

88
````markdown {filename:rules.md}
99
These examples should be used as guidance when configuring Sentry functionality within a project.

platform-includes/llm-rules-platform/javascript.react.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
Sentry provides a set of rules you can use to help your LLM use Sentry correctly. Copy this file and add it to your projects rules configuration. When created as a rules file this should be placed alongside other editor specific rule files. For example, if you are using Cursor, place this file in the `.cursorrules` directory.
44

5-
{/_ ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/react.tsx).
6-
If you make any changes, please update the getting started doc accordingly. _/}
5+
{/* ATTENTION: The rules defined here must match those in the app's onboarding documentation (see: https://github.com/getsentry/sentry/blob/master/static/app/gettingStartedDocs/javascript/react.tsx).
6+
If you make any changes, please update the getting started doc accordingly. */}
77

88
````markdown {filename:rules.md}
99
These examples should be used as guidance when configuring Sentry functionality within a project.

src/instrumentation.ts

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,41 @@
1-
import * as Sentry from '@sentry/nextjs';
1+
// import * as Sentry from '@sentry/nextjs';
22

3-
export function register() {
4-
if (process.env.NEXT_RUNTIME === 'nodejs') {
5-
Sentry.init({
6-
dsn: process.env.SENTRY_DSN,
7-
tracesSampleRate: 1,
8-
enableLogs: true,
9-
debug: false,
10-
environment: process.env.NODE_ENV === 'development' ? 'development' : undefined,
11-
spotlight: process.env.NODE_ENV === 'development',
12-
integrations: [Sentry.consoleLoggingIntegration()],
13-
});
14-
}
3+
// export function register() {
4+
// if (process.env.NEXT_RUNTIME === 'nodejs') {
5+
// Sentry.init({
6+
// dsn: process.env.SENTRY_DSN,
7+
// tracesSampleRate: 1,
8+
// enableLogs: true,
9+
// debug: false,
10+
// environment: process.env.NODE_ENV === 'development' ? 'development' : undefined,
11+
// spotlight: process.env.NODE_ENV === 'development',
12+
// integrations: [Sentry.consoleLoggingIntegration()],
13+
// });
14+
// }
1515

16-
if (process.env.NEXT_RUNTIME === 'edge') {
17-
Sentry.init({
18-
dsn: process.env.SENTRY_DSN,
19-
tracesSampleRate: 1,
20-
enableLogs: true,
21-
debug: false,
22-
environment: process.env.NODE_ENV === 'development' ? 'development' : undefined,
23-
integrations: [Sentry.consoleLoggingIntegration()],
24-
// temporary change for investigating edge middleware tx names
25-
beforeSendTransaction(event) {
26-
if (
27-
event.transaction?.includes('middleware GET') &&
28-
event.contexts?.trace?.data
29-
) {
30-
event.contexts.trace.data = {
31-
...event.contexts.trace.data,
32-
'sentry.source': 'custom',
33-
};
34-
}
35-
return event;
36-
},
37-
});
38-
}
39-
}
16+
// if (process.env.NEXT_RUNTIME === 'edge') {
17+
// Sentry.init({
18+
// dsn: process.env.SENTRY_DSN,
19+
// tracesSampleRate: 1,
20+
// enableLogs: true,
21+
// debug: false,
22+
// environment: process.env.NODE_ENV === 'development' ? 'development' : undefined,
23+
// integrations: [Sentry.consoleLoggingIntegration()],
24+
// // temporary change for investigating edge middleware tx names
25+
// beforeSendTransaction(event) {
26+
// if (
27+
// event.transaction?.includes('middleware GET') &&
28+
// event.contexts?.trace?.data
29+
// ) {
30+
// event.contexts.trace.data = {
31+
// ...event.contexts.trace.data,
32+
// 'sentry.source': 'custom',
33+
// };
34+
// }
35+
// return event;
36+
// },
37+
// });
38+
// }
39+
// }
4040

41-
export const onRequestError = Sentry.captureRequestError;
41+
// export const onRequestError = Sentry.captureRequestError;

0 commit comments

Comments
 (0)