Skip to content

Node.js ESM profiling frames not symbolicated — file:/// paths rejected by frame validation #109520

@Kobby-Bawuah

Description

@Kobby-Bawuah

Environment

SaaS (https://sentry.io/)

Steps to Reproduce

  1. Set up a Node.js (v22+) AWS Lambda project using ESM modules
  2. Configure @sentry/aws-serverless with @sentry/profiling-node and continuous profiling (profileLifecycle: 'trace')
  3. Upload sourcemaps with debug IDs via @sentry/esbuild-plugin
  4. Trigger a profiled transaction
  5. Open the trace waterfall, click into a span, and view the "Most Frequent Stacks in this Span" section
  6. Also view the Profiles tab flamegraph for the same transaction

Expected Result

Profiling stack frames should be symbolicated using the uploaded sourcemaps, showing original TypeScript source file paths, line numbers, and function namesl the same way error event stack traces are symbolicated.

Actual Result

Profiling frames are not symbolicated in either the "Most Frequent Stacks in this Span" section or the Profiles flamegraph.

Frames show bundled paths like file:///var/task/src/handlers/update-coin-prices.js with large column numbers (e.g., 249:12880), and the flamegraph shows minified function names like kW, U_e, MW. Error events from the same project symbolicate correctly.
Node.js ESM modules cause V8 to report script paths as file:/// URLs. The backend's NON_BUILTIN_PATH_REGEX in frame validation does not recognize file: as a valid scheme, so these frames are classified as built-in Node modules and silently discarded before reaching Symbolicator.

Related SDK-side issue that addressed a different part of the same file:/// problem: getsentry/sentry-javascript#18805

Product Area

Profiling

Link

No response

DSN

No response

Version

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Waiting for: Support

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions