How to use the @sentry/core.initAndBind function in @sentry/core

To help you get started, we’ve selected a few @sentry/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getsentry / sentry-react-native / src / js / sdk.ts View on Github external
}
      }),
      new DeviceContext()
    ];
  }
  if (options.enableNative === undefined) {
    options.enableNative = true;
  }
  if (options.enableNativeCrashHandling === undefined) {
    options.enableNativeCrashHandling = true;
  }
  if (options.enableNativeNagger === undefined) {
    options.enableNativeNagger = true;
  }
  // tslint:enable: strict-comparisons
  initAndBind(ReactNativeClient, options);
}
github getsentry / sentry-javascript / packages / node / src / sdk.ts View on Github external
}
    // This supports the variable that sentry-webpack-plugin injects
    else if (global.SENTRY_RELEASE && global.SENTRY_RELEASE.id) {
      options.release = global.SENTRY_RELEASE.id;
    }
  }

  if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {
    options.environment = process.env.SENTRY_ENVIRONMENT;
  }

  if (domain.active) {
    setHubOnCarrier(getMainCarrier(), getCurrentHub());
  }

  initAndBind(NodeClient, options);
}
github getsentry / sentry-javascript / packages / browser / src / sdk.ts View on Github external
verifyRequiredBrowserAPIs();
  } catch (_oO) {
    // juuust in case
  }

  if (options.defaultIntegrations === undefined) {
    options.defaultIntegrations = defaultIntegrations;
  }
  if (options.release === undefined) {
    const window = getGlobalObject();
    // This supports the variable that sentry-webpack-plugin injects
    if (window.SENTRY_RELEASE && window.SENTRY_RELEASE.id) {
      options.release = window.SENTRY_RELEASE.id;
    }
  }
  initAndBind(BrowserClient, options);
}