Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
backtrace-node
Advanced tools
Backtrace error reporting tool for Node.js.
var bt = require('backtrace.io');
bt.initialize({
endpoint: "https://console.backtrace.io",
token: "51cc8e69c5b62fa8c72dc963e730f1e8eacbd243aeafc35d08d05ded9a024121",
});
// ...
bt.report(new Error("something broke"));
This is intended to be one of the first things your application does during
initialization. It registers a handler for uncaughtException
which will
spawn a detached child process to perform the error report and then crash
in the same way that your application would have crashed without the handler.
endpoint
Required.
Example: https://backtrace.example.com:1234
.
Sets the HTTP/HTTPS endpoint that error reports will be sent to.
token
Required.
Example: 51cc8e69c5b62fa8c72dc963e730f1e8eacbd243aeafc35d08d05ded9a024121
.
Sets the token that will be used for authentication when sending an error report.
attributes
Optional. Object that contains additional attributes to be sent along with the error report.
Example:
{
application: "ApplicationName",
serverId: "foo",
}
timeout
Defaults to 1000
. Maximum amount of milliseconds to wait for child process
to process error report and schedule sending the report to Backtrace.
debugBacktrace
Defaults to false
. Set to true
to cause process to wait for the report to
Backtrace to complete before exiting.
allowMultipleUncaughtExceptionListeners
Defaults to false
. Set to true
to not crash when another uncaughtException
listener is detected.
disableGlobalHandler
Defaults to false
. If this is false
, this module will attach an
uncaughtException
handler and report those errors automatically before
re-throwing the exception.
Set to true
to disable this. Note that in this case the only way errors
will be reported is if you call bt.report(error)
.
contextLineCount
Defaults to 20
. When an error is reported, this many lines above and below
each stack function are included in the report.
NOTE: this option is not yet implemented as currently all source code for files in the stack trace are sent in the report.
tabWidth
Defaults to 8
. If there are any hard tabs in the source code, it is unclear
how many spaces they should be indented to correctly display the source code.
Therefore the error report can override this number to specify how many spaces
a hard tab should be represented by when viewing source code.
Send an error report to Backtrace.
error
should be an Error
object created with new Error("message")
.
FAQs
Backtrace error reporting tool
We found that backtrace-node demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.