{"id":18400532,"url":"https://github.com/dsi-hug/ngx-sentry","last_synced_at":"2025-07-22T19:35:41.559Z","repository":{"id":53714467,"uuid":"333053843","full_name":"DSI-HUG/ngx-sentry","owner":"DSI-HUG","description":"📊 Angular wrapper for Sentry JavaScript SDK","archived":false,"fork":false,"pushed_at":"2025-06-30T19:04:48.000Z","size":5256,"stargazers_count":4,"open_issues_count":2,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-30T20:23:05.706Z","etag":null,"topics":["angular","crash-reporting","crash-reports","csp-report","error-handling","error-logging","error-monitoring","http-errors","http-interceptor","monitor","monitoring","ngx-sentry","sentry","sentry-client"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DSI-HUG.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-01-26T10:48:42.000Z","updated_at":"2025-06-30T19:04:51.000Z","dependencies_parsed_at":"2023-02-18T19:15:31.978Z","dependency_job_id":"3cefe3fc-a5e4-4a4e-851f-a4c32629cb47","html_url":"https://github.com/DSI-HUG/ngx-sentry","commit_stats":{"total_commits":188,"total_committers":6,"mean_commits":"31.333333333333332","dds":"0.18085106382978722","last_synced_commit":"33d387191de25afe047e31237a7dc35bd15f383c"},"previous_names":[],"tags_count":28,"template":false,"template_full_name":null,"purl":"pkg:github/DSI-HUG/ngx-sentry","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DSI-HUG","download_url":"https://codeload.github.com/DSI-HUG/ngx-sentry/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DSI-HUG%2Fngx-sentry/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266561517,"owners_count":23948632,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["angular","crash-reporting","crash-reports","csp-report","error-handling","error-logging","error-monitoring","http-errors","http-interceptor","monitor","monitoring","ngx-sentry","sentry","sentry-client"],"created_at":"2024-11-06T02:34:24.131Z","updated_at":"2025-07-22T19:35:41.527Z","avatar_url":"https://github.com/DSI-HUG.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n    @hug/ngx-sentry\n\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://www.hug.ch\"\u003e\n        \u003cimg src=\"https://cdn.hug.ch/svgs/hug/hug-logo-horizontal.svg\" alt=\"hug-logo\" height=\"54px\" /\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n    \u003ci\u003eAngular wrapper for the official Sentry JavaScript SDK\u003c/i\u003e\n    \u003cbr/\u003e\u003cbr/\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://www.npmjs.com/package/@hug/ngx-sentry\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/v/@hug/ngx-sentry.svg?color=blue\u0026logo=npm\" alt=\"npm version\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://npmcharts.com/compare/@hug/ngx-sentry?minimal=true\"\u003e\n        \u003cimg src=\"https://img.shields.io/npm/dw/@hug/ngx-sentry.svg?color=blue\u0026logo=npm\" alt=\"npm donwloads\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-sentry/blob/main/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/license-GPLv3-ff69b4.svg\" alt=\"license GPLv3\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-sentry/actions/workflows/ci_tests.yml\"\u003e\n        \u003cimg src=\"https://github.com/dsi-hug/ngx-sentry/actions/workflows/ci_tests.yml/badge.svg\" alt=\"build status\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dsi-hug/ngx-sentry/blob/main/CONTRIBUTING.md#-submitting-a-pull-request-pr\"\u003e\n        \u003cimg src=\"https://img.shields.io/badge/PRs-welcome-brightgreen.svg\" alt=\"PRs welcome\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003chr/\u003e\n\n## Getting started\n\nTo set up or update an Angular project with this library use the Angular CLI's [schematic][schematics] commands:\n\n#### Installation\n\n```sh\nng add @hug/ngx-sentry\n```\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003ci\u003eMore details\u003c/i\u003e\u003c/summary\u003e\n\n\u003e \u003cbr/\u003e\n\u003e\n\u003e The `ng add` command will ask you the following questions:\n\u003e\n\u003e 1.  **Name of the project in Sentry**: *the name used when creating the Sentry project*\n\u003e 2.  **Data Source Name (DSN) url**: *the url provided during the Sentry project creation process*\n\u003e\n\u003e And will also perform the following actions:\n\u003e\n\u003e -   Create a `.sentryclirc` file containing all the Sentry configurations\n\u003e -   Initialize and configure Sentry in `main.ts`\n\u003e -   Add `resolveJsonModule` and `allowSyntheticDefaultImports` to `tsconfig.json`\n\u003e -   Import the `NgxSentryModule` in your Angular application module (if app is not standalone)\n\n\u003c/details\u003e\n\n#### Update\n\n```sh\nng update @hug/ngx-sentry\n```\n\n\n## Usage\n\nFollow these steps to integrate your project's source maps with Sentry:\n\n1. Generate Source Maps\n   ```sh\n   ng build --source-map\n   ```\n\n2. Provide Source Maps to Sentry\n   ```sh\n   npx ngx-sentry ./project-dist-path\n   ```\n\n\n## Options\n\nThis library is a wrapper around the official [Sentry JavaScript SDK][sentry-sdk-url] with extra functionalities and configurations.\n\nAll options available in `@sentry/browser` can be configured from `@hug/ngx-sentry`.\n\nYou shouldn't have to configure anything else but in case you wanted to, you can still do it.\n\n#### Sentry Browser's SDK\n\nThe Sentry Browser's SDK can be configured in `main.ts`:\n\n```ts\ninitSentry(options: BrowserOptions);\n```\n\n#### Error handler\n\nThe behavior of the error handler can be configured either in:\n\n* `main.ts` *(if the app is a standalone Angular application)*\n    ```ts\n    bootstrapApplication(AppComponent, {\n      providers: [\n        provideSentry(options?: ErrorHandlerOptions)\n      ]\n    });\n    ```\n\n* `app.module.ts` *(if the app is **not** a standalone Angular application)*\n    ```ts\n    @NgModule({\n      imports: [\n        NgxSentryModule.forRoot(options?: ErrorHandlerOptions)\n      ]\n    })\n    export class AppModule { }\n    ```\n\n#### Current user\n\nYou can define the current user via the `setSentryUser()` api:\n\n```ts\n// import { setSentryUser } from '@hug/ngx-sentry/standalone';\n// import { setSentryUser } from '@hug/ngx-sentry';\n\npublic ngOnInit(): void {\n  // Set the current user\n  setSentryUser({\n    email: 'rtrm@hcuge.ch',\n    username: 'rtrm',\n    attr1: 'attr1'\n  });\n\n  // Remove the current user\n  setSentryUser(null);\n}\n```\n\n## Development\n\nSee the [developer docs][developer].\n\n\n## Contributing\n\n#### \u003e Want to Help?\n\nWant to file a bug, contribute some code or improve documentation? Excellent!\n\nBut please read up first on the guidelines for [contributing][contributing], and learn about submission process, coding rules and more.\n\n#### \u003e Code of Conduct\n\nPlease read and follow the [Code of Conduct][codeofconduct], and help us keep this project open and inclusive.\n\n\n## Credits\n\nCopyright (C) 2021 [HUG - Hôpitaux Universitaires Genève][dsi-hug]\n\n[![love@hug](https://img.shields.io/badge/@hug-%E2%9D%A4%EF%B8%8Flove-magenta)][dsi-hug]\n\n\n\n\n[schematics]: https://angular.io/guide/schematics-for-libraries\n[sentry-sdk-url]: https://github.com/getsentry/sentry-javascript\n[developer]: https://github.com/dsi-hug/ngx-sentry/blob/main/DEVELOPER.md\n[contributing]: https://github.com/dsi-hug/ngx-sentry/blob/main/CONTRIBUTING.md\n[codeofconduct]: https://github.com/dsi-hug/ngx-sentry/blob/main/CODE_OF_CONDUCT.md\n[dsi-hug]: https://github.com/dsi-hug\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsi-hug%2Fngx-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdsi-hug%2Fngx-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdsi-hug%2Fngx-sentry/lists"}