Gathering detailed insights and metrics for logzio-nodejs
Gathering detailed insights and metrics for logzio-nodejs
Gathering detailed insights and metrics for logzio-nodejs
Gathering detailed insights and metrics for logzio-nodejs
logzio-nodejs-metrics
A nodejs implementation for sending metrics to Logz.io
logzio-nodejs-metrics-sdk
Logz.io node.js metrics Exporter allows user to send collected metrics to the Logz.io using OpenTelemetry SDK
winston-logzio
A winston transport wrapper for logzio
yotamloe-nodejs
A nodejs implementation for sending logs to Logz.IO cloud service Copy of logzio-nodejs
npm install logzio-nodejs
55.7
Supply Chain
97.8
Quality
83
Maintenance
100
Vulnerability
99.6
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
36 Stars
147 Commits
38 Forks
22 Watching
27 Branches
52 Contributors
Updated on 16 Sept 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
5%
11,043
Compared to previous day
Last week
6.6%
58,760
Compared to previous week
Last month
-26.4%
268,060
Compared to previous month
Last year
-65.2%
16,820,320
Compared to previous year
NodeJS logger for Logz.io. The logger stashes the log messages you send into an array which is sent as a bulk once it reaches its size limit (100 messages) or time limit (10 sec) in an async fashion. It contains a simple retry mechanism which upon connection reset (server side) or client timeout, wait a bit (default interval of 2 seconds), and try this bulk again. It does not block other messages from being accumulated and sent (async). The interval increases by a factor of 2 between each retry until it reaches the maximum allowed attempts (3).
By default, any error is logged to the console. This can be changed by supplying a callback function.
Nodejs
with version 14.x or above1var logger = require('logzio-nodejs').createLogger({ 2 token: '__YOUR_ACCOUNT_TOKEN__', 3 type: 'YourLogType' // OPTIONAL (If none is set, it will be 'nodejs') 4}); 5 6 7// sending text 8logger.log('This is a log message'); 9 10// sending an object 11var obj = { 12 message: 'Some log message', 13 param1: 'val1', 14 param2: 'val2' 15}; 16logger.log(obj);
Note: If logzio-js is used as part of a serverless service (AWS Lambda, Azure Functions, Google Cloud Functions, etc.), add logger.sendAndClose()
at the end of the run. For example sync Lambda and async Lambda
http
, https
or udp
. Default: http
listener.logz.io
udp
default port is 5050
, for http
is 8070
and 8071
is for https
2000
(2 sec)100
.3
false
@timestamp_nano
Default: false
false
extraFields : { field_1: "val_1", field_2: "val_2" , ... }
.A few notes are worth mentioning regarding the use of the UDP protocol:
bufferSize
is slightly different in this case. The messages will still be sent separately, but the logger will wait for the buffer to reach the size specified before sending out all the messages. If you want each message to be sent out immediately, then set bufferSize = 1
.1git clone https://github.com/logzio/logzio-nodejs.git 2cd logzio-nodejs
1npm install 2npm test
2.1.8
User-Agent
not optional and add the version to it.2.1.7
axios
to v1.6.4
(contributed by @gcagle3)2.1.6
14-20
axios
to v1.6.0
(contributed by @gcagle3)2.1.5
2.1.4
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.4 - 1.0.6
1.0.3
1.0.2
1.0.1
0.4.14
0.4.12
0.4.6
0.4.4
@timestamp
and @timestamp_nano
will no longer be overriden given a custom value by the user.0.4.3
@timestamp
field to the logs on the client's machine (and not when it reaches the server)0.4.1
request
dependency to 2.75.00.4.0
0.3.10
0.3.9
0.3.8
sendAndClose()
method which immediately sends the queued messages and clears the global timer0.3.6
0.3.5
0.3.4
jsonToString()
was throwing an error in the catch()block0.3.2
0.3.1
log
with a string parameter, the object isn't constructed properly.No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 16/29 approved changesets -- score normalized to 5
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
20 existing vulnerabilities detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
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