Sentry Integration

AceOfAces_Mod

Engineering to infinity!
Veteran
Joined
Sep 7, 2014
Messages
1,716
Reaction score
1,182
First Language
Greek
Primarily Uses
RMVXA
Sentry Integration
by AceOfAces
Version R1.00 (12/01/2020)
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!
Screenshots

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.
1. 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:
<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:
FirehawkADK.SentryIntegration.ReportEvent(e, 'fatal', 'engine', 'code');
Underneath the line:
Code:
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
Q: 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:
R1.00
-Initial Release
 
Last edited:

Dusttt

Villager
Member
Joined
Nov 12, 2017
Messages
19
Reaction score
76
First Language
French
Primarily Uses
RMMV
Nice thank you !
 

Creative Ed

Veteran
Veteran
Joined
Sep 16, 2013
Messages
316
Reaction score
328
First Language
Portuguese
Primarily Uses
RMMV
This is awesome! Thank you :)
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

When you're lost out therrrrre and you're alllll alone, ahwahwah waitin, to carry you hooooommmme, uhhheverywhere you look! (someone hit me with those backing vocals)
X.X cant focus... too many thing want do... help!
Day 2 of teaching MV, student can move cat across the map.
Got inspired and started writing a simple tower defence battle system last night :o
Good news! I have located an amazing 3D website called SketchFab that has rotatable renderings of famous statues!

Forum statistics

Threads
100,524
Messages
976,779
Members
132,080
Latest member
nwr
Top