Skip to content

PrivateCpuProfilerBindings.startProfiling is not a function #14561

Closed as not planned
@jbreckel

Description

@jbreckel

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/node

SDK Version

8.41.0

Framework Version

No response

Link to Sentry event

No response

Reproduction Example/SDK Setup

AWS Lambda Node 20

Sentry.init({
    dsn: SENTRY_DSN,
    environment: stage,
    integrations: [nodeProfilingIntegration()],
    release: 'not-defined',
    tracesSampleRate: 0.5,
    profilesSampleRate: 1.0,
    shutdownTimeout: 0.1,
});

Steps to Reproduce

  1. execute lambda
  2. wait for execution
  3. get error or expected result

Expected Result

get a reproducible result.
~ 4 out of 10 times the below described error gets thrown

Actual Result

sometimes a TypeError is thrown, most times not

{
    "errorType": "TypeError",
    "errorMessage": "PrivateCpuProfilerBindings.startProfiling is not a function",
    "stack": [
        "TypeError: PrivateCpuProfilerBindings.startProfiling is not a function",
        "    at Bindings.startProfiling (/var/task/index.js:67619:43)",
        "    at maybeProfileSpan (/var/task/index.js:67944:27)",
        "    at /var/task/index.js:67988:28",
        "    at /var/task/index.js:5588:43",
        "    at Array.forEach (<anonymous>)",
        "    at NodeClient.emit (/var/task/index.js:5588:21)",
        "    at /var/task/index.js:37635:41",
        "    at /var/task/index.js:37661:82",
        "    at _optionalChain$1 (/var/task/index.js:37635:19)",
        "    at onSpanStart (/var/task/index.js:37661:7)"
    ]
}

Metadata

Metadata

Assignees

Type

Projects

Status

Waiting for: Community

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions