From e6f30fc848fc02087c5c5d69f19358bffeefc28e Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 10 Sep 2026 17:43:16 +0200 Subject: [PATCH 1/2] feat(solid-start): Add `code.function.name` attribute to solid-start `function` spans --- .../solidstart-static/tests/performance.server.test.ts | 2 ++ .../solidstart/src/server/withServerActionInstrumentation.ts | 2 ++ .../test/server/withServerActionInstrumentation.test.ts | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/dev-packages/e2e-tests/test-applications/solidstart-static/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/solidstart-static/tests/performance.server.test.ts index 9ee3f4f43f1d..7d15bbe3eba8 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart-static/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart-static/tests/performance.server.test.ts @@ -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', }, }), ]), @@ -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', }, }), ]), diff --git a/packages/solidstart/src/server/withServerActionInstrumentation.ts b/packages/solidstart/src/server/withServerActionInstrumentation.ts index 8951d440637d..2c572a4f0e2a 100644 --- a/packages/solidstart/src/server/withServerActionInstrumentation.ts +++ b/packages/solidstart/src/server/withServerActionInstrumentation.ts @@ -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, @@ -46,6 +47,7 @@ export async function 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', }), From eabf20d4da7f1ce6e7678f0bce33735b0e739948 Mon Sep 17 00:00:00 2001 From: Lukas Stracke Date: Thu, 10 Sep 2026 17:45:46 +0200 Subject: [PATCH 2/2] adjust e2e tests --- .../solidstart-2/tests/performance.server.test.ts | 2 ++ .../solidstart-dynamic-import/tests/performance.server.test.ts | 2 ++ .../solidstart-spa/tests/performance.server.test.ts | 2 ++ .../tests/performance.server.test.ts | 2 ++ .../solidstart/tests/performance.server.test.ts | 2 ++ 5 files changed, 10 insertions(+) diff --git a/dev-packages/e2e-tests/test-applications/solidstart-2/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/solidstart-2/tests/performance.server.test.ts index 0d636a5c423c..e2e668c9ec90 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart-2/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart-2/tests/performance.server.test.ts @@ -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' }, }); }); @@ -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' }, }); }); diff --git a/dev-packages/e2e-tests/test-applications/solidstart-dynamic-import/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/solidstart-dynamic-import/tests/performance.server.test.ts index 01981e8aa78c..35e412bbc02f 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart-dynamic-import/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart-dynamic-import/tests/performance.server.test.ts @@ -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' }, }); }); @@ -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' }, }); }); diff --git a/dev-packages/e2e-tests/test-applications/solidstart-spa/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/solidstart-spa/tests/performance.server.test.ts index 59e81a6c521c..595ba0e28d80 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart-spa/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart-spa/tests/performance.server.test.ts @@ -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' }, }); }); @@ -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' }, }); }); diff --git a/dev-packages/e2e-tests/test-applications/solidstart-top-level-import/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/solidstart-top-level-import/tests/performance.server.test.ts index 1881c58450ee..3a0e22e02f44 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart-top-level-import/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart-top-level-import/tests/performance.server.test.ts @@ -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' }, }); }); @@ -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' }, }); }); diff --git a/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.server.test.ts b/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.server.test.ts index c41660da02a9..251a1601ae53 100644 --- a/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.server.test.ts +++ b/dev-packages/e2e-tests/test-applications/solidstart/tests/performance.server.test.ts @@ -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' }, }); }); @@ -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' }, }); });