In order to track exceptions that may occur in out software in a production or staging environment we use Sentry provides libraries for most of the programming languages so that you can connect your software with a sentry client and it will send any exception that may occur directly to

In Sentry you can create your own projects and every project will have a DSN, which is a url with the following format: {PROTOCOL}://{PUBLIC_KEY}:{SECRET_KEY}@{HOST}{PATH}/{PROJECT_ID} . That is what you need to setup in your sentry client in order to send the error messages to the right project.

Quick example

Python DOC

from sentry_sdk import init, capture_message


capture_message("Hello World")  # Will create an event.

raise ValueError()  # Will also create an event.

Java DOC

import io.sentry.Sentry;

Sentry.init(options -> {


When initialising Sentry, different parameters can be configured.

environment: indicates whether the error ocurred in production, staging or any other environments you might have.

release: Commonly used to specify git commit hash or tag.

Tags: to specify extra tags

servername: Name of the server it is running on

And many more


The way we are currently specifying environments is via environment variables. We expect (as it is how it is configured via terraform) that the docker container running on AWS ECS will contain an environment variable called ENV.

Your software should be able to specify the environment it is running on by reading the ENV environment variable, you can then configure your sentry client like that:


Then you can filter events in website by environment, tag, release, etc.