Skip to content

withServerActionInstrumentation sets serverActionName to Unknown Server Component when using react compiler #13877

@BenGale

Description

@BenGale

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nextjs

SDK Version

8.33.1

Framework Version

15.0.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

No changes to the init code from the nextjs wizard.

Steps to Reproduce

Using the example code for wrapping a server action:

async function myServerAction(formData?: FormData) {
    'use server';
    return await Sentry.withServerActionInstrumentation(
      'myServerAction', // The name you want to associate this Server Action with in Sentry
      {
        formData, // Optionally pass in the form data
        headers: headers(), // Optionally pass in headers
        recordResponse: true, // Optionally record the server action response
      },
      async () => {
        throw new Error('I broke a thing');
      },
    );
  }

Expected Result

I would expect to see the name "myServerAction" in the issue in sentry.

Actual Result

"Unknown Server Component"

Image

Metadata

Metadata

Assignees

Labels

BugPackage: nextjsIssues related to the Sentry Nextjs SDK

Projects

Status

Waiting for: Product Owner

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions