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

simple-breakpad-server

v1.0.0

Published

Simple breakpad crash reports collecting server

Downloads

29

Readme

Simple Breakpad Server

Simple collecting server for crash reports sent by google-breakpad.

Simple Breakpad Server is a lightweight alternative to Socorro for small projects.

Installing

npm install -g simple-breakpad-server

Now simply run simple-breakpad-server which should be in your PATH. Navigate to localhost:1127 in your browser to see the server.

Features

  • Send crash reports to the server from your applications.
  • Display crash report information like minidump stackwalks and application metadata.
  • Supports SQLite, PostgreSQL, MySQL, MariaDB
  • Simple web interface for viewing translated crash reports.
  • Add symbols from the web API.

Running in Development

Simple Breakpad Server uses Grunt as a task runner.

npm install
npm run-script serve

The server is now running on port 1127. The default database location is $HOME/.simple-breakpad-server/database.sqlite.

Endpoints

GET /crashreports

View a list of crash reports.

GET /crashreports/<id>

View a single crash report.

GET /crashreports/<id>/files/<file>

Download a file associated with this crash report. For example, to download the minidump file for a crash report, use /crashreports/123/files/upload_file_minidump.

GET /symfiles

See a list of available symfiles used to symbolize the crash reports.

GET /symfiles/<id>

See the contents of an individual symfile.

POST /crashreports

Create a new crash report. Use content type multipart/form-data. Some applications already dump a file in this format, so you can just upload that.

If you have a binary minidump file, use a curl request like this:

curl -F [email protected] \
     -F ver="0.0.1" \
     -F prod=cef \
     localhost:1127/crashreports

POST /symfiles

Add a new symbol file to the database to use to symbolize crash reports.

To create a symfile for your binary, first follow the instructions to install the google-breakpad project.

Then use the dump_syms binary to generate a symbol file.

dump_syms /path/to/binary > /path/to/symfile.syms

Use the content type multipart/form-data to upload it to the server from this endpoint with the name of the file being symfile. Here is an example curl request to upload your symfile:

curl -F [email protected] localhost:1127/symfiles

Configuration

Configuration is done in yaml (or json).

The configuration path is as follows:

  • $PWD/breakpad-server.yaml
  • $HOME/.simple-breakpad-server/breakpad-server.yaml
  • /etc/breakpad-server.yaml

Here is an example configuration:

port: 1127
baseUrl: '/'
database:
  database: 'simple-breakpad-server'
  username: 'myuser'
  password: 'secret'
  dialect: 'sqlite'
  storage: '/home/myuser/.simple-breakpad-server/database.sqlite'
  logging: false
customFields:
  files:
    - name: 'customfile1'
      downloadAs: 'customfile1.jpg'
    - name: 'customfile2'
  params: ['customparam']
dataDir: '/home/myuser/.simple-breakpad-server'

Database configuration

Database options are passed directly to Sequelize. See that page for details on how to configure the database. Currently, sqlite is best supported by Simple Breakpad Server.

Custom Fields

Place a list of file parameters in the files array. These will be stored in the database as blobs and can contain binary data. Non-files should go into the params array. These will be stored in the database encoded as strings. File parameters can either be a simple string, or an object specifying a required name (used for upload and download url) and an optional downloadAs which specifies what name will be used when downloading.

Custom files can be downloaded from the GET /crashreports/<id>/files/<file> endpoint and custom params will be shown on the main page for the crash report.

For now, if you change this configuration after the database is initialized, you will have to create the tables on your database manually for things to work.

Data Directory

Simple breakpad server caches symbols on the disk within the directory specified by dataDir. The default location is $HOME/.simple-breakpad-server.

Contributing

Simple Breakpad Server is a work in progress and there is a lot to do. Send pull requests and issues on the project's Github page.

Here are some things to do:

  • improve UI
  • endpoint to delete crash reports
  • group and filter crash reports
  • script to create symfiles
  • cli

License

This project is open source and available to you under an MIT license.