https://github.com/taiga-family/micro-sentry
Tiny Sentry client with idiomatic wrapper for Angular
https://github.com/taiga-family/micro-sentry
angular micro-sentry sentry typescript
Last synced: 6 months ago
JSON representation
Tiny Sentry client with idiomatic wrapper for Angular
- Host: GitHub
- URL: https://github.com/taiga-family/micro-sentry
- Owner: taiga-family
- License: apache-2.0
- Created: 2023-11-14T11:11:31.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-26T09:30:39.000Z (7 months ago)
- Last Synced: 2025-03-29T15:09:49.308Z (7 months ago)
- Topics: angular, micro-sentry, sentry, typescript
- Language: TypeScript
- Homepage:
- Size: 1.61 MB
- Stars: 37
- Watchers: 3
- Forks: 4
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# micro-sentry
[](https://npmjs.com/package/@micro-sentry/angular)
[](https://bundlejs.com/?q=@micro-sentry%2Fcore)
[](https://bundlejs.com/?q=@micro-sentry/browser)
[](https://bundlejs.com/?q=@micro-sentry/angular&config={%22esbuild%22:{%22external%22:[%22@angular/core%22,%22@angular/common%22,%22tslib%22,%22rxjs%22]}})
**@micro-sentry** is a tiny sentry client to monitor your applications without raising your bundle size.
## Why is it better than default sentry client?
👜 **It is small**. So, it is at most [2.27 kB (gzip)](https://bundlejs.com/?q=%40micro-sentry%2Fbrowser) in size instead of default [85.1 kB (gzip)](https://bundlejs.com/?q=%40sentry%2Fbrowser), yet it retains all the the essential functionality.
🛠 **It is easy to set up**. There is a lightweight wrapper for Angular and a browser tool for other frameworks or vanilla.
Check out all the [core functionality here](#core-functionality).
## Installation
Angular:
| Micro-sentry version | Angular version |
| -------------------- | --------------- |
| `>= 6` | `>= 14` |
| `>= 5` | `>= 13` |
| `>= 4` | `>= 12` |
| `>= 3` | `>= 11` |
| `>= 2` | `>= 10` |```
npm i @micro-sentry/angular
```Other:
```
npm i @micro-sentry/browser
```> [!NOTE]
> since version @micro-sentry/browser@7 breadcrumbs-plugin is a separate package```
npm i @micro-sentry/breadcrumbs-plugin
```## How to set up
### Angular
You can use provide api in standalone applications:
```typescript
import { provideMicroSentry } from '@micro-sentry/angular';bootstrapApplication(AppComponent, {
providers: [
provideMicroSentry({
dsn: 'https://kj12kj1n23@sentry.domain.com/123',
}),
],
});
```Or add it into `app.module.ts` of your application:
```typescript
import { MicroSentryModule } from '@micro-sentry/angular';@NgModule({
imports: [
// options 1: via module
MicroSentryModule.forRoot({
dsn: 'https://kj12kj1n23@sentry.domain.com/123',
}),
],
providers: [
// option 2: via provide
provideMicroSentry({
dsn: 'https://kj12kj1n23@sentry.domain.com/123',
}),
],
})
export class AppModule {}
```### Javascript / Typescript
If you do not use Angular framework, you can install `@micro-sentry/browser` module to create client manually.
```ts
const client = new BrowserMicroSentryClient({
dsn: 'https://kj12kj1n23@sentry.domain.com/123',
});try {
// your app code
} catch (e) {
client.report(e);
}
```## Core Functionality
- 📤 **Send Errors with Stack Trace**
- 📩 **Send Messages**
- 🚫 **Ignore URLs | Errors**: With strings or RegExps
- 🍞 **Breadcrumbs plugin**: Track and manage the sequence of events leading up to an error for comprehensive debugging
- 🌟 **Enrich Errors with Tags, User, Context**: Augment error reports with additional context, user information, and tags for deeper insightsThis list encapsulates the key functionalities supported by micro-sentry, emphasizing its focus on essential error tracking and management.
## Core team
Roman Sedov
## License
🆓 Feel free to use our library in your commercial and private applications
All micro-sentry packages are covered by [Apache 2.0](/LICENSE)
Read more about this license [here](https://choosealicense.com/licenses/apache-2.0/)