Sign inSign up

pagerinc/sentry

By pagerinc

•Updated over 7 years ago

Sentry is a realtime, platform-agnostic error logging and aggregation platform

Image
0

641

pagerinc/sentry repository overview

⁠Sentry

This project is based off the official Docker image⁠ and serves as an on-premise Sentry installation on Aptible's platform.

Please refer to the official docs⁠ for details on the configuration and setup instructions.

⁠Setup

The following env vars are used by sentry:

EnvDescription
FORCE_SSLAptible-specific, enables SSL termination.
GITHUB_API_SECRETGitHub plugin settings. API secret from OAuth App.
GITHUB_APP_IDGitHub plugin settings. OAuth App id.
SENTRY_SECRET_KEYSentry secret sessions key. Generated via $ sentry config generate-secret-key.
SENTRY_ENVIRONMENTEnvironment name for installation, production is recommended.

Additionaly, the Postgres connection requires SENTRY_DB_NAME, SENTRY_DB_PASSWORD, SENTRY_DB_USER, SENTRY_POSTGRES_HOST and SENTRY_POSTGRES_PORT to be set.

The Redis connection uses all of the following envs: SENTRY_REDIS_HOST, SENTRY_REDIS_PASSWORD and SENTRY_REDIS_PORT.

⁠Outbound email

The following env vars are required for transactional email:

EnvValue
SENTRY_EMAIL_USE_TLStrue
SENTRY_SMTP_HOSTNAMEsmtp.mailgun.org
SENTRY_EMAIL_USERMailgun SMTP username
SENTRY_EMAIL_PASSWORDMailgun SMTP password
SENTRY_EMAIL_PORT465

For details, check out Mailgun's SMTP docs⁠.

⁠Deploying

Use Aptible's Docker deployments⁠:

aptible deploy --app sentry --docker-image sentry:$TAG

⁠Project settings

Following is a brief description of the setup required for new projects on the on-premise deployment.

Don't forget to Save your changes!

⁠General

Under Event Settings, set Default Environment to production and Auto resolve threshold to 30 days.

⁠Integrations

Enable Sentry, PagerDuty and GitHub integrations.

  1. Enter GitHub repo uri as pagerinc/$REPONAME.
  2. Input PagerDuty's Service Key.
  3. Enter Slack's Webhook URL, Icon URL and Destination (#mayday). Check Include Tags and Include Rules.
⁠Alerts

The following table contains a description of the recommended default ruleset. If in doubt, copy the rules over from any of the other projects.

RuleDescriptionSettings
Send a notification for new eventsSlack alert on new issuesAn event is first seen
Send a notification for regressionsSlack alert on regressionsAn event changes state from resolved to unresolved
High error rateTriggers a PagerDuty eventAn event is seen more than 5 times in one hour and its environment attribute equals production
⁠Repositories

Go to Manage -> Repositories and add pagerinc/$REPO so we can better tag releases.

Tag summary

Content type

Image

Digest

Size

245.2 MB

Last updated

over 7 years ago

docker pull pagerinc/sentry