MCPcopy Index your code
hub / github.com/getsentry/sentry-javascript / applyDefaultOptions

Function applyDefaultOptions

packages/browser/src/client.ts:171–182  ·  view source on GitHub ↗
(optionsArg: T)

Source from the content-addressed store, hash-verified

169
170/** Exported only for tests. */
171export function applyDefaultOptions<T extends Partial<BrowserClientOptions>>(optionsArg: T): T {
172 return {
173 release:
174 typeof __SENTRY_RELEASE__ === 'string' // This allows build tooling to find-and-replace __SENTRY_RELEASE__ to inject a release value
175 ? __SENTRY_RELEASE__
176 : WINDOW.SENTRY_RELEASE?.id, // This supports the variable that sentry-webpack-plugin injects
177 sendClientReports: true,
178 // We default this to true, as it is the safer scenario
179 parentSpanIsAlwaysRootSpan: true,
180 ...optionsArg,
181 };
182}

Callers 2

client.test.tsFile · 0.90
constructorMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected