Gathering detailed insights and metrics for koa-trace-influxdb
Gathering detailed insights and metrics for koa-trace-influxdb
npm install koa-trace-influxdb
Typescript
Module System
Node Version
NPM Version
64.9
Supply Chain
91.8
Quality
77
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
966
Last Day
1
Last Week
2
Last Month
5
Last Year
51
16 Stars
6 Commits
2 Forks
8 Watching
2 Branches
14 Contributors
Minified
Minified + Gzipped
Latest Version
1.0.0
Package Id
koa-trace-influxdb@1.0.0
Size
2.54 kB
NPM Version
2.1.12
Node Version
0.11.14
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
0%
2
Compared to previous week
Last month
25%
5
Compared to previous month
Last year
-27.1%
51
Compared to previous year
1
5
Tracing for koa-trace using influxdb-udp.
1var app = koa(); 2require('koa-trace')(app); 3 4var traceInflux = require('koa-trace-influxdb'); 5app.instrument(traceInflux({ 6 port: 4444, 7 host: '127.0.0.1' 8})); 9 10app.use(function* (next) { 11 // set an ID for every request. 12 // optionally, make this a request UUID 13 this.id = '1234'; 14 15 // optionally set properties to add to all traces 16 this.traces = { 17 user_id: this.session.user_id.toString('hex') 18 }; 19 20 // trace something 21 this.trace('start') 22})
This will create a time series called trace.start
.
Thus, it tracks each event as a separate series.
You probably want to track the elapsed time.
1app.use(function* (next) { 2 var start = Date.now(); 3 4 yield* next; 5 6 this.trace('response-time', { 7 elapsed: Date.now() - start 8 }); 9});
You may want to build your own helper for this.
host
port
prefix
- prefix to add to all the series, defaulting to trace.
.
If you don't want any prefixes, set it as ''
.No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 0/6 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More