Set commit sha as release
This commit is contained in:
@@ -20,6 +20,10 @@ Sentry.init({
|
|||||||
],
|
],
|
||||||
replaysOnErrorSampleRate: 1,
|
replaysOnErrorSampleRate: 1,
|
||||||
replaysSessionSampleRate: 0.02,
|
replaysSessionSampleRate: 0.02,
|
||||||
|
release:
|
||||||
|
document
|
||||||
|
.querySelector("meta[name='commit_sha']")
|
||||||
|
?.getAttribute("content") ?? undefined,
|
||||||
sendDefaultPii: true,
|
sendDefaultPii: true,
|
||||||
tracesSampleRate: 0.1,
|
tracesSampleRate: 0.1,
|
||||||
tunnel: "/api/st",
|
tunnel: "/api/st",
|
||||||
|
|||||||
@@ -130,6 +130,7 @@ export async function loader({
|
|||||||
}): Promise<{ [k: string]: any }> {
|
}): Promise<{ [k: string]: any }> {
|
||||||
let data: { [k: string]: string } = {};
|
let data: { [k: string]: string } = {};
|
||||||
|
|
||||||
|
if (context.env.COMMIT_SHA) data.commit_sha = context.env.COMMIT_SHA;
|
||||||
if (context.data.current_user) data = { ...context.data.current_user };
|
if (context.data.current_user) data = { ...context.data.current_user };
|
||||||
if (context.env.REMIX_DSN) data.dsn = context.env.REMIX_DSN;
|
if (context.env.REMIX_DSN) data.dsn = context.env.REMIX_DSN;
|
||||||
if (context.data.nonce) data.nonce = context.data.nonce;
|
if (context.data.nonce) data.nonce = context.data.nonce;
|
||||||
@@ -202,6 +203,9 @@ function DocumentWrapper(props: {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
<meta charSet="UTF-8" />
|
<meta charSet="UTF-8" />
|
||||||
|
{loaderData.commit_sha ? (
|
||||||
|
<meta name="commit_sha" content={loaderData.commit_sha} />
|
||||||
|
) : null}
|
||||||
{loaderData.dsn ? (
|
{loaderData.dsn ? (
|
||||||
<meta name="dsn" content={loaderData.dsn} />
|
<meta name="dsn" content={loaderData.dsn} />
|
||||||
) : null}
|
) : null}
|
||||||
|
|||||||
@@ -383,6 +383,7 @@ async function setTheme(context: RequestContext) {
|
|||||||
export const onRequest = [
|
export const onRequest = [
|
||||||
Sentry.sentryPagesPlugin((context: RequestContext) => ({
|
Sentry.sentryPagesPlugin((context: RequestContext) => ({
|
||||||
dsn: context.env.FUNCTIONS_DSN,
|
dsn: context.env.FUNCTIONS_DSN,
|
||||||
|
release: context.env.COMMIT_SHA,
|
||||||
sendDefaultPii: true,
|
sendDefaultPii: true,
|
||||||
})),
|
})),
|
||||||
setAuth,
|
setAuth,
|
||||||
|
|||||||
Reference in New Issue
Block a user