Security News
Bun 1.2 Released with 90% Node.js Compatibility and Built-in S3 Object Support
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.
league-sentry
Advanced tools
Setup a project to initialize and use Sentry to send error events within a cloud node function
This package is designed to Initialize Sentry and also Send an error event to Sentry.
To Send an error event to Sentry the caller has to ensure they have prepared the required custom fields for this package.
Required fields { sentryDsn, sentryEnv, fingerPrint, tags } See the definition of logException for more details:
/**
logException captures an error/exception and forwards it to Sentry as an event.
@param exception - The error object to be logged.
@param severity - log level or severity level of the failure e.g "fatal", "error"
@param userId - A unique user Id, identifying the user who made the failed request.
@param sentryDsn - The Sentry Data Source Name where we want to send events to.
@param sentryEnv - The Sentry environment to attribute this Sentry event to.
@param fingerPrint - An array of string, used to build custom grouping of events.
@param tags - A simple key-value pair object, holding additional context about the error or event. See Sentry's scope.setTags for more info.
@returns {Promise}
*/
async function logException(
exception,
severity,
userId,
{ sentryDsn, sentryEnv, fingerPrint, tags }
)
*
Example:
```
const sentry = require("auth0-sentry");
try{
// doSomething();
}catch(err){
// Build logData which can be forwarded to Sentry
// See how custom logData can be built using auth0-build-sentry-data
npm package.
const logData = { sentryEnv, sentryDsn, tags, fingerPrint }; // required fields
await sentry.logException(err, "fatal", userId, logData);
}
```
FAQs
Setup a project to initialize and use Sentry to send error events within a cloud node function
The npm package league-sentry receives a total of 1 weekly downloads. As such, league-sentry popularity was classified as not popular.
We found that league-sentry demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
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.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.