Using big shuttered boxes rather than the old-fashioned semaphore arms.
Clone or download
Cannot retrieve the latest commit at this time.
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.vscode meta: Changelog for 0.2.0 Sep 27, 2018
artwork
cabi
common release: 0.2.0 Sep 27, 2018
fixtures feat: Refactor build pipeline for Linux (#46) Aug 23, 2018
py feat: Expose chunking to python (#90) Sep 27, 2018
scripts
server release: 0.2.0 Sep 27, 2018
src build: Upgrade sentry and use its Uuid type Sep 19, 2018
tests/integration fix: Various fixes from work on docs (#88) Sep 18, 2018
.appveyor.yml test: Skip cert verifications on appveyor because flaky Aug 24, 2018
.craft.yml feat: Add "gcs" target to craft config Sep 27, 2018
.dockerignore feat: Add Dockerfile (#23) May 15, 2018
.freight.yml
.gitignore build: Add makefile for integration tests, work a bit on testsuite Aug 24, 2018
.travis.yml build: Update to rust 1.29.0 and fix travis build (#86) Sep 14, 2018
CHANGELOG.md meta: Changelog for 0.2.0 Sep 27, 2018
Cargo.lock
Cargo.toml release: 0.2.0 Sep 27, 2018
Dockerfile.build
Dockerfile.publish fix(docker): Update volumes and their permissions Sep 10, 2018
LICENSE meta: Added license and readme Jan 16, 2018
Makefile build: Update to rust 1.29.0 and fix travis build (#86) Sep 14, 2018
README.md
build.rs feat: Added completions support May 13, 2018
docker-entrypoint.sh
pytest.ini
relay_dev.cert feat: Add TLS support Apr 27, 2018
relay_dev.pem
relay_dev.pfx feat: Fix SSL support, make SSL default feature (#66) Aug 30, 2018

README.md


Semaphore - Official Sentry Relay

Travis AppVeyor codecov without integration tests GitHub release PyPI license

semaphore tower

The Sentry Relay (aka Semaphore) is a work in progress service that pushes some functionality from the Sentry SDKs as well as the Sentry server into a proxy process.

Quickstart

Semaphore needs a relay ready sentry installation to connect to. It stores all of its settings in a .semaphore folder in the current working directory by default. The initial config can be created through a wizard:

semaphore config init

This will guide you through the setup experience and create a config.yml and credentials.json file in the .semaphore folder.

To run semaphore in the foreground and connect to the upstream sentry installation run can be used:

semaphore run

To see the entire config (including defaults) the following command can be used:

semaphore config show

To change the location of the config folder the --config parameter can be passed to the semaphore command with the path to an alternative location.

Upstream Registration

When the semaphore runs it registers itself with the upstream configured sentry instance as a relay. Right now relays can only directly connect to Sentry as they do not yet proxy through non store requests. Each relay is identified by the (relay_id, public_key) tuple upstream. Multiple relays can share the same public key if they run with different relay IDs.

At present Sentry requires the relays to be explicitly whitelisted by their public key. This is done through the SENTRY_RELAY_WHITELIST_PK config key which is a list of permitted public keys.

Metrics and Crash Reporting

By default the relay currently reports directly to sentry.io. This can be disabled by setting the sentry.enabled key to false. Additionally a different DSN can be supplied with sentry.dsn. Crash reporting will become opt-in before the initial public release.

Stats can be submitted to a statsd server by configuring metrics.statsd key. It can be put to a ip:port tuple. Additionally metrics.prefix can be configured to have a different prefix (the default is sentry.relay). This prefix is added in front of all metrics.

License

Semaphore is licensed under the MIT license.

Development

We're going to settle on using vscode for this project for now. We're targeting stable rust at the moment and the repo is appropriately configured.

If you have systemfd and cargo-watch installed, the make devserver command can auto-reload the relay:

$ cargo install systemfd cargo-watch
$ make devserver

SSL

The repository contains a SSL-certificate + private key for development purposes. It comes in two formats: Once as a (.pem, .cert)-pair, once as .pfx (PKCS #12) file.

The password for the .pfx file is password.

Release management

Use the ./scripts/bump-version.sh script to bump versions:

# Check that there is a changelog entry, update configuration files, commit and tag the changes
$ bash ./scripts/bump-version.sh patch
# Check that everything looks good, then push the new release
$ git push origin master NEW_VERSION

Do not forget to update CHANGELOG.md, the versioning script will remind you to do it.