Add Pyroscope profiler

This commit is contained in:
2022-08-02 22:22:22 +01:00
parent ad153cdefa
commit 27996b3bc5
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")}',
# }
)