Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: block sentry in frontend side #6615

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

westhyena
Copy link

PR fulfills these requirements

  • Commit message(s) and PR title follows the format [fix|feat|ci|chore|doc]: TICKET-ID: Short description of change made ex. fix: DEV-XXXX: Removed inconsistent code usage causing intermittent errors
  • Tests for the changes have been added/updated (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance (for bug fixes/features)

Change has impacts in these area(s)

(check all that apply)

  • Product design
  • Backend (Database)
  • Backend (API)
  • Frontend

Describe the reason for change

#4421

In airgapped environment, frontend tries to get the file from sentry cdn, but it hangs, so page won't load.
Setting FRONTEND_SENTRY_DSN won't fix this problemn.

What does this fix?

When FRONTEND_SENTRY_DSN is set empty,
it disables

  • sentry initialization
  • fetching from sentry cdn

Does this PR introduce a breaking change?

(check only one)

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

Copy link

netlify bot commented Nov 8, 2024

👷 Deploy request for label-studio-docs-new-theme pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 78b1d69

Copy link

netlify bot commented Nov 8, 2024

👷 Deploy request for heartex-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 78b1d69

@github-actions github-actions bot added the feat label Nov 8, 2024
setTags();
Sentry.init({
dsn: "https://[email protected]/5838868",
dsn: APP_SETTINGS.frontend_sentry_dsn,
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
dsn: APP_SETTINGS.frontend_sentry_dsn,
dsn: APP_SETTINGS.sentry_dsn,

The value as set in the template is sentry_dsn not frontend_sentry_dsn.

@@ -5,10 +5,10 @@ import { Integrations } from "@sentry/tracing";
import { Route } from "react-router-dom";

export const initSentry = (history: RouterHistory) => {
if (APP_SETTINGS.debug === false) {
if (APP_SETTINGS.debug === false && APP_SETTINGS.frontend_sentry_dsn) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
if (APP_SETTINGS.debug === false && APP_SETTINGS.frontend_sentry_dsn) {
if (APP_SETTINGS.debug === false && APP_SETTINGS.sentry_dsn) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants