{"id":18032320,"url":"https://github.com/tmkx/wx-sentry","last_synced_at":"2025-05-12T18:41:20.152Z","repository":{"id":57400442,"uuid":"305649542","full_name":"tmkx/wx-sentry","owner":"tmkx","description":"Sentry SDK for WeChat MiniApp","archived":false,"fork":false,"pushed_at":"2020-12-23T11:56:12.000Z","size":327,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-06T11:18:52.050Z","etag":null,"topics":["miniapp","sentry","sentry-sdk","weapp","wechat-mini-program","xiaochengxu"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tmkx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-20T09:01:37.000Z","updated_at":"2025-01-02T02:30:19.000Z","dependencies_parsed_at":"2022-09-05T03:50:17.060Z","dependency_job_id":null,"html_url":"https://github.com/tmkx/wx-sentry","commit_stats":null,"previous_names":["4in/wx-sentry"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmkx%2Fwx-sentry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmkx%2Fwx-sentry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmkx%2Fwx-sentry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tmkx%2Fwx-sentry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tmkx","download_url":"https://codeload.github.com/tmkx/wx-sentry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238067645,"owners_count":19411049,"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":["miniapp","sentry","sentry-sdk","weapp","wechat-mini-program","xiaochengxu"],"created_at":"2024-10-30T10:12:59.216Z","updated_at":"2025-02-10T06:26:51.626Z","avatar_url":"https://github.com/tmkx.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://sentry.io\" target=\"_blank\" align=\"center\"\u003e\n    \u003cimg src=\"https://sentry-brand.storage.googleapis.com/sentry-logo-black.png\" width=\"280\"\u003e\n  \u003c/a\u003e\n  \u003cbr /\u003e\n\u003c/p\u003e\n\n# Sentry SDK for WeChat MiniApp\n\nSentry SDK 微信小程序版，基于官方 SDK 5.27.1 版修改\n\n## 链接\n\n- [官方 SDK 文档](https://docs.sentry.io/platforms/javascript/)\n\n## 使用方式\n\n请在小程序初始化后尽早调用`Sentry.init(options)`。这将初始化 SDK 并注入到小程序环境中。你可以使用相应的选项关闭几乎所有的副作用。\n\n```javascript\nimport * as Sentry from 'wx-sentry';\n\nSentry.init({\n  dsn: '__DSN__',\n  // ...\n});\n```\n\n要设置上下文信息或发送手动事件，请使用`wx-sentry`导出的函数。注意，这些在调用`Sentry.init()`之前，函数不会执行任何操作:\n\n```javascript\nimport * as Sentry from 'wx-sentry';\n\n// Set user information, as well as tags and further extras\nSentry.configureScope((scope) =\u003e {\n  scope.setExtra('battery', 0.7);\n  scope.setTag('user_mode', 'admin');\n  scope.setUser({ id: '4711' });\n  // scope.clear();\n});\n\n// Add a breadcrumb for future events\nSentry.addBreadcrumb({\n  message: 'My Breadcrumb',\n  // ...\n});\n\n// Capture exceptions, messages or manual events\nSentry.captureMessage('Hello, world!');\nSentry.captureException(new Error('Good bye'));\nSentry.captureEvent({\n  message: 'Manual',\n  stacktrace: [\n    // ...\n  ],\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmkx%2Fwx-sentry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftmkx%2Fwx-sentry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftmkx%2Fwx-sentry/lists"}