-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Profiles not sent by express SDK #14655
Comments
I believe @JonasBa mentioned recently that a root span needs to be active for a certain minimum amount of time (was it 20ms?) so that we can attach a profile. Any chance a too short root span is the problem? |
Hi there. No most of our spans are 20-100ms |
My root span is 907ms as well. |
I can reproduce this. Will spend some time today to figure out what's going on. |
Update: After some debugging, I think there are a couple of things that go wrong:
|
|
The duration is not the issue here. The txn lasts for over 2s in my repro and still the profile was not attached.
Not within v8 but between v7 and v8, with the entire hub/scope refactoring a lot changed. I'm not entirely sure tbh why the current scope at root span start is not applied to the event but with OTEL forking scopes on every span start, I suspect this can happen somehow. This could have also happened with a recent otel instrumentation update. The root span has the expected duration though so I'm not sure.
I think for span-based profiling, it's fine to switch from the current to the isolation scope to set the profiling id as proposed in #14681.
Yup, out of the three things I noticed, this is the one I haven't looked at in too much detail. |
@amardesai1 @rodolfoBee I merged the PR that should restore profiles being sent. It will be released in the next days with the next SDK release. The "max profile duration elapsed" message might still appear but I think it shouldn't influence profile collection. |
@Lms24 Thanks, could you please notify us when it's available? Then I can deploy it and see if we start seeing that profiling data. |
@amardesai1 You can subscribe to this PR which will trigger our release flow once it is merged: #14682 Also, you should receive an automatic reply on this issue once the release is published. (I'm notoriously bad at informing folks about releases, sorry in advance if I'm not gonna notify you anymore) |
A PR closing this issue has just been released 🚀This issue was referenced by PR #14681, which was included in the 8.45.0 release. |
@Lms24 Are the @sentry/profiling-node and @sentry/node packages available for update now? |
Yes :) |
Hi @Lms24 I ran nom update on these two packages and there was no update available. Thanks for your help |
If you run |
@Lms24 Thanks! Resolved |
Is there an existing issue for this?
How do you use Sentry?
Sentry Saas (sentry.io)
Which SDK are you using?
@sentry/node
SDK Version
8.42.0
Framework Version
express v4.18.2
Link to Sentry event
No response
Reproduction Example/SDK Setup
instrument.js
app code:
Steps to Reproduce
Expected Result
The SDK sends profiles and transactions to the Sentry project.
Actual Result
Transactions are sent but no profiles. Here is the SDK debug log attached. Noticeably are the lines:
These are the same log messages reported by the affected customer, which had profiles sent by the SDK normally prior to the update from v7.120.0 to v8.42.0
profilelogs.txt
The text was updated successfully, but these errors were encountered: