Refactor monitoring package and improve error handling
The monitoring package has been significantly refactored to improve the granularity of error capture. Code from the 'capture-exception.ts' files in different locations have been deleted and replaced by a more unified approach in the 'use-baselime.ts' and 'use-sentry.ts' hooks. The README documentation has also been updated to reflect these changes and provide additional information about error monitoring setup and usage.
This commit is contained in:
@@ -3,12 +3,37 @@
|
||||
Please set the following environment variable to your preferred monitoring provider:
|
||||
|
||||
```
|
||||
MONITORING_INSTRUMENTATION_PROVIDER=
|
||||
NEXT_PUBLIC_MONITORING_PROVIDER=
|
||||
MONITORING_INSTRUMENTATION_ENABLED=true
|
||||
```
|
||||
|
||||
## Available Providers
|
||||
|
||||
To use a specific provider, set the `MONITORING_INSTRUMENTATION_PROVIDER` environment variable to one of the following values:
|
||||
To use a specific provider, set the `NEXT_PUBLIC_MONITORING_PROVIDER` environment variable to one of the following values:
|
||||
|
||||
1. Baselime: `baselime`
|
||||
2. Sentry: `sentry`
|
||||
2. Sentry: `sentry`
|
||||
|
||||
## Baselime
|
||||
|
||||
To use Baselime, set the `NEXT_PUBLIC_MONITORING_PROVIDER` environment variable to `baselime`.
|
||||
|
||||
```
|
||||
NEXT_PUBLIC_MONITORING_PROVIDER=baselime
|
||||
```
|
||||
|
||||
## Sentry
|
||||
|
||||
To use Sentry, set the `NEXT_PUBLIC_MONITORING_PROVIDER` environment variable to `sentry`.
|
||||
|
||||
```
|
||||
NEXT_PUBLIC_MONITORING_PROVIDER=sentry
|
||||
```
|
||||
|
||||
## Instrumentation
|
||||
|
||||
To enable instrumentation, set the `MONITORING_INSTRUMENTATION_ENABLED` environment variable to `true`.
|
||||
|
||||
```
|
||||
MONITORING_INSTRUMENTATION_ENABLED=true
|
||||
```
|
||||
Reference in New Issue
Block a user