Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
backtrace-js
Advanced tools
Backtrace error reporting tool for client-side JavaScript.
// Import backtrace-js with your favorite package manager.
import * as bt from 'backtrace-js';
bt.initialize({
endpoint: `https://console.backtrace.io:${BACKTRACE_PORT}`,
token: '51cc8e69c5b62fa8c72dc963e730f1e8eacbd243aeafc35d08d05ded9a024121',
});
// Later, when you have an error:
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.
See backtrace-node's documentation for the complete options list.
In addition to all backtrace-node's options, Backtrace-JS includes sampling
and filter
.
sampling
Optional.
Sets a percentage of reports which should be sent.
For example, sampling: 0.25
would send 25/100 reports.
filter
Optional.
Set a pre-send function which allows custom filtering of reports.
This function accepts the backtrace report object and should return true
if the report SHOULD be sent or return false
if the report should NOT be sent.
Example:
filter: function(report) {
if (report.attributes["error.message"] == "Script error.") {
return Math.random() >= 0.5; // Sample half of this kind of report
}
return true; // Otherwise, always send the report
}
Client can optionally provide information to be treated as an attachment. Methods report
and reportSync
accept a string or object type which will be converted to a Blob and attached to your Backtrace error report before sending.
Example:
backtrace.report(new Error("something broke"), attributes, { items: "This will appear as an attachment." });
Add information about activity in your application to your error reports by calling leaveBreadcrumb
when events happen. The breadcrumbs will appear in the Backtrace console along with the error object.
Example:
backtrace.leaveBreadcrumb(
message,
attributes,
timestamp,
logLevel,
logType,
);
npm install
./node_modules/.bin/browserify test/app.js --outfile test/out.js
node test/server.js
FAQs
Backtrace.io error reporting tool for client-side applications
The npm package backtrace-js receives a total of 16 weekly downloads. As such, backtrace-js popularity was classified as not popular.
We found that backtrace-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.