设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 78|回复: 0

[转载发布] Sentry Integration

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    2026-7-12 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    7975

    主题

    864

    回帖

    3万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    29957
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    38826

    灌水之王

    发表于 4 天前 | 显示全部楼层 |阅读模式
    Sentry Integration
    by AceOfAces
    Version R1.03 (25/04/2021)

    This plugin allows developers to receive automated crash reports when the game crashes. This can be a life-saver, especially if the players don't bother to report bugs. You can even use this plugin to catch errors in the code as well.

    This plugin uses Sentry as a base.

    Features


    • Portable plugin. It can be used in pretty much every platform an RPG Maker game can run.
    • Easy to use API.
    • Easy to install. Put in some details, edit the HTML, and you are off!
    • [R1.01+] Includes a customizable feedback window for crashes.
    Screenshots
    Spoiler








    Demo

    This is quite self-explanatory. I'll upload a test project so you can see how it works.

    Installation and Setup

    The setup is a bit complex, so I wrote a guide for setup.

    Spoiler1. Sign up to Sentry (https://sentry.io). We'll need a DSN for this.

    2. Once you've signed up, you'll be asked to create a project. Follow the instructions (make sure to select JavaScript as the programming language).

    3. Now, you'll need to download the package. Copy the URL in the "<script" part and open the link in the browser. Then, right-click and select "Save As...". Save the js file in the game's js/libs folder. For simplicity, name it as sentry.js

    3. Now, let's set up your project. Do the following:

    - Edit the index.html with a code editor (or notepad). In the body section, insert this on top of the line that references pixi.js:
                    Code:       
    1. <script type="text/javascript" src="js/libs/sentry.js"></script>
    复制代码

    - Put the plugin in the top area of the plugin list. This is important, since we need to initialize the library before the game starts up.
    - If you use Yanfly's Core Engine or Olivia's Player Anti-Stress plugin, we'll need to patch them. Open the plugin(s) with notepad or a code
    editor, find the SceneManager.catchException and add the line:
                    Code:       
    1. FirehawkADK.SentryIntegration.ReportEvent(e, 'fatal', 'engine', 'code');
    复制代码

    Underneath the line:
                    Code:       
    1. SceneManager.catchException = function(e){
    复制代码

    - Once this is done, you'll need to fill in the data necessary to initialize the SDK. Copy the DSN (see the init code in the setup page), the version and environment tags you've set up over to this plugin's parameters. Make sure to replace [at] with the @ symbol and switch the 'Force Reporting' to Yes.

    4. Once the project's set up, we'll need to test it out. Take any plugin and add a myfunction1(); in another function. The AltMenuScreen plugin is a good candidate. Also, make sure to set the 'Force Reporting' option to Yes.

    5. If the game crashes and Sentry has en entry for the error, the plugin's set up correctly. Set the 'Force Reporting' option to No. Make sure to also remove the myfunction1(); as well.






    Q&A

    SpoilerQ: What is Sentry?
    A: Sentry is an error tracking service. This handles the automatic reports for you, providing information about the crash (see below for details) it can also integrate with a code hosting service (such as Github) to provide more context as well. You can either use the company's servers or host it on your servers.

    Q: What does the service collect?
    A: The service collects the stack trace (the error that the console throws), breadcrumbs (what did the engine do until the error or crash occurred), Operating System name and version, browser version, any tags you've set up via code and IP address ( you can prevent the collection of the IP address via JS code or in the dashboard settings).

    Q: Does the plugin send reports without the user's approval?
    A: Under normal circumstances, no. RPG Maker MV pretty much catches any exceptions (errors) that occur. So, unless you bypass the catch code, it shouldn't send anything without the user's approval.

    Q: After installing the plugin and library, do I need to do anything else?
    A: There are a few things, to ensure that no personal info is sent. Aside from leaving the 'Default Option' setting to 'Don't send', it's a good idea to adjust the privacy settings in Sentry's dashboard. I recommend setting most of the privacy settings to ON (specifically, turn on Enhanced Privacy, Require Data Scrubber, Require Using Default Data Scrubbers and Prevent Storing of IP addresses). Setting up the Global Sensitive Fields option is also a good idea. Lastly, please make sure that you disclose the use of the service to your players.

    If there are any other questions, please let me know and I'll try to help as much as possible.  Please handle this plugin and service with care.







    Compatibility

    Tested with RPG Maker MV version 1.6.2. May work with version 1.5.x. Versions older than 1.5 may work but I cannot guarantee compatibility. Compatible with most plugins.

    Download
    Github
    itch.io

    Credits
    AceOfAces

    Changelog:

    SpoilerR1.03
    -Added support for Console log capturing.
    -The plugin can now store captured events when the player is offline.
    -By default, the plugin will record the player's location in the game's level (including the checks for if they are fighting and/or are in a vehicle).
    R1.02
    -Added the option to adjust the Session Recording setting.
    -Improved stability of the plugin when the game closes.
    R1.01
    -Added a customizable feedback window.
    R1.00
    -Initial Release






    本贴来自国际rpgmaker官方论坛作者:AceOfAces处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/sentry-integration.117184/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-8-1 08:33 , Processed in 0.066267 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表