#performance.measure not appearing

11 messages · Page 1 of 1 (latest)

strange valve
#

My app makes a performance.measure() call that's not appearing in Sentry.
I have tracesSampleRate set to 1.0 and I'm using the latest Sentry SDK.

The measure typically happens about 15-20s after initial page load. Do I need to tell Sentry about it because it's not happening during the page-load span? Or should Sentry be picking up marks and measures from later in the page lifetime automatically?

bleak cove
#

Which SDK are you using?

strange valve
#

I just upgraded to 9.x. It's a NextJS, so technically @sentry/nextjs, but the browser part is the standard browser SDK. I think it's resolved now. I'll check back in if I find something more concrete.

strange valve
#

The request from the browser to /monitoring returns a 200

And with debug: true, the API shows it receives the span, but drops it:

Sentry Logger [log]: [Tracing] Starting sampled root span
  op: < unknown op >
  name: GET /understand
Sentry Logger [log]: [Tracing] Finishing "< unknown op >" root span "GET /understand" with ID
Sentry Logger [log]: SpanExporter exported 1 spans, 0 spans are waiting for their parent spans to finish
Sentry Logger [error]: Transport disabled

I have confirmed the DSN is set correctly in both the browser and server.

#

Hypothesis: I have the DSN set in my Sentry.init(...), but not in my Sentry webpack config, so it's getting lost in the forwarder.

#

No. Setting sentryDsn in the webpack config made no change.

strange valve
strange valve
#

An example report to the Sentry API from the browser, no tunneling:

{"event_id":"734d7452a5a84d01b0f8f6fd8e4bb4df","sent_at":"2025-05-05T22:41:48.959Z","sdk":{"name":"sentry.javascript.nextjs","version":"9.15.0"},"trace":{"environment":"development","release":"3b140758564bbfd2de645537260b46eed8b7808a","public_key":"eab9d7cb300dad20443a57942614dc48","trace_id":"fb849c97b22c46b6ad7bab6454e57a04","transaction":"/understand","sampled":"true","sample_rand":"0.9844961768876307","sample_rate":"1"}}

That doesn't show up in Sentry's traces dashboard and https://clarasight.sentry.io/insights/frontend/summary/trace/734d7452a5a84d01b0f8f6fd8e4bb4df shows

This trace is so empty, even tumbleweeds don't roll here

#

The NextJS Sentry setup guide does say

Next.js version <15 only
You need to enable the instrumentation hook by setting the experimental.instrumentationHook to true in your next.config.(js|mjs) file.

which I had failed to do. But enabling it doesn't fix the problem. (The browser was already sending reports. They just weren't recevied)

bleak cove
#

do you see anything being dropped or filtered on your stats page?
This is happens when the SDK is not enabled or initialised yet, can you provide the full logs and how you configured the SDK.

Sentry Logger [error]: Transport disabled

if you are using SaaS Sentry, you can also reach out to support@sentry.io so we can see your organisations settings as well.

strange valve
#

I just checked again today and now all the spans from yesterday are in there. I wonder if there was a backlog in the pipeline.

Thank you for sticking with me on this one.