/Ti.Sentry

Sentry crash reporting module for Axways Titanium 🚀

Primary LanguageJava

It is the Axway Titanium module for sentry.

Open-source error tracking that helps developers monitor and fix crashes in real time. Iterate continuously. Boost efficiency. Improve user experience.

How to use

Initializing

First you have to add an entry in your tiapp.xml to reference your creds:

<property name="SENTRY_DSN_PRODUCTION" type="String">MY_SENTRY_DSN</property>
<property name="SENTRY_DSN_DEVELOPMENT" type="String">MY_SENTRY_DSN</property>

In app.js you can add a reference to module:

var Sentry = require("ti.sentry");

Alternativly or additional you can add the creds with this method:

Sentry.setDSN('MY_DSN_FROM_SENTRY_PORTAL');

Starting automaticly crash reporting

Sentry.startCrashReporting();

The method Sentry.stopCrashReporting(); is also exposed.

Capture a message

Sentry.captureMessage("Something significant may have happened");

Capture custom event

Sentry.captureEvent({
message : "Being awesome"
culprit : "Jon Doe"
});

More methods:

Record that a user sent a HTTP POST to example.com and it was successful.

Record the fact that user clicked a button to go from the main menu to the settings menu.

  • Sentry.addNavigationBreadcrumb("user.click", "main menu", "settings");

Record a general, application specific event

  • Sentry.addBreadcrumb("user.state_change", "logged in");