add 'emit' column-numbers mode using pprof-format Line.column - #382
Merged
Conversation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Overall package sizeSelf size: 2.45 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | pprof-format | 2.3.0 | 503.97 kB | 503.97 kB | | source-map | 0.8.0 | 185.66 kB | 185.66 kB | | node-gyp-build | 4.8.4 | 13.86 kB | 13.86 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
|
szegedi
marked this pull request as ready for review
August 7, 2026 07:34
szegedi
requested review from
IlyasShabi,
nsavoire and
r1viollet
as code owners
August 7, 2026 07:34
IlyasShabi
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?:
Adds a new
'emit'value to thecolumnNumbersoption (alongside the existing'drop'and'pack'). In'emit'mode the serializer records the frame's column in the dedicated pprofLine.columnfield rather than packing it into the high 32 bits of the line field. This requirespprof-format >= 2.3.0(the version that addedLine.column), so the dependency is bumped from^2.2.1to^2.3.0.Like
'pack','emit'only carries a column for frames whose source map was declared but is missing locally — i.e. exactly the frames bound for server-side unminification (the same condition that setsdd:has-missing-map-files). Locally-resolved frames keep a plain line and no column, so column data never reaches profiles that skip server-side unminification.Motivation:
Server-side deobfuscation of minified Node.js/Next.js profiles needs the column number to discriminate between functions on a single (bundled) line. The existing
'pack'mode encodes the column into the line field, but that produces a non-standards-compliant line value.'emit'keeps the two concerns cleanly separated: the pprof file carries a realLine.column, and the Datadog backend does thecolumn << 32 | linepacking itself for Node.js profiles when it consumes the column field. The backend-side column parsing/packing has already landed.Additional Notes:
'drop'remains the default, so existing consumers are unaffected. This is purely additive.How to test the change?:
Covered by unit tests in
ts/test/test-profile-serializer.ts:'emit'populates the realLine.columnfield and keeps the line plain for a frame with a missing source map.'emit'carries no column for a frame with no missing map.Full serializer suite: 24 passing.
gts checkclean (one pre-existing unrelated warning inotel-thread-ctx.ts).Jira: PROF-15672