build-auth0-sentry-data
v1.0.0
Published
Setup a project to generate custom Sentry fingerprint and tags for League Auth0 Sentry
Downloads
2
Readme
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);
- The custom Tags and fingerPrint would be extracted primarily from two sources: