Giter VIP home page Giter VIP logo

symbolicator's Introduction


A symbolication service for native stacktraces and minidumps with symbol server support. It's a flexible frontend for parts of the symbolic library.

Documentation

Compiling

Symbolicator is currently not distributed as binary, which means you need to compile it yourself. It is written in Rust and requires the latest stable Rust compiler.

To compile, run:

cargo build --release

The resulting binary ends up in target/release/symbolicator along with a debug information file. On Linux, debug information is part of the executable and might need to be stripped using objcopy.

Usage with Sentry

The following requires a recent git version of Sentry.

While Symbolicator aims to not be tied to Sentry's usecases, Sentry has a hard dependency on Symbolicator to process native stacktraces. To get it running for local development:

  • In your ~/.sentry/sentry.conf.py:

    # Allow Symbolicator's request IP to fetch debug files from Sentry.
    INTERNAL_SYSTEM_IPS = ["127.0.0.1"]
  • In your ~/.sentry/config.yml:

    symbolicator.enabled: true

Then run sentry devservices up to download and start Symbolicator.

Development

To build Symbolicator, we require the latest stable Rust.

We use VSCode for development. This repository contains settings files configuring code style, linters, and useful features. When opening the project for the first time, make sure to install the Recommended Extensions, as they will allow editor assist during coding.

The root of the repository contains a Makefile with useful commands for development:

  • make check: Runs code formatting checks and linters. This is useful before opening a pull request.
  • make test: Runs unit tests, integration tests and Python package tests (see below for more information).
  • make all: Runs all checks and tests. This runs most of the tasks that are also performed in CI.
  • make clean: Removes all build artifacts, the virtualenv and cached files.

Building and Running

The easiest way to rebuild and run Symbolicator is using cargo. Depending on the configuration, you may need to have a local instance of Sentry running.

# Rebuild and run with all features
cargo run -- run

For quickly verifying that Symbolicator compiles after making some changes, you can also use cargo check:

cargo check

Local configuration

By default, Symbolicator listens on port 3021. To override this and other configuration values, create a file local.yml in the project root folder. It is excluded from version control by default. Then, start Symbolicator and point to the configuration file:

cargo run -- run --config local.yml

Tests

The test suite comprises unit tests, and an integration test suite. Unit tests are implemented as part of the Rust crates and can be run via:

# Tests for default features
make test-rust

The integration test suite requires python. By default, the integration test suite will create a virtualenv, build the Symbolicator binary, and run a set of integration tests:

# Create a new virtualenv, build Symbolicator and run integration tests
make test-integration

# Build and run a single test manually
make build
.venv/bin/pytest tests/integration -k <test_name>

Note: On macOS, the default file descriptor limit of 256 is too low and causes test failures. Before running tests, consider to increase is to a higher value:

ulimit -n 4096

Linting

We use rustfmt and clippy from the latest stable channel for code formatting and linting. To make sure that these tools are set up correctly and running with the right configuration, use the following make targets:

# Format the entire codebase
make format

# Run clippy on the entire codebase
make lint

symbolicator's People

Contributors

jan-auer avatar untitaker avatar mitsuhiko avatar swatinem avatar tonyo avatar loewenheim avatar relaxolotl avatar dependabot-preview[bot] avatar byk avatar getsentry-bot avatar flub avatar ezhevita avatar slve avatar armenzg avatar bruno-garcia avatar hamled avatar hazat avatar dschmidt avatar jtcunning avatar josb avatar samsartor 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.