Aiohttp in Docker

I started sentry using the recommended method for aiohttp as follows. When I start my script with “python [script name]”, it works like a charm. However, when I start the same server inside a minimal docker environment (from from python:3.8), it never captures errors. Is there a problem with sentry’s official recommended setup?

from sentry_sdk.integrations.aiohttp import AioHttpIntegration

# Sentry
sentry_sdk.init(
    dsn="https://xxxx.ingest.sentry.io/12345",
    integrations=[AioHttpIntegration()]
)

The server is running correctly, so it can’t be that the library is missing. Indeed, it’s in requirements.txt:

sentry-sdk==0.14.3

The Dockerfile couldn’t be simpler:

from python:3.8

copy . /app
workdir /app
run pip install -r requirements.txt

expose 5000

cmd [ "python", "file.py" ]

Hello @allen,

To directly answer your question, there are no known problems running the SDK under either Python 3.8 or within Docker. Please try passing debug=True to init() as that will give you insight into crashes internal to the SDK.