Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ When setting up Sentry in a shared environment where multiple Sentry instances m
## Shared Environment Setup

For the use cases listed above, set up a client manually as seen in the example below.
In addition, avoid adding any integrations that use global state, like `Breadcrumbs` or `GlobalHandlers`.
In addition, avoid adding any integrations that use global state, like `Breadcrumbs` or `GlobalHandlers` (see code snippet below).
Furthermore, some default integrations that use the global state have to be filtered as in the example below.
In these scenarios, it's a best practice to avoid using any integrations and to rely on manually capturing errors.

Expand All @@ -64,7 +64,7 @@ import {

// filter integrations that use the global variable
const integrations = getDefaultIntegrations({}).filter((defaultIntegration) => {
return !["BrowserApiErrors", "Breadcrumbs", "GlobalHandlers"].includes(
return !["BrowserApiErrors", "BrowserSession", "Breadcrumbs", "ConversationId", "GlobalHandlers", "FunctionToString"].includes(
Copy link

Choose a reason for hiding this comment

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

Bug: The documentation adds the integration name "ConversationId" to a filter list, but this integration does not exist in the Sentry JavaScript SDK.
Severity: MEDIUM

Suggested Fix

Remove "ConversationId" from the filter list in the documentation file. If it was intended to be a different integration, replace it with the correct, existing integration name.

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: docs/platforms/javascript/common/best-practices/shared-environments.mdx#L67

Potential issue: The documentation update adds `"ConversationId"` to a list of
integrations to be filtered out in shared environments. However, `"ConversationId"` is
not a valid integration in the Sentry JavaScript SDK. As a result, when users copy and
use this code, the filter will silently fail to match and remove this non-existent
integration. This misleads developers into believing they have correctly configured
their environment to disable certain global-state-using integrations when they have not.
The other added integrations, `"BrowserSession"` and `"FunctionToString"`, are valid.

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

Copy link
Member Author

Choose a reason for hiding this comment

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

defaultIntegration.name
);
});
Expand Down