diff --git a/packages/aws-serverless/src/sdk.ts b/packages/aws-serverless/src/sdk.ts index f64b62b9a373..2bd4de0a4bdd 100644 --- a/packages/aws-serverless/src/sdk.ts +++ b/packages/aws-serverless/src/sdk.ts @@ -306,11 +306,11 @@ export function wrapHandler( if (options.captureAllSettledReasons && Array.isArray(rv) && isPromiseAllSettledResult(rv)) { const reasons = getRejectedReasons(rv); reasons.forEach(exception => { - captureException(exception, scope => markEventUnhandled(scope)); + captureException(exception, scope => markEventUnhandled(scope, 'aws-serverless.promise')); }); } } catch (e) { - captureException(e, scope => markEventUnhandled(scope)); + captureException(e, scope => markEventUnhandled(scope, 'aws-serverless.handler')); throw e; } finally { clearTimeout(timeoutWarningTimer); diff --git a/packages/aws-serverless/src/utils.ts b/packages/aws-serverless/src/utils.ts index f1b0389743cb..a7a5ea300596 100644 --- a/packages/aws-serverless/src/utils.ts +++ b/packages/aws-serverless/src/utils.ts @@ -26,9 +26,9 @@ const headerGetter: TextMapGetter = { /** * Marks an event as unhandled by adding a span processor to the passed scope. */ -export function markEventUnhandled(scope: Scope): Scope { +export function markEventUnhandled(scope: Scope, type = 'aws-serverless'): Scope { scope.addEventProcessor(event => { - addExceptionMechanism(event, { handled: false }); + addExceptionMechanism(event, { handled: false, type }); return event; }); diff --git a/packages/browser/src/helpers.ts b/packages/browser/src/helpers.ts index 362020a8d845..1cbe226438f3 100644 --- a/packages/browser/src/helpers.ts +++ b/packages/browser/src/helpers.ts @@ -133,7 +133,12 @@ export function wrap( return event; }); - captureException(ex); + captureException(ex, { + mechanism: { + handled: false, + type: 'browser', + }, + }); }); throw ex; diff --git a/packages/core/src/client.ts b/packages/core/src/client.ts index 8b03392106d9..27eceec3473e 100644 --- a/packages/core/src/client.ts +++ b/packages/core/src/client.ts @@ -1159,6 +1159,10 @@ export abstract class Client { } this.captureException(reason, { + mechanism: { + handled: false, + type: 'internal', + }, data: { __sentry__: true, }, diff --git a/packages/core/src/integrations/supabase.ts b/packages/core/src/integrations/supabase.ts index 360f31142652..61d9696f6df8 100644 --- a/packages/core/src/integrations/supabase.ts +++ b/packages/core/src/integrations/supabase.ts @@ -236,6 +236,7 @@ function instrumentAuthOperation(operation: AuthOperationFn, isAdmin = false): A captureException(res.error, { mechanism: { handled: false, + type: 'supabase', }, }); } else { @@ -252,6 +253,7 @@ function instrumentAuthOperation(operation: AuthOperationFn, isAdmin = false): A captureException(err, { mechanism: { handled: false, + type: 'supabase', }, }); @@ -417,6 +419,10 @@ function instrumentPostgRESTFilterBuilder(PostgRESTFilterBuilder: PostgRESTFilte } captureException(err, { + mechanism: { + handled: false, + type: 'supabase', + }, contexts: { supabase: supabaseContext, }, diff --git a/packages/core/src/trpc.ts b/packages/core/src/trpc.ts index beac8c5b4c4c..55d337ab45fa 100644 --- a/packages/core/src/trpc.ts +++ b/packages/core/src/trpc.ts @@ -19,7 +19,7 @@ export interface SentryTrpcMiddlewareArguments { getRawInput?: () => Promise; } -const trpcCaptureContext = { mechanism: { handled: false, data: { function: 'trpcMiddleware' } } }; +const trpcCaptureContext = { mechanism: { handled: false, type: 'trpc', data: { function: 'trpcMiddleware' } } }; function captureIfError(nextResult: unknown): void { // TODO: Set span status based on what TRPCError was encountered diff --git a/packages/core/src/utils/openai/index.ts b/packages/core/src/utils/openai/index.ts index bb8e4f983ee7..5f994a5c2cb2 100644 --- a/packages/core/src/utils/openai/index.ts +++ b/packages/core/src/utils/openai/index.ts @@ -205,6 +205,7 @@ function instrumentMethod( captureException(error, { mechanism: { handled: false, + type: 'openai', }, }); span.end(); @@ -230,7 +231,12 @@ function instrumentMethod( addResponseAttributes(span, result, finalOptions.recordOutputs); return result; } catch (error) { - captureException(error); + captureException(error, { + mechanism: { + handled: false, + type: 'openai', + }, + }); throw error; } }, diff --git a/packages/core/src/utils/openai/streaming.ts b/packages/core/src/utils/openai/streaming.ts index 88d4c6adf893..023dfd558403 100644 --- a/packages/core/src/utils/openai/streaming.ts +++ b/packages/core/src/utils/openai/streaming.ts @@ -96,6 +96,7 @@ function processResponsesApiEvent( captureException(streamEvent, { mechanism: { handled: false, + type: 'openai', }, }); return; diff --git a/packages/google-cloud-serverless/src/gcpfunction/cloud_events.ts b/packages/google-cloud-serverless/src/gcpfunction/cloud_events.ts index a5e9f886165d..b230c0dab865 100644 --- a/packages/google-cloud-serverless/src/gcpfunction/cloud_events.ts +++ b/packages/google-cloud-serverless/src/gcpfunction/cloud_events.ts @@ -49,7 +49,7 @@ function _wrapCloudEventFunction( const newCallback = domainify((...args: unknown[]) => { if (args[0] !== null && args[0] !== undefined) { - captureException(args[0], scope => markEventUnhandled(scope)); + captureException(args[0], scope => markEventUnhandled(scope, 'google-cloud-serverless.cloud_event')); } span.end(); @@ -69,7 +69,7 @@ function _wrapCloudEventFunction( return handleCallbackErrors( () => (fn as CloudEventFunctionWithCallback)(context, newCallback), err => { - captureException(err, scope => markEventUnhandled(scope)); + captureException(err, scope => markEventUnhandled(scope, 'google-cloud-serverless.cloud_event')); }, ); } diff --git a/packages/google-cloud-serverless/src/gcpfunction/events.ts b/packages/google-cloud-serverless/src/gcpfunction/events.ts index 2fece298ea05..ced4d96f27d4 100644 --- a/packages/google-cloud-serverless/src/gcpfunction/events.ts +++ b/packages/google-cloud-serverless/src/gcpfunction/events.ts @@ -52,7 +52,7 @@ function _wrapEventFunction const newCallback = domainify((...args: unknown[]) => { if (args[0] !== null && args[0] !== undefined) { - captureException(args[0], scope => markEventUnhandled(scope)); + captureException(args[0], scope => markEventUnhandled(scope, 'google-cloud-serverless.event')); } span.end(); @@ -72,7 +72,7 @@ function _wrapEventFunction return handleCallbackErrors( () => (fn as EventFunctionWithCallback)(data, context, newCallback), err => { - captureException(err, scope => markEventUnhandled(scope)); + captureException(err, scope => markEventUnhandled(scope, 'google-cloud-serverless.event')); }, ); } diff --git a/packages/google-cloud-serverless/src/gcpfunction/http.ts b/packages/google-cloud-serverless/src/gcpfunction/http.ts index 46683372fa53..ea5533f1f946 100644 --- a/packages/google-cloud-serverless/src/gcpfunction/http.ts +++ b/packages/google-cloud-serverless/src/gcpfunction/http.ts @@ -78,7 +78,7 @@ function _wrapHttpFunction(fn: HttpFunction, options: Partial): return handleCallbackErrors( () => fn(req, res), err => { - captureException(err, scope => markEventUnhandled(scope)); + captureException(err, scope => markEventUnhandled(scope, 'google-cloud-serverless.http')); }, ); }, diff --git a/packages/google-cloud-serverless/src/utils.ts b/packages/google-cloud-serverless/src/utils.ts index cdefdb460ee3..88c11f0274c8 100644 --- a/packages/google-cloud-serverless/src/utils.ts +++ b/packages/google-cloud-serverless/src/utils.ts @@ -43,9 +43,9 @@ export function proxyFunction R>( /** * Marks an event as unhandled by adding a span processor to the passed scope. */ -export function markEventUnhandled(scope: Scope): Scope { +export function markEventUnhandled(scope: Scope, type = 'google-cloud-serverless'): Scope { scope.addEventProcessor(event => { - addExceptionMechanism(event, { handled: false }); + addExceptionMechanism(event, { handled: false, type }); return event; }); diff --git a/packages/nestjs/src/decorators.ts b/packages/nestjs/src/decorators.ts index 7ac4941be877..b680cd71e9fa 100644 --- a/packages/nestjs/src/decorators.ts +++ b/packages/nestjs/src/decorators.ts @@ -19,12 +19,22 @@ export const SentryCron = (monitorSlug: string, monitorConfig?: MonitorConfig): try { result = originalMethod.apply(this, args); } catch (e) { - captureException(e); + captureException(e, { + mechanism: { + handled: false, + type: 'nestjs.cron', + }, + }); throw e; } if (isThenable(result)) { return result.then(undefined, e => { - captureException(e); + captureException(e, { + mechanism: { + handled: false, + type: 'nestjs.cron', + }, + }); throw e; }); } @@ -77,7 +87,12 @@ export function SentryExceptionCaptured() { return originalCatch.apply(this, [exception, host, ...args]); } - captureException(exception); + captureException(exception, { + mechanism: { + handled: true, // User provided exception filter to handle the error + type: 'nestjs.exception-filter', + }, + }); return originalCatch.apply(this, [exception, host, ...args]); }; diff --git a/packages/nestjs/src/integrations/sentry-nest-event-instrumentation.ts b/packages/nestjs/src/integrations/sentry-nest-event-instrumentation.ts index a572bb93a52f..dbb468a79d83 100644 --- a/packages/nestjs/src/integrations/sentry-nest-event-instrumentation.ts +++ b/packages/nestjs/src/integrations/sentry-nest-event-instrumentation.ts @@ -109,7 +109,12 @@ export class SentryNestEventInstrumentation extends InstrumentationBase { return result; } catch (error) { // exceptions from event handlers are not caught by global error filter - captureException(error); + captureException(error, { + mechanism: { + handled: false, + type: 'nestjs.event', + }, + }); throw error; } }); diff --git a/packages/nestjs/src/setup.ts b/packages/nestjs/src/setup.ts index c1af5938e3c2..d5f8529392c5 100644 --- a/packages/nestjs/src/setup.ts +++ b/packages/nestjs/src/setup.ts @@ -101,7 +101,12 @@ class SentryGlobalFilter extends BaseExceptionFilter { this._logger.error(exception.message, exception.stack); } - captureException(exception); + captureException(exception, { + mechanism: { + handled: false, + type: 'nestjs.graphql', + }, + }); throw exception; } @@ -117,7 +122,12 @@ class SentryGlobalFilter extends BaseExceptionFilter { // Handle any other kind of error if (!(exception instanceof Error)) { if (!isExpectedError(exception)) { - captureException(exception); + captureException(exception, { + mechanism: { + handled: false, + type: 'nestjs.rpc', + }, + }); } throw exception; } @@ -125,7 +135,12 @@ class SentryGlobalFilter extends BaseExceptionFilter { // In this case we're likely running into an RpcException, which the user should handle with a dedicated filter // https://github.com/nestjs/nest/blob/master/sample/03-microservices/src/common/filters/rpc-exception.filter.ts if (!isExpectedError(exception)) { - captureException(exception); + captureException(exception, { + mechanism: { + handled: false, + type: 'nestjs.rpc', + }, + }); } this._logger.warn( @@ -139,7 +154,12 @@ class SentryGlobalFilter extends BaseExceptionFilter { // HTTP exceptions if (!isExpectedError(exception)) { - captureException(exception); + captureException(exception, { + mechanism: { + handled: false, + type: 'nestjs.http', + }, + }); } return super.catch(exception, host); diff --git a/packages/nextjs/src/common/captureRequestError.ts b/packages/nextjs/src/common/captureRequestError.ts index fec9d46d0e65..e71eb2ee0f1a 100644 --- a/packages/nextjs/src/common/captureRequestError.ts +++ b/packages/nextjs/src/common/captureRequestError.ts @@ -38,6 +38,7 @@ export function captureRequestError(error: unknown, request: RequestInfo, errorC captureException(error, { mechanism: { handled: false, + type: 'nextjs.request', }, }); diff --git a/packages/nextjs/src/common/pages-router-instrumentation/_error.ts b/packages/nextjs/src/common/pages-router-instrumentation/_error.ts index b33c648839fa..b6f93a92598d 100644 --- a/packages/nextjs/src/common/pages-router-instrumentation/_error.ts +++ b/packages/nextjs/src/common/pages-router-instrumentation/_error.ts @@ -45,7 +45,7 @@ export async function captureUnderscoreErrorException(contextOrProps: ContextOrP // is what passing a string to `captureException` will wind up doing) captureException(err || `_error.js called with falsy error (${err})`, { mechanism: { - type: 'instrument', + type: 'nextjs.error', handled: false, data: { function: '_error.getInitialProps', diff --git a/packages/nextjs/src/common/pages-router-instrumentation/wrapApiHandlerWithSentry.ts b/packages/nextjs/src/common/pages-router-instrumentation/wrapApiHandlerWithSentry.ts index ba50778d30ad..fd5cfe659239 100644 --- a/packages/nextjs/src/common/pages-router-instrumentation/wrapApiHandlerWithSentry.ts +++ b/packages/nextjs/src/common/pages-router-instrumentation/wrapApiHandlerWithSentry.ts @@ -110,7 +110,7 @@ export function wrapApiHandlerWithSentry(apiHandler: NextApiHandler, parameteriz captureException(objectifiedErr, { mechanism: { - type: 'instrument', + type: 'nextjs.api', handled: false, data: { wrapped_handler: wrappingTarget.name, diff --git a/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts b/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts index b08bdad5e9ab..87026bd4a369 100644 --- a/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts +++ b/packages/nextjs/src/common/pages-router-instrumentation/wrapPageComponentWithSentry.ts @@ -48,6 +48,7 @@ export function wrapPageComponentWithSentry(pageComponent: FunctionComponent | C captureException(e, { mechanism: { handled: false, + type: 'nextjs.page', }, }); throw e; @@ -77,6 +78,7 @@ export function wrapPageComponentWithSentry(pageComponent: FunctionComponent | C captureException(e, { mechanism: { handled: false, + type: 'nextjs.page', }, }); throw e; diff --git a/packages/nextjs/src/common/utils/wrapperUtils.ts b/packages/nextjs/src/common/utils/wrapperUtils.ts index 23b960c857cf..d8773933048b 100644 --- a/packages/nextjs/src/common/utils/wrapperUtils.ts +++ b/packages/nextjs/src/common/utils/wrapperUtils.ts @@ -25,7 +25,7 @@ export function withErrorInstrumentation any>( return await origFunction.apply(this, origFunctionArguments); } catch (e) { // TODO: Extract error logic from `withSentry` in here or create a new wrapper with said logic or something like that. - captureException(e, { mechanism: { handled: false } }); + captureException(e, { mechanism: { handled: false, type: 'nextjs' } }); throw e; } }; @@ -99,7 +99,7 @@ export async function callDataFetcherTraced Promis try { return await origFunction(...origFunctionArgs); } catch (e) { - captureException(e, { mechanism: { handled: false } }); + captureException(e, { mechanism: { handled: false, type: 'nextjs' } }); throw e; } } diff --git a/packages/nextjs/src/common/withServerActionInstrumentation.ts b/packages/nextjs/src/common/withServerActionInstrumentation.ts index e3cc2831d5e4..39af5a46bfcb 100644 --- a/packages/nextjs/src/common/withServerActionInstrumentation.ts +++ b/packages/nextjs/src/common/withServerActionInstrumentation.ts @@ -130,6 +130,7 @@ async function withServerActionInstrumentationImplementation a captureException(err, { mechanism: { handled: false, + type: 'nextjs.generation-function', }, }); } diff --git a/packages/nextjs/src/common/wrapMiddlewareWithSentry.ts b/packages/nextjs/src/common/wrapMiddlewareWithSentry.ts index 3a9ca786d697..6b5735c5d578 100644 --- a/packages/nextjs/src/common/wrapMiddlewareWithSentry.ts +++ b/packages/nextjs/src/common/wrapMiddlewareWithSentry.ts @@ -102,7 +102,7 @@ export function wrapMiddlewareWithSentry( error => { captureException(error, { mechanism: { - type: 'instrument', + type: 'nextjs.middleware', handled: false, }, }); diff --git a/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts b/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts index e1a2238b05a1..e61900d85476 100644 --- a/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts +++ b/packages/nextjs/src/common/wrapRouteHandlerWithSentry.ts @@ -90,6 +90,7 @@ export function wrapRouteHandlerWithSentry any>( captureException(error, { mechanism: { handled: false, + type: 'nextjs.route', }, }); } diff --git a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts index 9dd097cb75ae..8d2e7bce011b 100644 --- a/packages/nextjs/src/common/wrapServerComponentWithSentry.ts +++ b/packages/nextjs/src/common/wrapServerComponentWithSentry.ts @@ -130,6 +130,7 @@ export function wrapServerComponentWithSentry any> captureException(error, { mechanism: { handled: false, + type: 'nextjs.server-component', }, }); } diff --git a/packages/nextjs/src/edge/wrapApiHandlerWithSentry.ts b/packages/nextjs/src/edge/wrapApiHandlerWithSentry.ts index 466eb19eb1d1..a7c03910e154 100644 --- a/packages/nextjs/src/edge/wrapApiHandlerWithSentry.ts +++ b/packages/nextjs/src/edge/wrapApiHandlerWithSentry.ts @@ -82,7 +82,7 @@ export function wrapApiHandlerWithSentry( error => { captureException(error, { mechanism: { - type: 'instrument', + type: 'nextjs.edge', handled: false, }, }); diff --git a/packages/node-core/src/cron/cron.ts b/packages/node-core/src/cron/cron.ts index ce6225ced2fa..457e1d713429 100644 --- a/packages/node-core/src/cron/cron.ts +++ b/packages/node-core/src/cron/cron.ts @@ -99,7 +99,12 @@ export function instrumentCron(lib: T & CronJobConstructor, monitorSlug: stri try { await onTick(context, onComplete); } catch (e) { - captureException(e); + captureException(e, { + mechanism: { + handled: false, + type: 'cron', + }, + }); throw e; } }, @@ -136,7 +141,12 @@ export function instrumentCron(lib: T & CronJobConstructor, monitorSlug: stri try { await onTick(context, onComplete); } catch (e) { - captureException(e); + captureException(e, { + mechanism: { + handled: false, + type: 'cron', + }, + }); throw e; } }, diff --git a/packages/node-core/src/cron/node-cron.ts b/packages/node-core/src/cron/node-cron.ts index 5b9e48900287..63214b2c939e 100644 --- a/packages/node-core/src/cron/node-cron.ts +++ b/packages/node-core/src/cron/node-cron.ts @@ -53,7 +53,12 @@ export function instrumentNodeCron(lib: Partial & T): T { try { return await callback(); } catch (e) { - captureException(e); + captureException(e, { + mechanism: { + handled: false, + type: 'cron', + }, + }); throw e; } }, diff --git a/packages/node-core/src/integrations/childProcess.ts b/packages/node-core/src/integrations/childProcess.ts index 6fc6046c7e2f..910f180ffd48 100644 --- a/packages/node-core/src/integrations/childProcess.ts +++ b/packages/node-core/src/integrations/childProcess.ts @@ -99,7 +99,7 @@ function captureWorkerThreadEvents(worker: Worker, options: Options): void { .on('error', error => { if (options.captureWorkerErrors !== false) { captureException(error, { - mechanism: { type: 'instrument', handled: false, data: { threadId: String(threadId) } }, + mechanism: { type: 'worker_thread', handled: false, data: { threadId: String(threadId) } }, }); } else { addBreadcrumb({ diff --git a/packages/node/src/integrations/tracing/connect.ts b/packages/node/src/integrations/tracing/connect.ts index c2ab3716bd33..ed19c90fdd98 100644 --- a/packages/node/src/integrations/tracing/connect.ts +++ b/packages/node/src/integrations/tracing/connect.ts @@ -48,7 +48,12 @@ export const connectIntegration = defineIntegration(_connectIntegration); // eslint-disable-next-line @typescript-eslint/no-explicit-any function connectErrorMiddleware(err: any, req: any, res: any, next: any): void { - captureException(err); + captureException(err, { + mechanism: { + handled: false, + type: 'connect', + }, + }); next(err); } diff --git a/packages/node/src/integrations/tracing/koa.ts b/packages/node/src/integrations/tracing/koa.ts index 487f471a9a12..4dc2f1403c87 100644 --- a/packages/node/src/integrations/tracing/koa.ts +++ b/packages/node/src/integrations/tracing/koa.ts @@ -134,7 +134,12 @@ export const setupKoaErrorHandler = (app: { use: (arg0: (ctx: any, next: any) => try { await next(); } catch (error) { - captureException(error); + captureException(error, { + mechanism: { + handled: false, + type: 'koa', + }, + }); throw error; } }); diff --git a/packages/nuxt/src/runtime/hooks/captureErrorHook.ts b/packages/nuxt/src/runtime/hooks/captureErrorHook.ts index 7a27b7e6e4c6..b39cd345e682 100644 --- a/packages/nuxt/src/runtime/hooks/captureErrorHook.ts +++ b/packages/nuxt/src/runtime/hooks/captureErrorHook.ts @@ -40,7 +40,7 @@ export async function sentryCaptureErrorHook(error: Error, errorContext: Capture captureException(error, { captureContext: { contexts: { nuxt: structuredContext } }, - mechanism: { handled: false }, + mechanism: { handled: false, type: 'nuxt' }, }); await flushIfServerless(); diff --git a/packages/nuxt/src/runtime/utils.ts b/packages/nuxt/src/runtime/utils.ts index 29abbe23ec62..65e5502a5e64 100644 --- a/packages/nuxt/src/runtime/utils.ts +++ b/packages/nuxt/src/runtime/utils.ts @@ -81,7 +81,7 @@ export function reportNuxtError(options: { setTimeout(() => { captureException(error, { captureContext: { contexts: { nuxt: metadata } }, - mechanism: { handled: false }, + mechanism: { handled: false, type: 'nuxt' }, }); }); } diff --git a/packages/react/src/error.ts b/packages/react/src/error.ts index ca5ccd8b2698..bd7da2d3e2bb 100644 --- a/packages/react/src/error.ts +++ b/packages/react/src/error.ts @@ -95,7 +95,7 @@ export function reactErrorHandler( ): (error: any, errorInfo: ErrorInfo) => void { // eslint-disable-next-line @typescript-eslint/no-explicit-any return (error: any, errorInfo: ErrorInfo) => { - const eventId = captureReactException(error, errorInfo); + const eventId = captureReactException(error, errorInfo, { mechanism: { handled: false, type: 'react' } }); if (callback) { callback(error, errorInfo, eventId); } diff --git a/packages/react/src/errorboundary.tsx b/packages/react/src/errorboundary.tsx index f37afe961042..da97cb8dcfa8 100644 --- a/packages/react/src/errorboundary.tsx +++ b/packages/react/src/errorboundary.tsx @@ -123,7 +123,7 @@ class ErrorBoundary extends React.Component void): JSX.Element => { - captureException(error); + captureException(error, { + mechanism: { + handled: true, // User provided fallback function to handle the error + type: 'solid', + }, + }); const f = local.fallback; return typeof f === 'function' ? f(error, reset) : f; diff --git a/packages/vue/src/router.ts b/packages/vue/src/router.ts index 2506fd220207..0f2e8a02c345 100644 --- a/packages/vue/src/router.ts +++ b/packages/vue/src/router.ts @@ -52,7 +52,7 @@ export function instrumentVueRouter( ): void { let hasHandledFirstPageLoad = false; - router.onError(error => captureException(error, { mechanism: { handled: false } })); + router.onError(error => captureException(error, { mechanism: { handled: false, type: 'vue' } })); router.beforeEach((to, _from, next) => { // We avoid trying to re-fetch the page load span when we know we already handled it the first time