Add Pyroscope profiler
This commit is contained in:
parent
ad153cdefa
commit
27996b3bc5
|
@ -135,3 +135,13 @@ REST_FRAMEWORK = {
|
||||||
}
|
}
|
||||||
|
|
||||||
from app.local_settings import * # noqa
|
from app.local_settings import * # noqa
|
||||||
|
if PROFILER:
|
||||||
|
import pyroscope
|
||||||
|
pyroscope.configure(
|
||||||
|
application_name = "neptune",
|
||||||
|
server_address = "http://pyroscope:4040",
|
||||||
|
auth_token = os.getenv("PYROSCOPE_AUTH_TOKEN", ""),
|
||||||
|
# tags = {
|
||||||
|
# "region": f'{os.getenv("REGION")}',
|
||||||
|
# }
|
||||||
|
)
|
|
@ -13,6 +13,15 @@ services:
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
|
|
||||||
|
pyroscope:
|
||||||
|
image: pyroscope/pyroscope
|
||||||
|
environment:
|
||||||
|
- PYROSCOPE_LOG_LEVEL=debug
|
||||||
|
ports:
|
||||||
|
- '4040:4040'
|
||||||
|
command:
|
||||||
|
- 'server'
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
default:
|
default:
|
||||||
external:
|
external:
|
||||||
|
|
|
@ -7,3 +7,4 @@ stripe
|
||||||
django-rest-framework
|
django-rest-framework
|
||||||
numpy
|
numpy
|
||||||
uwsgi
|
uwsgi
|
||||||
|
pyroscope-io
|
||||||
|
|
|
@ -6,3 +6,4 @@ opensearch-py
|
||||||
stripe
|
stripe
|
||||||
django-rest-framework
|
django-rest-framework
|
||||||
numpy
|
numpy
|
||||||
|
pyroscope-io
|
||||||
|
|
Loading…
Reference in New Issue