hotosm / galaxy-api

Backend to fetch data from Underpass
https://galaxy-api.hotosm.org/latest/redoc
GNU Affero General Public License v3.0
14 stars 5 forks source link

Enable Sentry to error/log monitoring #184

Closed dakotabenjamin closed 2 years ago

dakotabenjamin commented 2 years ago

Sentry can pull errors directly from the server and will be more useful than just tracking logs on cloudwatch or locally. We need to add the SDK as below:

import sentry_sdk
sentry_sdk.init(
    "<sentry api url>",

    # Set traces_sample_rate to 1.0 to capture 100%
    # of transactions for performance monitoring.
    # We recommend adjusting this value in production.
    traces_sample_rate=1.0
)