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
Sentry has an optional dependency on SLF4J on Android.Which when not present will log an error about it not being in the application.
System.err: SLF4J: Failed to load class >"org.slf4j.impl.StaticLoggerBinder". System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder >for further details.
To get rid of this log warning you can add a dependency to your app's app.gradle file located in
App_Resources/Android/app.gradle
to include:compile 'org.slf4j:slf4j-nop:1.7.25'
in the dependencies. See the demo app here
tns plugin add nativescript-sentry
import { Sentry } from 'nativescript-sentry';
const dsn = 'https://<key>:<secret>@host/<project>';
Sentry.init(dsn);
import { SentryModule } from 'nativescript-sentry/angular';
NgModule({
...
imports: [
SentryModule.forRoot({dsn: 'https://<key>:<secret>@host/<project>'})
],
Note: this plugin adds a custom ErrorHandler to your angular app
Sentry.captureException(exeption: Error, options?: ExceptionOptions);
Example:
try {
throw 'try catch Exception example';
} catch (error) {
Sentry.captureException(error, {});
}
Sentry.captureMessage(message: string, options?: MessageOptions)
Sentry.captureBreadcrumb(breadcrumb: BreadCrumb)
Sentry.setContextUser(user: SentryUser)
Sentry.setContextTags(tags: object)
Sentry.setContextExtra(extra: object)
Sentry.clearContext();
export enum Level {
Fatal = 'fatal',
Error = 'error',
Warning = 'warning',
Info = 'info',
Debug = 'debug'
}
export interface SentryUser {
id: string;
email?: string;
username?: string;
}
export interface BreadCrumb {
message: string;
category: string;
level: Level;
}
export interface MessageOptions {
level?: Level;
/**
* Object of additional Key/value pairs which generate breakdowns charts and search filters.
*/
tags?: object;
/**
* Object of unstructured data which is stored with events.
*/
extra?: object;
}
export interface ExceptionOptions {
/**
* Object of additional Key/value pairs which generate breakdowns charts and search filters in Sentry.
*/
tags?: object;
/**
* Object of unstructured data which is stored with events.
*/
extra?: object;
}
2/2/2019 - (1.8.0):
Thanks to @bradmartin and @jerbob92!
28/11/2018 - (1.6.1):
11/12/2017 - (1.5.0):
BREAKING CHANGES
capture()
method was deprecated in favor of captureMessage
/captureException
Features
28-08-2017 - (1.3.0):
2-08-2017 - (1.2.0):
24-07-2017 - (1.1.0):
本文主要记录安装和配置Sentry的过程,关于Sentry的介绍,请参考Apache Sentry架构介绍。 1. 环境说明 系统环境: 操作系统:CentOs 6.6 Hadoop版本:CDH5.4 运行用户:root 这里,我参考使用yum安装CDH Hadoop集群一文搭建了一个测试集群,并选择cdh1节点来安装sentry服务。 2. 安装 在cdh1节点上运行下面命令查看Sentry的相
安装和配置Sentry 本文主要记录安装和配置Sentry的过程,关于Sentry的介绍,请参考 Apache Sentry架构介绍 。 1. 环境说明 系统环境: 操作系统:CentOs 6.6 Hadoop版本: CDH5.4 运行用户:root 这里,我参考 使用yum安装CDH Hadoop集群 一文搭建了一个测试集群,并选择cdh1节点来安装sentry服务。 2. 安装 在cdh1节点
本文主要记录安装和配置Sentry的过程,关于Sentry的介绍,请参考Apache Sentry架构介绍。 1. 环境说明 系统环境: 操作系统:CentOs 6.6 Hadoop版本:CDH5.4 运行用户:root 这里,我参考使用yum安装CDH Hadoop集群一文搭建了一个测试集群,并选择cdh1节点来安装sentry服务。 2. 安装 在cdh1节点上运行下面命令查看Sentry的相
Error: listen EADDRINUSE: address already in use :::8081 at Server.setupListenHandle [as _listen2] (net.js:1226:14) at listenInCluster (net.js:1274:12) at Server.listen (net.js:1362:7)
NativeScript 可以使用 Javascript,CSS, XML 创建真正的 Native 跨平台应用,支持 iOS Android,NativeScript 将您的跨平台代码翻译成目标平台的代码。 UI 使用 XML 描述,CSS 样式,在编译时将 UI 转化成本地原生代码,最终得到正在的 Native 原生应用。 Telerik 公开了用于创建安卓、iOS和Windows Unive
NativeScript Command-Line Interface The NativeScript CLI lets you create, build, and deploy NativeScript-based apps on iOS and Android devices. Get it using: npm install -g nativescript What is Native
NativeScript-Snackbar �� �� �� NativeScript plugin for Material Design SnackBar component. Installation: NativeScript 7+:tns plugin add @nstudio/nativescript-snackbar NativeScript version prior to 7:t
Nativescript-Ripple This plugin aims to bring a native (or close to native) ripple implementation on Android and iOS. The android version uses a RippleDrawable and conserves the previous background, a
NativeScript-FloatingActionButton NativeScript plugin for Material Design Floating Action Button UI component. Installation Nativescript 7+: ns plugin add @nstudio/nativescript-floatingactionbutton Na
NativeScript CardView A NativeScript plugin to provide an XML widget to implement the Material Design CardView component. Installation NativeScript 7+: ns plugin add @nstudio/nativescript-cardview Nat
This project has moved: This project is now being maintained here: https://github.com/nativescript-community/ui-mapboxas it's become clear contrary to what I thought, I don't actually have enough time
Nativescript Hijri plugin This plugin is inspired by https://github.com/arabiaweather/hijri-date Nativescript-hijri Hijri plugin allow you to convert gregorian date to islamic hijri date. Installation