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 @@ -20,6 +20,7 @@ test('sends a server action span on pageload', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});

Expand All @@ -42,5 +43,6 @@ test('sends a server action span on client navigation', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ test('sends a server action span on pageload', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});

Expand All @@ -42,5 +43,6 @@ test('sends a server action span on client navigation', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test('sends a server action span on pageload', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});

Expand All @@ -40,5 +41,6 @@ test('sends a server action span on client navigation', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ test('sends a server action transaction on pageload', async ({ page }) => {
data: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',
'code.function.name': 'getPrefecture',
},
}),
]),
Expand All @@ -42,6 +43,7 @@ test('sends a server action transaction on client navigation', async ({ page })
data: {
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',
'code.function.name': 'getPrefecture',
},
}),
]),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ test('sends a server action span on pageload', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});

Expand All @@ -42,5 +43,6 @@ test('sends a server action span on client navigation', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ test('sends a server action span on pageload', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});

Expand All @@ -42,5 +43,6 @@ test('sends a server action span on client navigation', async ({ page }) => {
expect(functionSpan?.attributes).toMatchObject({
'sentry.op': { value: 'function', type: 'string' },
'sentry.origin': { value: 'auto.function.solidstart', type: 'string' },
'code.function.name': { value: 'getPrefecture', type: 'string' },
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { captureException, getActiveSpan, spanToJSON, startSpan } from '@sentry/
import { isRedirect } from './utils';
import {
SENTRY_SEGMENT_NAME_SOURCE,
CODE_FUNCTION_NAME,
HTTP_ROUTE,
HTTP_TARGET,
SENTRY_OP,
Expand Down Expand Up @@ -46,6 +47,7 @@ export async function withServerActionInstrumentation<A extends (...args: unknow
name: serverActionName,
attributes: {
[SENTRY_OP]: FUNCTION,
[CODE_FUNCTION_NAME]: serverActionName,
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',
[SENTRY_SEGMENT_NAME_SOURCE]: 'component',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SENTRY_SEGMENT_NAME_SOURCE } from '@sentry/conventions/attributes';
import { SENTRY_SEGMENT_NAME_SOURCE, CODE_FUNCTION_NAME } from '@sentry/conventions/attributes';
import * as SentryCore from '@sentry/core';
import * as SentryCoreServer from '@sentry/core/server';
import * as SentryNode from '@sentry/node';
Expand Down Expand Up @@ -102,6 +102,7 @@ describe('withServerActionInstrumentation', () => {
name: 'getPrefecture',
attributes: expect.objectContaining({
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'function',
[CODE_FUNCTION_NAME]: 'getPrefecture',
[SENTRY_SEGMENT_NAME_SOURCE]: 'component',
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.solidstart',
}),
Expand Down
Loading