Skip to content

feat(skills-next): add nextjs SDK references#245

Open
evanpurkhiser wants to merge 1 commit into
mainfrom
evanpurkhiser/feat-skills-next-add-nextjs-sdk-references
Open

feat(skills-next): add nextjs SDK references#245
evanpurkhiser wants to merge 1 commit into
mainfrom
evanpurkhiser/feat-skills-next-add-nextjs-sdk-references

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

Direct LLM port of the existing nextjs SDK skill into the skills-next per-SDK reference layout under skills-next/references/sdks/nextjs/. This content has NOT been reviewed at all — it is a machine-generated port of the existing SDK skill, and every file should be treated as unverified.


- **Starts:** When the SDK first loads/initializes.
- **Ends:** After **5 minutes of inactivity** OR after a **maximum of 60 minutes** total.
- **Tab close:** Ends the session immediately.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation incorrectly states the session inactivity timeout is 5 minutes, when the correct value is 15 minutes.
Severity: LOW

Suggested Fix

Update the documentation to reflect the correct session inactivity timeout of 15 minutes. Change the text "After 5 minutes of inactivity" to "After 15 minutes of inactivity".

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills-next/references/sdks/nextjs/session-replay.md#L79

Potential issue: The documentation at
`skills-next/references/sdks/nextjs/session-replay.md` specifies that a session ends
after "5 minutes of inactivity". However, the actual behavior and official Sentry
documentation state that the inactivity timeout is 15 minutes. This discrepancy will
mislead developers and AI agents, causing them to have incorrect expectations about
session lifecycles and potentially miscalculate session durations for debugging.

Did we get this right? 👍 / 👎 to inform future reviews.

Comment on lines +233 to +234
excludeReplayIframe: false, // Remove iframe content capture if unused
excludeReplayShadowDOM: false, // Remove shadow DOM capture if unused

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Inline comments for excludeReplayIframe and excludeReplayShadowDOM incorrectly describe the effect of setting the value to false.
Severity: LOW

Suggested Fix

Update the inline comments to accurately describe the behavior for the given false value. For example, change // Remove iframe content capture if unused to // Set to true to remove iframe content capture or a similar comment that clarifies the action of a true value.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills-next/references/sdks/nextjs/session-replay.md#L233-L234

Potential issue: In the webpack tree-shaking configuration example, the inline comments
for `excludeReplayIframe` and `excludeReplayShadowDOM` are misleading. The comments
state `// Remove ... if unused` next to a `false` value. This is incorrect, as setting
these options to `false` (the default) *includes* the respective features. The comments
describe the behavior of setting the value to `true`, which will confuse developers
about the effect of the configuration.

Did we get this right? 👍 / 👎 to inform future reviews.


## Cardinality

Keep attribute values bounded. High-cardinality attributes (per-user IDs, request UUIDs) cause performance issues in Sentry's metrics backend.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this true?


## Supported AI Libraries

| Library | Integration API | Auto-enabled (Node server)? | Min SDK Version |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is missing a few default integrations

Comment on lines +411 to +437
## Phase 4: Cross-Link

After completing Next.js setup, check for companion services:

```bash
# Check for backend services in adjacent directories
ls ../backend ../server ../api ../services 2>/dev/null

# Check for backend language indicators
cat ../go.mod 2>/dev/null | head -3
cat ../requirements.txt ../pyproject.toml 2>/dev/null | head -3
cat ../Gemfile 2>/dev/null | head -3
cat ../pom.xml ../build.gradle 2>/dev/null | head -3
```

If a backend is found, suggest the matching SDK skill:

| Backend detected | Suggest skill |
|-----------------|--------------|
| Go (`go.mod`) | [`go`](../go/index.md) |
| Python (`requirements.txt`, `pyproject.toml`) | [`python`](../python/index.md) |
| Ruby (`Gemfile`) | [`ruby`](../ruby/index.md) |
| Java/Kotlin (`pom.xml`, `build.gradle`) | See [docs.sentry.io/platforms/java/](https://docs.sentry.io/platforms/java/) |
| Node.js (Express, Fastify, Hapi) | `@sentry/node` — see [docs.sentry.io/platforms/javascript/guides/express/](https://docs.sentry.io/platforms/javascript/guides/express/) |

Connecting frontend and backend with the same DSN or linked projects enables **distributed tracing** — stack traces that span your browser, Next.js server, and backend API in a single trace view.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • why do we assume the backend is just an outer folder?
  • some of the links go to sibling docs, others go to docs pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants