GithubHelp home page GithubHelp logo

isabella232 / sentry-capacitor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from getsentry/sentry-capacitor

0.0 0.0 0.0 8.56 MB

Ruby 1.12% Java 18.12% Objective-C 0.78% Swift 1.75% JavaScript 3.24% TypeScript 59.95% HTML 4.92% SCSS 10.12%

sentry-capacitor's Introduction


Official Sentry SDK for Capacitor

build Discord Chat

Work in progress Sentry SDK for Capacitor.

Release Stage Android alpha

Usage

To use this SDK, call Sentry.init(options) as early as possible after loading the page. This will initialize the SDK and hook into the environment. Note that you can turn off almost all side effects using the respective options.

import * as Sentry from '@sentry/capacitor';

Sentry.init({
  dsn: '__DSN__',
  // ...
});

To set context information or send manual events, use the exported functions of @sentry/capacitor. Note that these functions will not perform any action before you have called Sentry.init():

import * as Sentry from '@sentry/capacitor';

// Set user information, as well as tags and further extras
Sentry.configureScope(scope => {
  scope.setExtra('battery', 0.7);
  scope.setTag('user_mode', 'admin');
  scope.setUser({ id: '4711' });
  // scope.clear();
});

// Add a breadcrumb for future events
Sentry.addBreadcrumb({
  message: 'My Breadcrumb',
  // ...
});

// Capture exceptions, messages or manual events
Sentry.captureMessage('Hello, world!');
Sentry.captureException(new Error('Good bye'));
Sentry.captureEvent({
  message: 'Manual',
  stacktrace: [
    // ...
  ],
});

Resources

  • Documentation
  • Forum
  • Discord Chat
  • Stack Overflow
  • Twitter Follow

sentry-capacitor's People

Contributors

bruno-garcia avatar csparkle avatar hazat 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.