Skip to content

withServerActionInstrumentation serverActionName not passing to sentry #2

Open
@hiroshinishio

Description

@hiroshinishio

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

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions