Skip to content

Commit ea5e8e2

Browse files
committed
always delete overwrite
1 parent a5ef715 commit ea5e8e2

File tree

1 file changed

+5
-4
lines changed
  • packages/react-router/src/server

1 file changed

+5
-4
lines changed

packages/react-router/src/server/sdk.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,13 @@ export function init(options: NodeOptions): NodeClient | undefined {
5050
overwrite
5151
) {
5252
event.transaction = overwrite;
53-
delete event.contexts?.trace?.data?.[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE];
5453
event.contexts.trace.data[ATTR_HTTP_ROUTE] = 'url';
55-
return event;
56-
} else {
57-
return event;
5854
}
55+
56+
// always yeet this attribute into the void, as this should not reach the server
57+
delete event.contexts?.trace?.data?.[SEMANTIC_ATTRIBUTE_SENTRY_OVERWRITE];
58+
59+
return event;
5960
}) satisfies EventProcessor,
6061
{ id: 'ReactRouterTransactionEnhancer' },
6162
),

0 commit comments

Comments
 (0)