hiroshinishio / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
0 stars 0 forks source link

withServerActionInstrumentation serverActionName not passing to sentry #2

Open hiroshinishio opened 4 days ago

hiroshinishio commented 4 days ago

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

gitauto-ai[bot] commented 4 days ago

Click the checkbox below to generate a PR!

@hiroshinishio, You have 5 requests left in this cycle which refreshes on 2024-11-04 02:56:25+00:00. If you have any questions or concerns, please contact us at info@gitauto.ai.

gitauto-ai[bot] commented 4 days ago

Sorry, we have an error. Please try again.

Have feedback or need help? Feel free to email info@gitauto.ai.