@libapm1/react-native
TypeScript icon, indicating that this package has built-in type declarations

5.13.17 • Public • Published

AppiceAPM SDK for React Native

Requirements

  • react-native >= 0.65.0

Installation and Usage

To install the package and setup your project:

npm install reactnative-plugin-appice-apm

How to use it:

========= Mandatory =======================
const AppiceAPM = require('reactnative-plugin-appice-apm');
const AppICE = require('reactnative-plugin-appice');

AppiceAPM.init({
  dsn: 'Put your dsn here',
  tracesSampleRate: 0.0,
  _experiments: {
    profilesSampleRate: 1.0,
  },
});

AppICE.getUserId((userID: any) => {
  if (userID.length > 0) {
    AppiceAPM.setUser({ id: userID });
  }
});
AppICE.getDeviceId((deviceID: any) => {
  if (deviceID.length > 0) {
    AppiceAPM.setContext('device', {
        id: deviceID,
    });
  }
});
============ Optional ============================
// You can use these functions as per your requirements.

AppiceAPM.setTag("myTag", "tag-value");
AppiceAPM.setExtra("myExtra", "extra-value");
AppiceAPM.captureMessage("Hello TestApm!");
AppiceAPM.captureException(Error);
inside android->app->build.gradle
apply from: "../../node_modules/reactnative-plugin-appice-apm/libapm.gradle"
just before 
android {
  
}

Readme

Keywords

Package Sidebar

Install

npm i @libapm1/react-native

Weekly Downloads

1

Version

5.13.17

License

MIT

Unpacked Size

1.69 MB

Total Files

456

Last publish

Collaborators

  • tabishahmad