Installations
npm install koa-trace-influxdb
Developer Guide
Typescript
No
Module System
N/A
Node Version
0.11.14
NPM Version
2.1.12
Score
64.9
Supply Chain
91.8
Quality
77
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
koajs
Download Statistics
Total Downloads
966
Last Day
1
Last Week
2
Last Month
5
Last Year
51
GitHub Statistics
16 Stars
6 Commits
2 Forks
8 Watching
2 Branches
14 Contributors
Bundle Size
1.47 kB
Minified
739.00 B
Minified + Gzipped
Package Meta Information
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
Total Downloads
Cumulative downloads
Total Downloads
966
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
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
1
Dev Dependencies
5
koa-trace-influxdb
Tracing for koa-trace using influxdb-udp.
Usage
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.
Options
host
port
prefix
- prefix to add to all the series, defaulting totrace.
. If you don't want any prefixes, set it as''
.
Limitations
- The trace arguments must only be a single object, if anything at all.
- UDP is used underneath, so you may lose events. There is no error reporting for logging these.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/koajs/.github/SECURITY.md:1
- Info: Found linked content: github.com/koajs/.github/SECURITY.md:1
- Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/koajs/.github/SECURITY.md:1
- Info: Found text in security policy: github.com/koajs/.github/SECURITY.md:1
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
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3.9
/10
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