Security News
JavaScript Leaders Demand Oracle Release the JavaScript Trademark
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
@sentry/shim
Advanced tools
A lightweight Sentry SDK shim that uses a configured client when embedded into an application. It allows library authors add support for a Sentry SDK without having to bundle the entire SDK or being dependent on a specific platform.
To use the shim, you do not have to initialize an SDK. This should be handled by
the user of your library. Instead, direcly use the exported functions of
@sentry/shim
to add breadcrumbs or capture events:
import * as Sentry from '@sentry/shim';
// Add a breadcrumb for future events
Sentry.addBreadcrumb({
message: 'My Breadcrumb',
// ...
});
// Capture exceptions, messages or manual events
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
message: 'Manual',
stacktrace: [
// ...
],
});
Note that while strictly possible, it is discouraged to interfer with the event context. If for some reason your library needs to inject context information, beware that this might override the user's context values:
// Set user information, as well as tags and further extras
Sentry.setExtraContext({ battery: 0.7 });
Sentry.setTagsContext({ user_mode: 'admin' });
Sentry.setUserContext({ id: '4711' });
FAQs
Sentry shim which can be used in libraries
The npm package @sentry/shim receives a total of 8 weekly downloads. As such, @sentry/shim popularity was classified as not popular.
We found that @sentry/shim demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 9 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
In an open letter, JavaScript community leaders urge Oracle to give up the JavaScript trademark, arguing that it has been effectively abandoned through nonuse.
Security News
The initial version of the Socket Python SDK is now on PyPI, enabling developers to more easily interact with the Socket REST API in Python projects.
Security News
Floating dependency ranges in npm can introduce instability and security risks into your project by allowing unverified or incompatible versions to be installed automatically, leading to unpredictable behavior and potential conflicts.