{"id":15723195,"url":"https://github.com/indiesoftby/defold-sentinel","last_synced_at":"2025-04-30T16:07:29.791Z","repository":{"id":194657437,"uuid":"448371279","full_name":"indiesoftby/defold-sentinel","owner":"indiesoftby","description":"Unofficial Sentry.io SDK for Defold.","archived":false,"fork":false,"pushed_at":"2024-08-25T15:05:29.000Z","size":373,"stargazers_count":13,"open_issues_count":7,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T17:44:42.844Z","etag":null,"topics":["defold","defold-library","defold-module","game-development","lua","lua-library"],"latest_commit_sha":null,"homepage":"","language":"HTML","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/indiesoftby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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}},"created_at":"2022-01-15T19:26:17.000Z","updated_at":"2024-10-22T07:36:44.000Z","dependencies_parsed_at":"2024-08-25T16:23:22.017Z","dependency_job_id":"f72b0632-11be-474d-ba05-73fabe51e0b7","html_url":"https://github.com/indiesoftby/defold-sentinel","commit_stats":null,"previous_names":["indiesoftby/defold-sentinel"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-sentinel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-sentinel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-sentinel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/indiesoftby%2Fdefold-sentinel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/indiesoftby","download_url":"https://codeload.github.com/indiesoftby/defold-sentinel/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251738889,"owners_count":21635890,"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":["defold","defold-library","defold-module","game-development","lua","lua-library"],"created_at":"2024-10-03T22:10:37.784Z","updated_at":"2025-04-30T16:07:29.696Z","avatar_url":"https://github.com/indiesoftby.png","language":"HTML","funding_links":[],"categories":["Libraries"],"sub_categories":["Programming Language"],"readme":"[![Sentinel Cover](cover.jpg)](https://github.com/indiesoftby/defold-sentinel)\n\n# Sentinel: Sentry.io SDK for Defold\n\n*This is an open-source project. It is not affiliated with Sentry.io.*\n\n[Sentry.io](https://sentry.io/) is an error tracking system. It can track errors and performance issues in any language, framework, and library.\n\nThis Defold extension, Sentinel, implements **error tracking** for your **Lua code**. Also, it can inject JavaScript SDK to track HTML5 errors if you need that.\n\nSentry.io is a paid system, but it has a free plan for developers to track up to 5,000 errors per month. To the point, it was enough to track down all Lua errors in [Puffy Cat](https://poki.com/en/g/puffy-cat) during a test period and release a pretty polished game.\n\n## Supported Platforms\n\n| Platform | Status |\n| -------- | ------ |\n| Lua (all platforms) | Supported ✅ |\n| Browser (HTML5) | Loads JavaScript SDK to track non-Lua errors ☑️ |\n| iOS, Android, Windows, macOS, Linux, Switch | Not Implemented ❌ |\n\n## Installation \u0026 Usage\n\nYou can use Sentinel in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/).\n\nOpen your `game.project` file and in the dependencies field under project add the ZIP file of a [specific release](https://github.com/indiesoftby/defold-sentinel/releases).\n\n### Init\n\n```lua\nlocal sentry = require(\"sentinel.sentry\")\n\nfunction init(self)\n    sentry.init({\n        -- The DSN tells the SDK where to send the events to.\n        -- Example of the DSN url: https://a09cb15ea1224b7db88ff3681c0d574f@o43904.ingest.sentry.io/5395416\n        dsn = \"YOUR_DSN_URL\",\n        -- Tags and extra data are optional\n        tags = {\n            [\"example_tag\"] = \"Example Tag Data\",\n        },\n        extra = {\n            [\"example_extra\"] = \"Example Extra Data\",\n        },\n        release = sys.get_config(\"sentinel.sentry_release\")\n    })\nend\n```\n\n### Breadcrumbs, Capturing Messages\n\n```lua\n--- Add breadcrumbs, add tags, extras, and capture messages:\nsentry.add_breadcrumb(\n    {\n        category = \"log\",\n        message = \"Test breadcrumb message\"\n    })\n\nsentry.set_tag(\"my_info\", \"Amount of gold\")\nsentry.set_extra(\"frametime\", 100)\nsentry.set_extra(\"cheater\", true)\n\nsentry.capture_message(\n    {\n        message = \"Test message\",\n        level = \"info\",\n        -- Sentinel's Sentry client merges globally defined tags/extra with this data,\n        -- i.e. you can add tags and extras for different kinds of messages and exceptions.\n        extra = {\n            example_extra_2 = \"Hello!\"\n        }\n    })\n```\n\n![Example Sentry Issue](example_sentry_issue.png)\n\n### The `game.project` Settings:\n\n```ini\n[sentinel]\nsentry_dsn_html5 = YOUR_DSN_URL_FROM_SENTRY_IO\nsentry_release = project-id@project-version\n```\n\nSetting the `sentinel.sentry_dsn_html5` option initializes Sentry JavaScript SDK in the HTML5 template ([take a look at how it's done](https://github.com/indiesoftby/defold-sentinel/blob/main/sentinel/manifests/web/engine_template.html#L3)).\n\n### GameAnalytics Compatibility\n\nOnly one [`sys.set_error_handler`](https://defold.com/ref/sys/#sys.set_error_handler:error_handler) callback can be set. To track Lua errors both in GameAnalytics and Sentinel, use the option, i.e. Sentinel will send captured errors to both, Sentry and GameAnalytics:\n\n```lua\nsentry.init({\n    --\n    -- ... your config ...\n    --\n    gameanalytics = true\n})\n```\n\nPlus, look into the `sentinel/sentry.lua` module to find all available configuration options!\n\n## Credits\n\nArtsiom Trubchyk ([@aglitchman](https://github.com/aglitchman)) is the current Sentinel owner within Indiesoft and is responsible for the open source repository.\n\nThis project uses the source code of [rxi's JSON](https://github.com/rxi/json.lua). \n\nQueen's Guard image is by [Chanut is Industries](https://thenounproject.com/chanut-is/).\n\n### License\n\nMIT license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findiesoftby%2Fdefold-sentinel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Findiesoftby%2Fdefold-sentinel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Findiesoftby%2Fdefold-sentinel/lists"}