Skip to content

Commit

Permalink
Enable sentry for local and production dendrite environments (matrix-…
Browse files Browse the repository at this point in the history
…org#1552)

This PR enables Sentry on a new project in our
[org](https://here-not-there.sentry.io/projects/) for Dendrite both
localhost and remote environment where environment is constructed as the
tuple of `node domain, chainId`. Original sentry support was added
upstream by matrix-org in
[this](matrix-org#1803) PR.

Test issues:

https://here-not-there.sentry.io/issues/3950993903/?query=is%3Aunresolved&referrer=issue-stream

We should check that issues are published from ECS when this PR is
merged.
  • Loading branch information
jterzis authored Feb 22, 2023
1 parent 284abbb commit 626a5f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dendrite-zion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ global:
max_idle_conns: 5
conn_max_lifetime: -1

sentry:
enabled: true
dsn: https://[email protected]/4504720094986240
environment: ${SERVER_NAME}-chainId:${CHAIN_ID}

# The paths and expiry timestamps (as a UNIX timestamp in millisecond precision)
# to old signing private keys that were formerly in use on this domain. These
# keys will not be used for federation request or event signing, but will be
Expand Down
3 changes: 3 additions & 0 deletions setup/base/base.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ func NewBaseDendrite(cfg *config.Dendrite, options ...BaseDendriteOptions) *Base
if err != nil {
logrus.WithError(err).Panic("failed to start Sentry")
}
defer sentry.Flush(2 * time.Second)
sentry.CaptureMessage("Server started")

}

var dnsCache *gomatrixserverlib.DNSCache
Expand Down

0 comments on commit 626a5f6

Please sign in to comment.