Skip to content

Profile debug_meta.images is empty due to file:// path mismatch in getDebugImagesForResources #18805

Closed

Description

@Kobby-Bawuah

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

10.1.0

Framework Version

Node.js 22.x on AWS Lambda

Link to Sentry event

No response

Reproduction Example/SDK Setup

import * as Sentry from '@sentry/aws-serverless';
import { nodeProfilingIntegration } from '@sentry/profiling-node';

Sentry.init({
dsn: 'YOUR_DSN',
integrations: [nodeProfilingIntegration()],
tracesSampleRate: 0.75,
profileSessionSampleRate: 0.5,
profileLifecycle: 'trace',
});

Source maps uploaded via @sentry/esbuild-plugin with debug IDs injected.

Steps to Reproduce

  1. Set up Node.js profiling with @sentry/profiling-node on AWS Lambda
  2. Use @sentry/esbuild-plugin to bundle TypeScript to ESM (.mjs) with debug IDs injected
  3. Upload source maps to Sentry
  4. Trigger a profiled transaction
  5. Observe that error events have populated debug_meta.images and symbolicate correctly
  6. Observe that profile events have empty debug_meta.images and show minified paths like file:///var/task/index.mjs with bundled line numbers

Expected Result

Profile events should include populated debug_meta.images array with debug IDs, allowing flamegraphs to show original TypeScript file paths and line numbers (same as error events).

Actual Result

Profile events have empty debug_meta.images array. Flamegraphs show:

  • Paths like file:///var/task/packages/functions/src/internal/app.mjs
  • Bundled line numbers like 254965:21

Error events from the same codebase symbolicate correctly.

Root Cause:
In packages/core/src/utils/debug-ids.ts, getDebugImagesForResources() does a direct string lookup:

if (path && filenameDebugIdMap[path]) {However:

  • The stack parser (node-stack-trace.ts:112) strips file:// when building the debug ID map
  • V8 profiler returns resources WITH the file:// prefix

So the lookup for file:///var/task/index.mjs fails because the map key is /var/task/index.mjs.

The existing test passes because it uses mocked resources without file:// prefix.

However:
The stack parser (node-stack-trace.ts:112) strips file:// when building the debug ID map
V8 profiler returns resources WITH the file:// prefix
So the lookup for file:///var/task/index.mjs fails because the map key is /var/task/index.mjs.
The existing test passes because it uses mocked resources without file:// prefix.

Additional Context

No response

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Activity

  1. linear commented on Jan 13, 2026

    @linear
  2. moved this to Waiting for: Product Owner in GitHub Issues with 👀 3on Jan 13, 2026
  3. changed the title [-]Profile debug_meta.images is empty due to file:// path mismatch in getDebugImagesForResources[/-] [+]Profile `debug_meta.images` is empty due to `file://` path mismatch in `getDebugImagesForResources`[/+] on Jan 13, 2026
  4. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions