Add pyroscope integration (#1176)
# What this PR does ## Which issue(s) this PR fixes ## Checklist - [ ] Tests updated - [ ] Documentation added - [ ] `CHANGELOG.md` updated
This commit is contained in:
parent
c06709fdb6
commit
aec54707ec
2 changed files with 14 additions and 0 deletions
|
|
@ -45,3 +45,4 @@ opentelemetry-instrumentation-celery==0.36b0
|
|||
opentelemetry-instrumentation-pymysql==0.36b0
|
||||
opentelemetry-instrumentation-wsgi==0.36b0
|
||||
opentelemetry-exporter-otlp-proto-grpc==1.15.0
|
||||
pyroscope-io==0.8.1
|
||||
|
|
@ -648,3 +648,16 @@ if OSS_INSTALLATION:
|
|||
"schedule": crontab(hour="*/12"), # noqa
|
||||
"args": (),
|
||||
} # noqa
|
||||
|
||||
PYROSCOPE_PROFILER_ENABLED = getenv_boolean("PYROSCOPE_PROFILER_ENABLED", default=False)
|
||||
if PYROSCOPE_PROFILER_ENABLED:
|
||||
import pyroscope
|
||||
|
||||
pyroscope.configure(
|
||||
application_name=os.getenv("PYROSCOPE_APPLICATION_NAME", "oncall"),
|
||||
server_address=os.getenv("PYROSCOPE_SERVER_ADDRESS", "http://pyroscope:4040"),
|
||||
auth_token=os.getenv("PYROSCOPE_AUTH_TOKEN", ""),
|
||||
tags={
|
||||
"celery_worker": os.getenv("CELERY_WORKER_QUEUE", None),
|
||||
},
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue