Coder Social home page Coder Social logo

muratcorlu / nativescript-sentry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from danielgek/nativescript-sentry

0.0 2.0 0.0 1.94 MB

Sentry java/cocoa for nativescript

License: Apache License 2.0

HTML 1.32% TypeScript 49.43% CSS 2.84% Shell 6.40% JavaScript 40.01%

nativescript-sentry's Introduction

Sentry.io for nativescript

This plugin uses sentry-android and sentry-cocoa to catch native errors/stack traces and send them to a sentry server.

NOTE: If you have a native exeption and the app exits the plugin will save the log and send it in the next app startup, this is how the native plugins are implemented and it is expected behavior

Installation

tns plugin add nativescript-sentry

Usage

Without Angular

import { Sentry } from 'nativescript-sentry';
const dsn = 'https://<key>:<secret>@host/<project>';
Sentry.init(dsn);

With Angular

import { SentryModule } from 'nativescript-sentry';

NgModule({
  ...
  imports: [
       SentryModule.forRoot({dsn: 'https://<key>:<secret>@host/<project>'})
  ],

Note: this plugin adds a custom ErrorHandler and automatically provides it

API

Init Raven

Sentry.init(dsn: string);

Capture exeption

Sentry.capture(error: any);

Example:

try {
    throw 'try catch exeption example'
} catch(error) {
    Sentry.capture(error);
}

Changelog:

2-08-2017 - (1.2.0):

  • update demos dependencies
  • update ios and android native dependencies
  • fix ios event capture

24-07-2017 - (1.1.0):

  • fix stringify
  • fix angular error handler

Credits:

  • @hypery2k: for his nativescript-fabric(helped me a lot!)

nativescript-sentry's People

Contributors

danielgek avatar muratcorlu avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.