4.2.8 • Published 8 months ago

@monkvision/sentry v4.2.8

Weekly downloads
-
License
BSD-3-Clause-Clea...
Repository
github
Last release
8 months ago

@monkvision/sentry

This package exports a monitoring adapter that can be used to configure the monitoring of MonkJs projects using the @monkvision/monitoring project. The adapter exported by this package uses Sentry, a monitoring platform used by MonkJs to log, report errors and measure performances in its project. If you want to know more about monitoring adapters and the features they offer, please refer to the official documentation of the @monkvision/monitoring package.

Installing

To install the package, you can run the following command :

yarn add @monkvision/monitoring @monkvision/sentry

If you are using TypeScript, this package comes with its type definitions integrated, so you don't need to install anything else!

Basic Usage

Set Up

In order to configure the sentry inside your application, you first need to instantiate the Sentry Adapter and then wrap your root component in the MonitoringProvider and passing it the adapter as a prop :

import { SentryMonitoringAdapter } from '@monkvision/sentry';
import { MonitoringProvider } from '@monkvision/monitoring';

const adapter = new SentryMonitoringAdapter({
  dsn: '',
  environment: '',
  debug: true / false,
  tracesSampleRate: 0.025,
  release: '',
});

const container = document.getElementById('root');
render((
  <MonitoringProvider adapter={adapter}>
    <App/>
  </MonitoringProvider>
), container);

API

SentryMonitoringAdapter

Description

A Sentry Adapter logs everything in the Sentry platform. This can be used in your app when you want to implement Sentry for advanced Monitoring Features such as error handling, logs messages and performance measurements.

Config Options

OptionDescriptionRequiredDefault Value
dsnDSN key for sentry.io project with which your application will connect for sending all the information.NULL
environmentThe environment of your application (e.g. "production")local
debugEnable debug functionality in the SDKfalse
releaseRelease version of application1.0
tracesSampleRateSample rate to determine trace sampling. 0.0 = 0% chance of a given trace being sent (send no traces) 1.0 = 100% chance of a given trace being sent (send all traces)0.025
customTagsCustom tags to add in all transaction.[]

Examples of Usage

import { SentryMonitoringAdapter } from '@monkvision/sentry';
import { MonitoringProvider } from '@monkvision/monitoring';

const adapter = new SentryMonitoringAdapter({
  dsn: '',
  environment: '',
  debug: true / false,
  tracesSampleRate: 0.025,
  release: '',
});

const container = document.getElementById('root');
render((
  <MonitoringProvider adapter={adapter}>
    <App/>
  </MonitoringProvider>
), container);
4.2.7

8 months ago

4.2.8

8 months ago

4.2.6

8 months ago

4.2.5

8 months ago

4.2.3

8 months ago

4.2.2

8 months ago

4.2.4

8 months ago

4.1.0

8 months ago

4.2.1

8 months ago

4.2.0

8 months ago

4.0.21

9 months ago

4.0.20

9 months ago

4.0.24

9 months ago

4.0.19

9 months ago

4.0.18

9 months ago

4.0.17

9 months ago

4.0.16

10 months ago

4.0.15

10 months ago

4.0.12

10 months ago

4.0.14

10 months ago

4.0.13

10 months ago

4.0.10

10 months ago

4.0.11

10 months ago

4.0.9

10 months ago

4.0.8

10 months ago

4.0.7

11 months ago

4.0.6

11 months ago

4.0.5

11 months ago

4.0.4

11 months ago

4.0.3

11 months ago

4.0.2

11 months ago

4.0.1

11 months ago

4.0.0

11 months ago