getsentry / sentry-javascript

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

Nuxt SDK - nothing sent to sentry, using startSpan don't send to "performance" #13523

Open samulefevre opened 3 weeks ago

samulefevre commented 3 weeks ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nuxt

SDK Version

8.27.0

Framework Version

Nuxt 3.13.0

Link to Sentry event

No response

Reproduction Example/SDK Setup

(I use tracesSampleRate: 1.0) Don't send anythings to sentry, startSpan and captureException. I use debug, no errors.

// public/instrument.server.mjs
import * as Sentry from "@sentry/nuxt";

Sentry.init({
  dsn: process.env.NUXT_PUBLIC_SENTRY_DSN,
  enabled: true,
  debug: true,
  tracesSampleRate: 1,
  environment: process.env.NODE_ENV,
});

I use in cloudflare workers, maybe it is the problem (don't know if this version is edge compatible). I use it in this project : https://github.com/samulefevre/nuxthub-starter

Have used this for setup: https://docs.sentry.io/platforms/javascript/guides/nuxt

Steps to Reproduce

return await startSpan(
    {
      name: 'updateAvatar Controller',
    },
    async () => {
// code here
})

Expected Result

Send to sentry dashboard in Performance tabs

Actual Result

No result in "Performance"

Lms24 commented 3 weeks ago

HI @samulefevre thanks for writing in! Cloudflare workers might be the problem here, you're right. @sentry/nuxt is still in alpha so it's likely that there are issues. Generally, cloudflare in combination with meta framework SDKs is something we're still working on figuring out. Gonna cc @s1gr1d when she's back to take a quick look.