2.3.0 Rollbar

0. Learning Materials

Task List

Env Variables

Micro service
Variables

backend

  • HONEYCOMB_API_KEY

  • OTEL_SERVICE_NAME

  • OTEL_EXPORTER_OTLP_ENDPOINT

  • OTEL_EXPORTER_OTLP_HEADERS

  • AWS_XRAY_URL

  • AWS_XRAY_DAEMON_ADDRESS

  • AWS_DEFAULT_REGION

  • AWS_ACCESS_KEY_ID

  • AWS_SECRET_ACCESS_KEY

  • ROLLBAR_ACCESS_TOKEN

x-ray daemon

  • AWS_ACCESS_KEY_ID

  • AWS_SECRET_ACCESS_KEY

  • AWS_REGION


1. Workflow

1. Implement Rollbar

1.1. Update requirements.txt

Rollbar is an error monitoring platform, similar to all the other observability tools we have implemented so far - AWS X-Ray, CloudWatch and Honeycomb.

  • Now, run pip install -r requirements.txt so the Rollbar libraries are installed locally.

1.2. Implement rollbar in app.py

Below is the original code provided by Rollbar to setup Rollbar SDK. However, the Flask server will break cause it's buggy.

In order to add the working code to app.py across the file where appropriate, refer to:

Also refer to the troubleshooting log "Bug Fix: pyrollbar: No access_token provided." here.

2. Update the backend-container of docker-compose

Update the environment variable for the backend-container in docker.compose.

Then run docker-compose.

Last updated