All Projects → ChimeHQ → Meter

ChimeHQ / Meter

Licence: bsd-3-clause
Library for interacting with MetricKit

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Meter

Sentry Python
The new Python SDK for Sentry.io
Stars: ✭ 870 (+549.25%)
Mutual labels:  crash-reporting
Sentry Clj
Sentry SDK for Clojure
Stars: ✭ 63 (-52.99%)
Mutual labels:  crash-reporting
Uce Handler
Convenient Uncaught-Exception Handler Library For Testers and Developers. Copy, Share, Email, Save crash logs easily.
Stars: ✭ 101 (-24.63%)
Mutual labels:  crash-reporting
Planb Android
A crash recovery library for Android. It allows tracking and handling crashes with different rules for debugging and production.
Stars: ✭ 29 (-78.36%)
Mutual labels:  crash-reporting
Airbrake Ruby
A plain Ruby Airbrake notifier
Stars: ✭ 52 (-61.19%)
Mutual labels:  crash-reporting
Sharpbrake
Airbrake Notifier for .NET
Stars: ✭ 78 (-41.79%)
Mutual labels:  crash-reporting
Airbrake
The official Airbrake library for Ruby applications
Stars: ✭ 896 (+568.66%)
Mutual labels:  crash-reporting
Qbreakpad
Cross-platform Qt crash handler, implemented as wrapper around google-breakpad
Stars: ✭ 115 (-14.18%)
Mutual labels:  crash-reporting
Sentry
Middleware to integrate with sentry crash reporting.
Stars: ✭ 55 (-58.96%)
Mutual labels:  crash-reporting
Raven.cr
Raven is a Crystal client for Sentry
Stars: ✭ 96 (-28.36%)
Mutual labels:  crash-reporting
Bugsnag Android
Bugsnag crash monitoring and reporting tool for Android apps
Stars: ✭ 990 (+638.81%)
Mutual labels:  crash-reporting
Bugsnag Node
[DEPRECATED] Please upgrade to our Universal JS notifier "@bugsnag/js" • https://github.com/bugsnag/bugsnag-js
Stars: ✭ 48 (-64.18%)
Mutual labels:  crash-reporting
Android Defensecrash
Android runtime crash controller. defense java crash keep your application safety
Stars: ✭ 89 (-33.58%)
Mutual labels:  crash-reporting
Sentry
Sentry is cross-platform application monitoring, with a focus on error reporting.
Stars: ✭ 29,700 (+22064.18%)
Mutual labels:  crash-reporting
Ohbug
An open source application information monitoring platform.
Stars: ✭ 101 (-24.63%)
Mutual labels:  crash-reporting
Sentry Laravel
Laravel SDK for Sentry
Stars: ✭ 927 (+591.79%)
Mutual labels:  crash-reporting
Bugsnag Python
Official bugsnag error monitoring and error reporting for django, flask, tornado and other python apps.
Stars: ✭ 69 (-48.51%)
Mutual labels:  crash-reporting
Sentry Php
The official PHP SDK for Sentry (sentry.io)
Stars: ✭ 1,591 (+1087.31%)
Mutual labels:  crash-reporting
Raygun4net
Raygun provider for .NET
Stars: ✭ 107 (-20.15%)
Mutual labels:  crash-reporting
Ndcrash
A powerful crash reporting library for Android NDK. Don't forget to run git submodule update --init --recursive after checking out.
Stars: ✭ 91 (-32.09%)
Mutual labels:  crash-reporting

Github CI Carthage compatible

Meter

Meter is a companion library to MetricKit. It aims to provide the following capabilities:

  • API for MXCallStackTree
  • Types for MXDiagnostic emulation and coding
  • MXMetricManager-like interface for unsupported platforms
  • On-device symbolication (still under investigation)

Integration

Swift Package Manager

dependencies: [
    .package(url: "https://github.com/ChimeHQ/Meter.git")
]

Carthage

github "ChimeHQ/Meter"

Expanded API

The MetricKit API for crash reporting is unwieldy. In particular, MXCallStackTree lacks any kind of interface for interacting with its structure. Meter includes some classes that make it easier to work with. In addition to providing an API for MXCallStackTree, Meter includes types to emulate and parse MetricKit diagnostics.

let data = mxTree.jsonRepresentation()
let tree = try CallStackTree.from(data: data)

for frame in tree.callStacks[0].frames {
    print("\(frame.address) \(frame.binaryName) \(frame.binaryUUID)")
}

MXMetricManager and Diagnostics Polyfill

MetricKit's crash reporting facilities require iOS 14, and isn't supported at all for tvOS, watchOS, or macOS. You may want to start moving towards using it as a standard interface between your app and whatever system consumes the data. Meter offers an API that's very similar to MetricKit's MXMetricManager to help do just that.

// adding a subscriber
MeterPayloadManager.shared.add(obj)

extension MyObject: MeterPayloadSubscriber {
    func didReceive(_ payloads: [DiagnosticPayloadProtocol]) {
        // this will be called for both simulated payloads *and* MeterKit payloads on OSes it supports
        print("received payloads \(payloads)")
    }
}

// posting diagnostics
MeterPayloadManager.shared.deliver(payloads)

This makes it easier to support the full capabilities of MetricKit when available, and gracefully degrade when they aren't. It can be nice to have a uniform interface to whatever backend system you are using to consume the reports. And, as you move towards an iOS 14 minimum, and as (hopefully) Apple starts supporting MetricKit on more platforms, it will be easier to pull out Meter altogether.

Backwards compatibility is still up to you, though. One solution is ImpactMeterAdapter, which uses Impact to collect crash data for OSes that don't support MXCrashDiagnostic.

If you're also looking for a way to transmit report data to your server, check out Wells.

On-Device Symbolication

The stack traces provided by MetricKit, like other types of crash logs, are not symbolicated. There are a bunch of different ways to tackle this problem, but one very convenient option is just to do it as a post-processing step on the device where the crash occurred. The dlopen family of APIs could be one approach. It has had some real limitions in the past, particularly on iOS. But, still worth a look.

Right now, this functionality is still in the investigation phase. But, if you have thoughts, please get in touch!

Suggestions or Feedback

We'd love to hear from you! Get in touch via twitter, an issue, or a pull request.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].