Semaphore - Official Sentry Relay
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.
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
credentials.json file in the
To run semaphore in the foreground and connect to the upstream sentry installation
run can be used:
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
semaphore command with the path to an alternative location.
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
(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
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.
Like Sentry, Semaphore is licensed under the BSL. See the
LICENSE file and
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
cargo-watch installed, the
make devserver command can auto-reload the
$ cargo install systemfd cargo-watch $ make devserver
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
Running in Docker
Docker image for
semaphore can be found at
For example, you can start the latest version of
semaphore as follows:
docker run -v $(pwd)/configs/:/etc/semaphore/ us.gcr.io/sentryio/semaphore run --config /etc/semaphore
The command assumes that semaphore's configuration (
credentials.json) are stored in
./configs/ directory on the host machine.
We use craft to release new versions.