Skip to content

Commit 75bb639

Browse files
authored
Update pyroscope-nodejs integration (#3308)
This was required to support node v22 and to get rid of upstream pprof in favour of datadog/pprof
1 parent 774085f commit 75bb639

File tree

8 files changed

+127
-1307
lines changed

8 files changed

+127
-1307
lines changed

examples/language-sdk-instrumentation/nodejs/express-pull/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable */
22
const Pyroscope = require('@pyroscope/nodejs');
33

4-
const { expressMiddleware } = Pyroscope;
4+
const { expressMiddleware } = Pyroscope.default;
55

66
const port = process.env['PORT'] || 5000;
77

examples/language-sdk-instrumentation/nodejs/express-pull/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7+
"start": "node index.js",
78
"test": "echo \"Error: no test specified\" && exit 1"
89
},
910
"author": "",
1011
"license": "Apache-2.0",
1112
"dependencies": {
12-
"@pyroscope/nodejs": "0.3.3",
13-
"express": "^4.17.3",
13+
"@pyroscope/nodejs": "v0.3.9",
14+
"express": "^4.19.2",
1415
"morgan": "^1.10.0"
1516
},
1617
"resolutions": {

examples/language-sdk-instrumentation/nodejs/express-pull/yarn.lock

Lines changed: 38 additions & 430 deletions
Large diffs are not rendered by default.

examples/language-sdk-instrumentation/nodejs/express-ts/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
import express from 'express';
33
import morgan from 'morgan';
44

5-
import Pyroscope, { SourceMapper } from '@pyroscope/nodejs';
5+
import Pyroscope from '@pyroscope/nodejs';
6+
const SourceMapper = Pyroscope.SourceMapper;
67

78
const port = process.env['PORT'] || 5000;
89

examples/language-sdk-instrumentation/nodejs/express-ts/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
"author": "",
1111
"license": "Apache-2.0",
1212
"dependencies": {
13-
"@pyroscope/nodejs": "0.3.3",
14-
"axios": "^0.26.1",
15-
"express": "^4.17.3",
13+
"@pyroscope/nodejs": "0.3.9",
14+
"axios": "^0.28.0",
15+
"express": "^4.19.2",
1616
"morgan": "^1.10.0",
1717
"typescript": "^4.6.2"
1818
},

examples/language-sdk-instrumentation/nodejs/express-ts/yarn.lock

Lines changed: 39 additions & 438 deletions
Large diffs are not rendered by default.

examples/language-sdk-instrumentation/nodejs/express/package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,14 @@
44
"description": "",
55
"main": "index.js",
66
"scripts": {
7+
"start": "node index.js",
78
"test": "echo \"Error: no test specified\" && exit 1"
89
},
910
"author": "",
1011
"license": "Apache-2.0",
1112
"dependencies": {
12-
"@pyroscope/nodejs": "0.3.3",
13-
"express": "^4.17.3",
13+
"@pyroscope/nodejs": "0.3.9",
14+
"express": "^4.19.2",
1415
"morgan": "^1.10.0"
1516
},
1617
"resolutions": {

0 commit comments

Comments
 (0)