build-auth0-sentry-data

1.0.0 • Public • Published

Node package to extract custom data that could be used to build a Sentry log entry.

  • This package is designed to extract League Specific custom Sentry Tags and Fingerprint, which would be used to build a single log event that can be sent to Sentry.
    • The custom Tags and fingerPrint would be extracted primarily from two sources:
      • A Javascript error object
      • A configuration object containing, context specific attributes about the event that needs to be logged. Example:
          const logBuilder = require("auth0-build-sentry-data");
          err = new Error("User not found");
          const configuration = { tenant, env, sentryDsn };
          const logData = logBuilder.buildLogData(err, configuration);
          
         // logData can be passed to auth0-sentry package where event would be constructed and forwarded to Sentry
         const sentry = require("auth0-sentry");
         await sentry.logException(err, "fatal", auth0UserId, logData);
      

Readme

Keywords

none

Package Sidebar

Install

npm i build-auth0-sentry-data

Weekly Downloads

5

Version

1.0.0

License

UNLICENSED

Unpacked Size

4.12 kB

Total Files

3

Last publish

Collaborators

  • eezeh