Skip to content

Sentry SDK for C, C++ and native applications.

Notifications You must be signed in to change notification settings

ScatterCo/sentrypad

 
 

Repository files navigation

SentryPad

SentryPad is a wrapper around two most popular crash-reporting frameworks: Breakpad and Crashpad. It provides an abstraction layer that unlocks certain Sentry features, such as setting tags and adding breadcrumbs to your crashes. SentryPad is also responsible for sending the crashes directly to Sentry in an efficient manner.

Platforms we are going to support eventually: MacOS X, Linux (32/64 bit), Windows (32/64 bit), Android, iOS.

Table of Contents

Downloads

Packages with source code can be downloaded from the release page.

What is inside

At the moment, we package and distribute the following components:

  • Sentrypad source code
  • Crashpad source code
  • Build files for MacOS ("make" files) and Windows (Visual Studio solution)

If any of the provided build files do not work for you, please refer to Development: Generating Build Files

Build Prerequisites

In order to build the provided source files, you will need the following software:

MacOS

Windows

  • Microsoft Visual Studio 2017 (or later)

Building Crashpad + Sentrypad

WARNING: The following commands will work for the packaged version of Sentrypad (see Downloads). We generate gen_macosx and gen_windows during the CI build, so you will not find them in the git repository.

MacOS

cd gen_macosx
make

The command will build both Crashpad and Sentrypad libraries, as well as an application example (bin/Release/sentry_example_crashpad).

Windows

Visual Studio solution is located at gen_windows/Sentrypad.sln and contains projects for both Sentrypad and Crashpad.

WARNING: There is a known issue that the Windows SDK version configured in the solution might not be present on your system. If you see "The Windows SDK version XXX was not found" error, you can try to "Retarget Solution" ("Project" -> "Retarget solution"). You can also regenerate build files on the target machine, for that please consult the development section.

Sample Application

The build commands will produce Sentrypad and Crashpad libraries (e.g. ./bin/Release/libsentry_crashpad.dylib on MacOS), and a sample crashing application. You can run it by passing your Sentry DSN key via an environment variable:

# MacOS
SENTRY_DSN=https://[email protected]/YYYYY ./bin/Release/sentry_example_crashpad

The command will result into a segmentation fault, and a new event will be sent to Sentry. If debug symbols are present in Sentry (dSYM or PDB files, they are generated automatically in the output directory), the event will also be properly symbolicated.

Development: Generating Build Files

If you want to develop/test Sentrypad locally, or the distribution package doesn't fit your needs, you can run generate build files right from the premake/ directory. We use premake5 to prepare build files.

Additional Dependencies

  • premake5: we use premake to generate build files.

MacOS

cd premake/
premake5 gmake2

...will create a set of Makefiles that you can use to build any part of the project.

Use make help to see all available targets.

Windows

cd premake/
premake5 vs2017

The last command will create a Visual Studio 2017 solution (Sentrypad.sln) that contains Crashpad and Sentrypad library projects, and a sentry_example_crashpad example project.

About

Sentry SDK for C, C++ and native applications.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 43.5%
  • Lua 41.6%
  • C 8.6%
  • Shell 4.6%
  • Objective-C++ 1.1%
  • Python 0.6%