getsentry / profiling-node

The code for this repo now lives in https://github.com/getsentry/sentry-javascript/tree/develop/packages/profiling-node
MIT License
29 stars 10 forks source link

Version 1.2.6 shows "Upgrade to version 1.2.0 of @sentry/profiling-node to enable memory usage collection" in UI #210

Open WillSmithTE opened 11 months ago

WillSmithTE commented 11 months ago

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

SDK Version

1.2.6

Link to Sentry event

https://ourlit-4.sentry.io/profiling/profile/marketplace/292b65b916b9426d9f92024f34cf425b/flamegraph

What environment is your node script running in?

Remix, Express, Node 20, ECS

How is your code deployed and bundled?

we build in a dockerfile from a github action with remix build then node ./server.js

Steps to Reproduce

This is how I init sentry

export function initMonitoring() {
    Sentry.init({
        dsn: sentryDsn,
        tracesSampleRate: 1,
        profilesSampleRate: 1,

        integrations: [
            new ProfilingIntegration(),
        ],
        environment,
    })
}

Expected Result

Couldn't see it in the docs, but I guess I should see memory and cpu usage in the profiling UI

Actual Result

No memory or cpu usage

Upgrade to version 1.2.0 of @sentry/profiling-node to enable CPU usage collection

Upgrade to version 1.2.0 of @sentry/profiling-node to enable memory usage collection

Screenshot 2023-11-17 at 09 06 59
JonasBa commented 8 months ago

Hey, we just improved the in-app messaging around this today as it was showing a false positive. Can you tell me if you are still seeing this or if there is a different message being shown?

In short, we only collect memory and CPU metrics at a roughly 100ms interval rate, meaning any profiles < 200ms might have less than 2 metrics collected, which is not enough to render a chart

TJEvans commented 8 months ago

The sample, 16ms duration, that was giving me this error before is now saying "Profile duration was too short to collect enough metrics" which aligns with your statement. I checked some longer samples, >200 ms, and am seeing some with "Profile has empty measurements" and other with data. Thank you for the update!

magnusburton commented 5 months ago

Hi! I'm still seeing this message. The profile I'm currently looking at is 8s. I'm on version 8.2.1