Add Pyroscope profiler

This commit is contained in:
Mark Veidemanis 2022-08-02 22:22:22 +01:00
parent ad153cdefa
commit 27996b3bc5
Signed by: m
GPG Key ID: 5ACFCEED46C0904F
4 changed files with 21 additions and 0 deletions

View File

@ -135,3 +135,13 @@ REST_FRAMEWORK = {
}
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")}',
# }
)

View File

@ -13,6 +13,15 @@ services:
env_file:
- .env
pyroscope:
image: pyroscope/pyroscope
environment:
- PYROSCOPE_LOG_LEVEL=debug
ports:
- '4040:4040'
command:
- 'server'
networks:
default:
external:

View File

@ -7,3 +7,4 @@ stripe
django-rest-framework
numpy
uwsgi
pyroscope-io

View File

@ -6,3 +6,4 @@ opensearch-py
stripe
django-rest-framework
numpy
pyroscope-io