grafana / pyroscope-nodejs

Pyroscope NodeJS integration
Apache License 2.0
26 stars 18 forks source link

Restore fileName to anonymous function names #84

Closed jwatzman closed 2 months ago

jwatzman commented 2 months ago

Anonymous functions used to be named just (anonymous), but as of DataDog/pprof-nodejs#141 they are named things like (anonymous:L#42:C#16) which triggers the : detection here. That logic dates from commit dcca5749da3f82706500403f9a52493e120fa809 which predates the anonymous function name change, and so pretty clearly wasn't intended to cover it.

This change means that instead of anonymous functions being reported in pyroscope as just (anonymous:L#42:C#16), they are instead reported as ./dist/example.js:(anonymous:L#42:C#16):42 which is a lot more pleasant to work with.

CLAassistant commented 2 months ago

CLA assistant check
All committers have signed the CLA.

jwatzman commented 2 months ago

Sorry for delay, had to get permission from the CTO in order to sign, doing things by-the-book :) Signed now!

jwatzman commented 2 months ago

The CLA has been signed for a while now -- any chance this could be merged soon? Thanks!