Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,14 +153,14 @@ test.describe('server - performance', () => {
trace_id: expect.any(String),
data: {
'sentry.origin': 'auto.http.react_router.loader',
'sentry.op': 'function.react-router.loader',
'sentry.op': 'function.react_router.loader',
},
description: 'Executing Server Loader',
parent_span_id: expect.any(String),
start_timestamp: expect.any(Number),
timestamp: expect.any(Number),
status: 'ok',
op: 'function.react-router.loader',
op: 'function.react_router.loader',
origin: 'auto.http.react_router.loader',
});
});
Expand Down Expand Up @@ -213,14 +213,14 @@ test.describe('server - performance', () => {
trace_id: expect.any(String),
data: {
'sentry.origin': 'auto.http.react_router.action',
'sentry.op': 'function.react-router.action',
'sentry.op': 'function.react_router.action',
},
description: 'Executing Server Action',
parent_span_id: expect.any(String),
start_timestamp: expect.any(Number),
timestamp: expect.any(Number),
status: 'ok',
op: 'function.react-router.action',
op: 'function.react_router.action',
origin: 'auto.http.react_router.action',
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,11 @@ test.describe('server - performance', () => {
span_id: expect.any(String),
trace_id: expect.any(String),
data: {
'sentry.op': 'function.react-router.loader',
'sentry.op': 'function.react_router.loader',
'sentry.origin': 'auto.http.react_router.server',
},
description: 'Executing Server Loader',
op: 'function.react-router.loader',
op: 'function.react_router.loader',
origin: 'auto.http.react_router.server',
parent_span_id: expect.any(String),
start_timestamp: expect.any(Number),
Expand Down Expand Up @@ -213,11 +213,11 @@ test.describe('server - performance', () => {
span_id: expect.any(String),
trace_id: expect.any(String),
data: {
'sentry.op': 'function.react-router.action',
'sentry.op': 'function.react_router.action',
'sentry.origin': 'auto.http.react_router.server',
},
description: 'Executing Server Action',
op: 'function.react-router.action',
op: 'function.react_router.action',
origin: 'auto.http.react_router.server',
parent_span_id: expect.any(String),
start_timestamp: expect.any(Number),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,14 @@ test.describe('server - performance', () => {
trace_id: expect.any(String),
data: {
'sentry.origin': 'auto.http.react_router',
'sentry.op': 'function.react-router.loader',
'sentry.op': 'function.react_router.loader',
},
description: 'Executing Server Loader',
parent_span_id: expect.any(String),
start_timestamp: expect.any(Number),
timestamp: expect.any(Number),
status: 'ok',
op: 'function.react-router.loader',
op: 'function.react_router.loader',
origin: 'auto.http.react_router',
});
});
Expand All @@ -150,14 +150,14 @@ test.describe('server - performance', () => {
trace_id: expect.any(String),
data: {
'sentry.origin': 'auto.http.react_router',
'sentry.op': 'function.react-router.action',
'sentry.op': 'function.react_router.action',
},
description: 'Executing Server Action',
parent_span_id: expect.any(String),
start_timestamp: expect.any(Number),
timestamp: expect.any(Number),
status: 'ok',
op: 'function.react-router.action',
op: 'function.react_router.action',
origin: 'auto.http.react_router',
});
});
Expand Down
6 changes: 3 additions & 3 deletions packages/react-router/src/server/instrumentation/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
*/
export function getOpName(pathName: string, requestMethod: string): string {
return isLoaderRequest(pathName, requestMethod)
? 'function.react-router.loader'
? 'function.react_router.loader'
: isActionRequest(pathName, requestMethod)
? 'function.react-router.action'
: 'function.react-router';
? 'function.react_router.action'
: 'function.react_router';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/src/server/wrapServerAction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function wrapServerAction<T>(options: SpanOptions = {}, actionFn: (args:
...options,
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react_router.action',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.action',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react_router.action',
...options.attributes,
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-router/src/server/wrapServerLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export function wrapServerLoader<T>(options: SpanOptions = {}, loaderFn: (args:
...options,
attributes: {
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react_router.loader',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.loader',
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react_router.loader',
...options.attributes,
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/react-router/test/server/wrapServerAction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('wrapServerAction', () => {
name: 'Executing Server Action',
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react_router.action',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.action',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react_router.action',
},
},
expect.any(Function),
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('wrapServerAction', () => {
name: 'Custom Action',
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react_router.action',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.action',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react_router.action',
'sentry.custom': 'value',
},
},
Expand Down
4 changes: 2 additions & 2 deletions packages/react-router/test/server/wrapServerLoader.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('wrapServerLoader', () => {
name: 'Executing Server Loader',
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react_router.loader',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.loader',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react_router.loader',
},
},
expect.any(Function),
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('wrapServerLoader', () => {
name: 'Custom Loader',
attributes: {
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.react_router.loader',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react-router.loader',
[core.SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function.react_router.loader',
'sentry.custom': 'value',
},
},
Expand Down
Loading