function init$1(options) {
    if (options === void 0) { options = {}; }
    var _a;
    var carrier = getMainCarrier();
    var autoloadedIntegrations = ((_a = carrier.__SENTRY__) === null || _a === void 0 ? void 0 : _a.integrations) || [];
    options.defaultIntegrations =
        options.defaultIntegrations === false
            ? []
            : __spread$4((Array.isArray(options.defaultIntegrations) ? options.defaultIntegrations : defaultIntegrations), autoloadedIntegrations);
    if (options.dsn === undefined && process.env.SENTRY_DSN) {
        options.dsn = process.env.SENTRY_DSN;
    }
    if (options.tracesSampleRate === undefined && process.env.SENTRY_TRACES_SAMPLE_RATE) {
        var tracesSampleRate = parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE);
        if (isFinite(tracesSampleRate)) {
            options.tracesSampleRate = tracesSampleRate;
        }
    }
    if (options.release === undefined) {
        var detectedRelease = getSentryRelease();
        if (detectedRelease !== undefined) {
            options.release = detectedRelease;
        }
        else {
            // If release is not provided, then we should disable autoSessionTracking
            options.autoSessionTracking = false;
        }
    }
    if (options.environment === undefined && process.env.SENTRY_ENVIRONMENT) {
        options.environment = process.env.SENTRY_ENVIRONMENT;
    }
    if (options.autoSessionTracking === undefined && options.dsn !== undefined) {
        options.autoSessionTracking = true;
    }
    // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
    if (domain__namespace.active) {
        setHubOnCarrier(carrier, getCurrentHub());
    }
    initAndBind(NodeClient, options);
    if (options.autoSessionTracking) {
        startSessionTracking();
    }
}
The Sentry Node SDK Client.

To use this SDK, call the {@link init} function as early as possible in the
main entry module. To set context information or send manual events, use the
provided methods.

@example
```

const { init } = require('@sentry/node');

init({
  dsn: '__DSN__',
  // ...
});
```

@example
```

const { configureScope } = require('@sentry/node');
configureScope((scope: Scope) => {
  scope.setExtra({ battery: 0.7 });
  scope.setTag({ user_mode: 'admin' });
  scope.setUser({ id: '4711' });
});
```

@example
```

const { addBreadcrumb } = require('@sentry/node');
addBreadcrumb({
  message: 'My Breadcrumb',
  // ...
});
```

@example
```

const Sentry = require('@sentry/node');
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
  message: 'Manual',
  stacktrace: [
    // ...
  ],
});
```

@see {@link NodeOptions} for documentation on configuration options.