- Notifications
You must be signed in to change notification settings - Fork 231
Closed
Labels
Description
With start apm in docker, I just set up agent in fastapi. Then I run app with uvicorn, it hangs.
To Reproduce
- Start Service with docker compose Reference
- Run the following simple FastAPI app:
from fastapi import FastAPI from elasticapm.contrib.starlette import make_apm_client, ElasticAPM import uvicorn apm = make_apm_client({'SERVICE_NAME': 'test', 'SERVER_URL': 'http://0.0.0.0:8200'}) app = FastAPI() app.add_middleware(ElasticAPM, client=apm) @app.get("/") def read_root(): return {"Hello": "World"} if __name__ == '__main__': uvicorn.run(app, host='0.0.0.0', port=8000)
Environment
- OS: Mac
- Python version:
3.7.10
- Framework and version:
fastapi==0.66.0
- APM Server version:
image: docker.elastic.co/apm/apm-server:7.13.2
- Agent version:
elastic-apm==6.3.0
fgsalomon