-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#132] pinpoint node agent instruments debugging
* active trace is no needs. If ActiveCount enable, It needs to be enable * Changes Spring boot demo port * Pinpoint http server demo * Test fixtures for http-server rollback activeTrace data
- Loading branch information
Showing
19 changed files
with
96 additions
and
184 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PINPOINT_COLLECTOR_IP=localhost | ||
PINPOINT_APPLICATION_NAME=http-node-sample-name | ||
PINPOINT_AGENT_ID=http-node-sample-id | ||
PINPOINT_SAMPLING_RATE=1 | ||
PINPOINT_LOG_LEVEL=DEBUG | ||
_PINPOINT_TRACE_EXCLUSION_URL_PATTERN=/api | ||
_PINPOINT_TRACE_EXCLUSION_URL_CACHE_SIZE=3 | ||
_GRPC_VERBOSITY=DEBUG | ||
_GRPC_TRACE=call_stream |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import 'dotenv/config' | ||
import 'pinpoint-node-agent'; | ||
import http from 'http'; | ||
import axios from 'axios'; | ||
|
||
const host = 'localhost'; | ||
const port = 8000; | ||
|
||
const requestListener = function (req, res) { | ||
(async () => { | ||
try { | ||
axios.get('http://localhost:7010/api') | ||
.then(function (response) { | ||
// handle success | ||
console.log(response); | ||
res.writeHead(200); | ||
res.end(response.data); | ||
}) | ||
.catch(function (error) { | ||
// handle error | ||
console.log(error); | ||
}) | ||
.finally(function () { | ||
// always executed | ||
}); | ||
} catch (error) { | ||
res.status(500).send(response); | ||
res.writeHead(500); | ||
res.end("My first server!"); | ||
} | ||
})(); | ||
}; | ||
|
||
const server = http.createServer(requestListener); | ||
server.listen(port, host, () => { | ||
console.log(`Server is running on http://${host}:${port}`); | ||
}); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"name": "http-server", | ||
"version": "1.0.0", | ||
"description": "HTTP module Test", | ||
"type": "module", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "npm test" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"dependencies": { | ||
"axios": "^1.3.2", | ||
"dotenv": "^16.0.3", | ||
"node-fetch": "^2.6.11" | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
|
||
server.port = 7010 |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"name": "pinpoint-node-agent", | ||
"version": "0.8.3", | ||
"version": "0.8.4-next.1", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "./node_modules/.bin/tape ./test/**/*.test.js", | ||
"lint": "./node_modules/.bin/eslint -f checkstyle ./lib > checkstyle-result.xml;exit 0", | ||
"test": "tape ./test/**/*.test.js", | ||
"lint": "eslint -f checkstyle ./lib > checkstyle-result.xml;exit 0", | ||
"coverage": "nyc --reporter=lcov --reporter=text-summary npm run test" | ||
}, | ||
"description": "Pinpoint node agent provided by NAVER", | ||
|
@@ -13,8 +13,6 @@ | |
"url": "https://github.com/pinpoint-apm/pinpoint-node-agent" | ||
}, | ||
"contributors": [ | ||
"Lee Jun Hee <[email protected]> (https://github.com/intojun)", | ||
"Bae Keun Bae <[email protected]> (https://github.com/withearth)", | ||
"Yongseok Kang <[email protected]> (https://github.com/feelform)" | ||
], | ||
"license": "Apache-2.0", | ||
|
@@ -65,15 +63,14 @@ | |
"loglevel": "^1.6.1", | ||
"methods": "^1.1.2", | ||
"require-in-the-middle": "^5.0.3", | ||
"semver": "^5.6.0", | ||
"semver": "^7.5.3", | ||
"shimmer": "^1.2.0" | ||
}, | ||
"devDependencies": { | ||
"axios": "^0.21.1", | ||
"elasticsearch": "^15.4.1", | ||
"eslint": "^7.19.0", | ||
"eslint": "^8.43.0", | ||
"eslint-config-prettier": "^3.1.0", | ||
"eslint-plugin-import": "^2.2.0", | ||
"eslint-plugin-import": "^2.25.2", | ||
"express": "^4.16.4", | ||
"install": "^0.13.0", | ||
"ioredis": "^4.3.0", | ||
|
@@ -82,17 +79,18 @@ | |
"koa-bodyparser": "^4.2.1", | ||
"koa-router": "^7.4.0", | ||
"lodash": "^4.17.20", | ||
"mongodb-core": "3.1.7", | ||
"mongoose": "^5.4.3", | ||
"npm-run-all": "^1.7.0", | ||
"nyc": "^15.1.0", | ||
"redis": ">=3.1.1", | ||
"redis": "^3.1.2", | ||
"redis-mock": "^0.49.0", | ||
"request": "^2.88.0", | ||
"rewire": "^4.0.1", | ||
"rimraf": "^2.6.2", | ||
"tap-spec": "^5.0.0", | ||
"tape": "^4.9.1", | ||
"testcontainers": "^2.8.0" | ||
}, | ||
"resolutions": { | ||
"semver": "^7.5.3" | ||
}, | ||
"volta": { | ||
"node": "16.20.1" | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.
ddac37c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report
ddac37c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report
ddac37c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report
ddac37c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report
ddac37c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report
ddac37c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Coverage for this commit
Coverage Report