profiling-node icon indicating copy to clipboard operation
profiling-node copied to clipboard

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

Open WillSmithTE opened this issue 2 years ago • 3 comments

Is there an existing issue for this?

  • [X] I have checked for existing issues https://github.com/getsentry/profiling-node/issues
  • [X] I have reviewed the documentation https://docs.sentry.io/
  • [X] I am using the latest SDK release https://github.com/getsentry/profiling-node/releases

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

WillSmithTE avatar Nov 17 '23 17:11 WillSmithTE

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

JonasBa avatar Feb 15 '24 19:02 JonasBa

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!

TJEvans avatar Feb 15 '24 20:02 TJEvans

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

magnusburton avatar May 22 '24 19:05 magnusburton