npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

com.commontime.cordova.splunk-mint

v1.0.5

Published

CommonTime plugin for Splunk Mint.

Downloads

1

Readme

Splunk Mint Plugin

The Splunk Mint plugin provides a way of integrating Splunk Mint crash reporting into a Cordova app. There are two ways of configuring and starting it: via the config.xml file, in which case Splunk Mint is started as soon as the plugin loads; and via a call to plugins.splunkmint.start, in which case, Splunk Mint won't be started until this call completes.

Configuration via config.xml

There are three preferences available for configuration in the config.xnl file:

  • splunk_android_api_key, which specifies the Splunk API key for Android.
  • splunk_ios_api_key, which specifies the Splunk API key for iOS.
  • splunk_extra_data, which specifies any extra data to be uploaded in the event of a crash; this is a string representation of a JSON object whose values are all strings.

For example:

<preference name="splunk_android_key" value="f25257f1"/>
<preference name="splunk_ios_api_key" value="b2c251f8"/>
<preference name="splunk_extra_data" value="{'user': 'gary'}"/>

Calls

plugins.splunkmint.crash

This function is used purely for testing — do NOT use in a released app. On iOS, it will crash the app with a segmentation violation (SIGSEGV). When the app is restated, an error report should be uploaded to the Splunk Mint website.

function successCallback () {
  // This will never be called 'cos we'll already have crashed
}

function errorCallback (message) {
  // See above
}

plugins.splunkmint.crash(successCallback, errorCallback)

plugins.splunkmint.enableLogCat

Enables a limited logcat to be sent along with a crash. Android only.

function successCallback () {
  // Enabled
}

function errorCallback (message) {
  // There was a problem
}

var options = {
  'enable': true,	// required
  'loglines': 100,	// optional
  'filter': 'ActivityManager:I MyApp:D *:S' // optional
};

plugins.splunkmint.enableLogCat(successCallback, errorCallback, options);

plugins.splunkmint.leaveBreadcrumb

Add a breadcrumb to a potential crash report.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.leaveBreadcrumb(successCallback, errorCallback, "opened page 2");

plugins.splunkmint.logEvent

Log an event.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.logEvent(successCallback, errorCallback, "Logged in");

plugins.splunkmint.logView

Log a view.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.logView(successCallback, errorCallback, "View X");

plugins.splunkmint.getTotalCrashesNum

Get the number of crashes since install. On iOS, this always returns 0.

function successCallback (value) {
  console.log(value + ' crashes');
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.getTotalCrashesNum(successCallback, errorCallback);

plugins.splunkmint.getLastCrashID

Gets the ID of the last crash or null if there wasn't one. On iOS, this always returns null.

function successCallback (crashId) {
  console.log('Crash ID: ' + crashId);
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.getLastCrashID(successCallback, errorCallback);

plugins.splunkmint.transactionStart

Start a transaction with a given name.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.startTransaction(successCallback, errorCallback, "RequestX");

plugins.splunkmint.transactionStop

Stop the transaction with the given name.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.transactionStop(successCallback, errorCallback, "RequestX");

plugins.splunkmint.transactionCancel

Cancel the transaction with the given name for the given reason.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

var options = {
  'name': 'RequestX',
  'reason': 'UserCancelled'
};

plugins.splunkmint.transactionCancel(successCallback, errorCallback, options);

plugins.splunkmint.flush

Flush pending items.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.flush(successCallback, errorCallback);

plugins.splunkmint.enableDebugLog

Enable debug logging

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

plugins.splunkmint.enableDebugLog(successCallback, errorCallback);

plugins.splunkmint.log

Write a log message from a given source at a specified level. Valid levels are "v" (verbose), "d" (debug, the default), "i" (info), "w" (warning) and "e" (error). Note on iOS "v" is the same as "w" and the tag field is ignored.

function successCallback () {
  // done
}

function errorCallback (message) {
  // There was a problem
}

var options = {
  'tag': 'MyApp',
  'msg': 'Started loading screen...',
  'priority': 'i'
};

plugins.splunkmint.log(successCallback, errorCallback, options);