{"id":15011815,"url":"https://github.com/appsignal/appsignal-javascript","last_synced_at":"2025-10-24T05:23:02.726Z","repository":{"id":34943168,"uuid":"192890472","full_name":"appsignal/appsignal-javascript","owner":"appsignal","description":"🟨 AppSignal for JavaScript","archived":false,"fork":false,"pushed_at":"2025-03-12T07:48:59.000Z","size":3312,"stargazers_count":20,"open_issues_count":21,"forks_count":16,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-11T18:11:24.703Z","etag":null,"topics":["angular","appsignal","ember","error-reporting","javascript","preact","react","stimulusjs","typescript","vuejs","webpack"],"latest_commit_sha":null,"homepage":"https://www.appsignal.com/javascript","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appsignal.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":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-20T09:26:15.000Z","updated_at":"2025-03-12T07:48:55.000Z","dependencies_parsed_at":"2023-02-17T16:30:53.269Z","dependency_job_id":"9139c72c-d2ea-4a83-9a0e-6b90a2738304","html_url":"https://github.com/appsignal/appsignal-javascript","commit_stats":{"total_commits":719,"total_committers":14,"mean_commits":"51.357142857142854","dds":0.5730180806675939,"last_synced_commit":"ef1265730fe1eef2dbd52bc71027d3ae90a744b6"},"previous_names":[],"tags_count":463,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appsignal%2Fappsignal-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appsignal","download_url":"https://codeload.github.com/appsignal/appsignal-javascript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248634739,"owners_count":21137105,"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","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","appsignal","ember","error-reporting","javascript","preact","react","stimulusjs","typescript","vuejs","webpack"],"created_at":"2024-09-24T19:41:45.327Z","updated_at":"2025-10-24T05:23:02.706Z","avatar_url":"https://github.com/appsignal.png","language":"TypeScript","readme":"# AppSignal for JavaScript\n\n- [AppSignal.com website][appsignal]\n- [Documentation][docs]\n- [Changelog][changelog]\n- [Support][contact]\n\n[![Build Status](https://travis-ci.org/appsignal/appsignal-javascript.svg?branch=develop)](https://travis-ci.org/appsignal/appsignal-javascript) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)\n\n## Description\n\n## Usage\n\nFirst, make sure you've installed AppSignal in your application by following the steps in [Installation](#installation).\n\n### Track any error\n\nCatch an error and report it to AppSignal:\n\n```js\ntry {\n  // do something that might throw an error\n} catch (error) {\n  appsignal.sendError(error)\n  // handle the error\n}\n\n// You can catch errors asynchronously by listening to Promises...\nasyncActionThatReturnsAPromise().catch(error =\u003e appsignal.sendError(error))\n\n// ...or by using async/await\nasync function() {\n  try {\n    const result = await asyncActionThatReturnsAPromise()\n  } catch (error) {\n    appsignal.sendError(error)\n    // handle the error\n  }\n}\n\n// ...or in an event handler or callback function\nevents.on(\"event\", (err) =\u003e {\n  appsignal.sendError(err)\n})\n```\n\n**NOTE:** Uncaught exceptions are **not** captured by default. We made the decision to not include this functionality as part of the core library due to the high amount of noise from browser extensions, ad blockers etc. that generally makes libraries such as this less effective.\n\nWe recommend using a relevant [integration](#integrations) as a better way to handle exceptions, or, if you _would_ prefer capture uncaught exceptions, you can do so by using the `@appsignal/plugin-window-events` package alongside this one.\n\n## Installation\n\nFirst, [sign up][appsignal-sign-up] for an AppSignal account and add the `@appsignal/javascript` package to your `package.json`. Then, run `yarn install`/`npm install`.\n\nYou can also add these packages to your `package.json` on the command line:\n\n```bash\nyarn add @appsignal/javascript\nnpm install --save @appsignal/javascript\n```\n\nYou can then import and use the package in your bundle:\n\n```js\nimport Appsignal from \"@appsignal/javascript\" // For ES Module\nconst Appsignal = require(\"@appsignal/javascript\").default // For CommonJS module\n\nconst appsignal = new Appsignal({\n  key: \"YOUR FRONTEND API KEY\"\n})\n```\n\nIt's recommended (although not necessarily required) to use the instance of the `Appsignal` object like a singleton. One way that you can do this is by `export`ing an instance of the library from a `.js`/`.ts` file somewhere in your project.\n\n```js\nimport Appsignal from \"@appsignal/javascript\"\n\nexport default new Appsignal({\n  key: \"YOUR FRONTEND API KEY\"\n}) \n```\n\nCurrently, we have no plans to supply a CDN-hosted version of this library.\n\nIf you're stuck, feel free to [contact us][contact] for help!\n\n## Development\n\n### Installation\n\u003ca name=\"dev-install\"\u003e\u003c/a\u003e\n\nThis repository is a [mono-managed monorepo](https://github.com/appsignal/mono/), containing packages (located in the `/packages` directory) that map to separate `npm` modules.\n\nFirst install mono on your local machine by [following the mono installation steps](https://github.com/appsignal/mono/#installation).\n\nThen install the dependencies and prepare the project for development use using mono:\n\n```bash\nmono bootstrap\n```\n\nYou can then run the following to start the compiler in _watch_ mode. This automatically compiles both the ES Module and CommonJS variants:\n\n```bash\nmono run yarn build:watch --parallel\n```\n\nYou can also build the library without watching the directory:\n\n```\nnpm run build        # build both CJS and ESM\nnpm run build:cjs    # just CJS\nnpm run build:esm    # just ESM\n```\n\n### Testing\n\nThe tests for this library use [Jest](https://jestjs.io) as the test runner. Once you've installed the dependencies, you can run the following command in the root of this repository to run the tests for all packages, or in the directory of a package to run only the tests pertaining to that package:\n\n```bash\nmono test\n```\n\n### Versioning\n\nThis repo uses [Semantic Versioning][semver] (often referred to as _semver_). Each package in the repository is versioned independently from one another.\n\n## Contributing\n\nThinking of contributing to this repo? Awesome! 🚀\n\nPlease follow our [Contributing guide][contributing-guide] in our documentation and follow our [Code of Conduct][coc].\n\nAlso, we would be very happy to send you Stroopwafels. Have look at everyone we send a package to so far on our [Stroopwafels page][waffles-page].\n\n## Support\n\n[Contact us][contact] and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.\n\nAlso see our [SUPPORT.md file](SUPPORT.md).\n\n[appsignal]: https://www/appsignal.com/javascript\n[appsignal-sign-up]: https://appsignal.com/users/sign_up\n[contact]: mailto:support@appsignal.com\n[coc]: https://docs.appsignal.com/appsignal/code-of-conduct.html\n[waffles-page]: https://www.appsignal.com/waffles\n[docs]: https://docs.appsignal.com/front-end/\n[contributing-guide]: https://docs.appsignal.com/appsignal/contributing.html\n[changelog]: https://github.com/appsignal/appsignal-javascript/blob/develop/packages/javascript/CHANGELOG.md\n[semver]: http://semver.org/\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsignal%2Fappsignal-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsignal%2Fappsignal-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsignal%2Fappsignal-javascript/lists"}