reactnative-plugin-appice-apm
TypeScript icon, indicating that this package has built-in type declarations

1.2.8 • 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 {
  
}

/reactnative-plugin-appice-apm/

    Package Sidebar

    Install

    npm i reactnative-plugin-appice-apm

    Weekly Downloads

    101

    Version

    1.2.8

    License

    MIT

    Unpacked Size

    1.62 MB

    Total Files

    675

    Last publish

    Collaborators

    • appiceio