2020-01-22 10:20:28 +01:00
|
|
|
# Coredump Uploader
|
2019-12-06 15:31:45 +01:00
|
|
|
|
2020-02-28 12:34:49 +01:00
|
|
|
This utility can upload core dumps to Sentry. It can either upload a single core dump or watch a folder
|
|
|
|
for incoming core dumps to automatically upload them as they happen.
|
|
|
|
|
2020-01-22 10:20:28 +01:00
|
|
|
## Requirements
|
2019-12-06 15:31:45 +01:00
|
|
|
|
2020-01-22 10:20:28 +01:00
|
|
|
- python
|
|
|
|
- poetry
|
|
|
|
- gdb
|
|
|
|
- elfutils
|
2019-12-18 12:05:14 +01:00
|
|
|
|
2020-01-22 10:20:28 +01:00
|
|
|
## Usage
|
2019-12-06 15:31:45 +01:00
|
|
|
|
2020-02-19 10:34:23 +01:00
|
|
|
### Upload coredump
|
|
|
|
|
2019-12-06 15:31:45 +01:00
|
|
|
````
|
|
|
|
$ export SENTRY_DSN=https://something@your-sentry-dsn/42
|
2020-02-19 10:34:23 +01:00
|
|
|
$ upload_coredump /path/to/core upload /path/to/executable
|
2019-12-06 15:31:45 +01:00
|
|
|
````
|
|
|
|
|
|
|
|
OR
|
|
|
|
|
|
|
|
````
|
2020-02-19 10:34:23 +01:00
|
|
|
$ upload_coredump --sentry-dsn https://something@your-sentry-dsn/42 /path/to/executable upload /path/to/core
|
|
|
|
````
|
|
|
|
|
|
|
|
### Watch for coredumps
|
|
|
|
|
|
|
|
````
|
|
|
|
$ upload_coredump --sentry-dsn https://something@your-sentry-dsn/42 /path/to/executable watch /path/to/dir
|
2020-01-22 10:20:28 +01:00
|
|
|
````
|
|
|
|
|
|
|
|
## Development
|
|
|
|
|
|
|
|
We use Poetry for development. To get started, first install dependencies:
|
|
|
|
|
|
|
|
```
|
|
|
|
poetry install
|
|
|
|
```
|
|
|
|
|
|
|
|
To run tests, use:
|
|
|
|
|
|
|
|
```
|
|
|
|
poetry run pytest tests/
|
|
|
|
```
|
|
|
|
|
|
|
|
To run the application:
|
|
|
|
|
|
|
|
```
|
|
|
|
poetry run upload_coredump ...
|
|
|
|
```
|