Skip to content

Commit

Permalink
Allow pprof to be started when using docker-compose (cadence-workflow…
Browse files Browse the repository at this point in the history
  • Loading branch information
mantas-sidlauskas authored Jul 31, 2024
1 parent fbfe1d4 commit 891ede5
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
24 changes: 20 additions & 4 deletions docker/config_template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,11 @@ services:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT_0 }}
{{- end }}

{{- if .Env.FRONTEND_PPROF_PORT }}
pprof:
port: {{ .Env.FRONTEND_PPROF_PORT }}
host: {{ default .Env.BIND_ON_IP "localhost" }}
{{- end }}
matching:
rpc:
port: {{ default .Env.MATCHING_PORT "7935" }}
Expand All @@ -164,7 +168,11 @@ services:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT_1 }}
{{- end }}

{{- if .Env.MATCHING_PPROF_PORT }}
pprof:
port: {{ .Env.MATCHING_PPROF_PORT }}
host: {{ default .Env.BIND_ON_IP "localhost" }}
{{- end }}
history:
rpc:
port: {{ default .Env.HISTORY_PORT "7934" }}
Expand All @@ -186,7 +194,11 @@ services:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT_2 }}
{{- end }}

{{- if .Env.HISTORY_PPROF_PORT }}
pprof:
port: {{ .Env.HISTORY_PPROF_PORT }}
host: {{ default .Env.BIND_ON_IP "localhost" }}
{{- end }}
worker:
rpc:
port: {{ default .Env.WORKER_PORT "7939" }}
Expand All @@ -207,7 +219,11 @@ services:
timerType: {{ default .Env.PROMETHEUS_TIMER_TYPE "histogram" }}
listenAddress: {{ .Env.PROMETHEUS_ENDPOINT_3 }}
{{- end }}

{{- if .Env.WORKER_PPROF_PORT }}
pprof:
port: {{ .Env.WORKER_PPROF_PORT }}
host: {{ default .Env.BIND_ON_IP "localhost" }}
{{- end }}
clusterGroupMetadata:
clusterRedirectionPolicy:
policy: {{ default .Env.CLUSTER_REDIRECT_POLICY "all-domain-apis-forwarding" }}
Expand Down
2 changes: 2 additions & 0 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,15 @@ services:
- "7935:7935"
- "7939:7939"
- "7833:7833"
- "7936:7936"
environment:
- "CASSANDRA_SEEDS=cassandra"
- "PROMETHEUS_ENDPOINT_0=0.0.0.0:8000"
- "PROMETHEUS_ENDPOINT_1=0.0.0.0:8001"
- "PROMETHEUS_ENDPOINT_2=0.0.0.0:8002"
- "PROMETHEUS_ENDPOINT_3=0.0.0.0:8003"
- "DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development.yaml"
- "FRONTEND_PPROF_PORT=7936"
- "LOG_LEVEL=debug"
depends_on:
cassandra:
Expand Down

0 comments on commit 891ede5

Please sign in to comment.