Open lforst opened 2 weeks ago
We noticed that we keep re-inventing the wheel when it comes to build time configuration with source map options.
To apply the learnings from the past, it would probably make sense to align the options across frameworks.
withSentryConfig
sentry
@sentry/nuxt/module
sentrySolidStartVite
"@sentry/gatsby"
We should decide on basically one interface to be implemented - arbitrarily extendable - that all of these frameworks agree on.
Strawman proposal:
interface BuildTimeOptions { org?: string; project?: string; authToken?: string; sentryUrl?: string; headers?: Record<string, string>; telemetry?: boolean; silent?: boolean; debug?: boolean; sourcemaps?: { disable?: boolean; assets?: string | string[]; ignore?: string | string[]; deleteSourcemapsAfterUpload?: boolean; }; release?: { name?: string; create?: boolean; finalize?: boolean; dist?: string; vcsRemote?: string; setCommits?: ( | { auto: true; repo?: undefined; commit?: undefined; } | { auto?: false | undefined; repo: string; commit: string; } ) & { previousCommit?: string; ignoreMissing?: boolean; ignoreEmpty?: boolean; }; deploy?: { env: string; started?: number | string; finished?: number | string; time?: number; name?: string; url?: string; }; }; bundleSizeOptimizations?: { excludeDebugStatements?: boolean; excludeTracing?: boolean; excludeReplayShadowDom?: boolean; excludeReplayIframe?: boolean; excludeReplayWorker?: boolean; }; unstable_sentryINSERTBUILDTOOLOFCHOICEHEREPluginOptions?: SentryINSERTBUILDTOOLOFCHOICEHEREPluginOptions; hideSourceMaps?: boolean; tunnelRoute?: string; disableLogger?: boolean; };
It is not necessary to implement all of these options right out the gate when building a new SDK, however, when deciding where to put an option we should follow the decided interface.
Removing any old options would of course be breaking. For now this task would only be additive - any breakage should be limited to at least v10.
Description
We noticed that we keep re-inventing the wheel when it comes to build time configuration with source map options.
To apply the learnings from the past, it would probably make sense to align the options across frameworks.
withSentryConfig
in Next.jssentry
config field for the@sentry/nuxt/module
modulesentry
integration in AstrosentrySolidStartVite
in SolidStart"@sentry/gatsby"
plugin for GatsbyWe should decide on basically one interface to be implemented - arbitrarily extendable - that all of these frameworks agree on.
Strawman proposal:
It is not necessary to implement all of these options right out the gate when building a new SDK, however, when deciding where to put an option we should follow the decided interface.