-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instant trace sending + send only slow traces
- Loading branch information
Showing
4 changed files
with
59 additions
and
5 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
|
||
## 4.3.4 | ||
|
||
- Do not send trace faster than 1000ms | ||
- Instantly send traces to pm2.io (instead of ~60secs timeout) | ||
- Allow metrics to be a boolean | ||
- Add some examples | ||
- Add some examples/ | ||
- Track changes via CHANGELOG.md |
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,45 @@ | ||
|
||
|
||
pm2-io-apm features are in src/features/: | ||
|
||
``` | ||
src/features/ | ||
├── dependencies.ts | ||
├── entrypoint.ts | ||
├── events.ts | ||
├── metrics.ts | ||
├── notify.ts | ||
├── profiling.ts | ||
└── tracing.ts | ||
``` | ||
|
||
## Tracing | ||
|
||
- `./src/census` folder is essentially a dump of https://github.com/census-instrumentation/opencensus-node/tree/master/packages/opencensus-nodejs-base/src/trace with plugins added | ||
- Only traces higher than `MINIMUM_TRACE_DURATION: 1000 * 1000` are sent to transporter (sent in /src/census/exporter.ts:72) | ||
|
||
Trace sent looks like: | ||
|
||
``` | ||
{ | ||
traceId: 'fac7052e9129416185a26d4935229620', | ||
name: '/slow', | ||
id: '66358f0a48be82c5', | ||
parentId: '', | ||
kind: 'SERVER', | ||
timestamp: 1586380086251000, | ||
duration: 2007559, | ||
debug: false, | ||
shared: false, | ||
localEndpoint: { serviceName: 'tototransaction' }, | ||
tags: { | ||
'http.host': 'localhost', | ||
'http.method': 'GET', | ||
'http.path': '/slow', | ||
'http.route': '/slow', | ||
'http.user_agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36', | ||
'http.status_code': '304', | ||
'result.code': undefined | ||
} | ||
} | ||
``` |
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