Skip to content

Commit

Permalink
Merge pull request #1971 from planetarium/feature/datadog
Browse files Browse the repository at this point in the history
Add missing datadog config
  • Loading branch information
sky1045 authored Aug 27, 2024
2 parents 7186a87 + 052bd9c commit cb5f000
Show file tree
Hide file tree
Showing 6 changed files with 158 additions and 38 deletions.
11 changes: 6 additions & 5 deletions 9c-main/multiplanetary/network/9c-network.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ global:
- "turn://0ed3e48007413e7c2e638f13ddd75ad272c6c507e081bd76a75e4b7adc86c9af:0apejou+ycZFfwtREeXFKdfLj2gCclKzz5ZJ49Cmy6I=@turn-us4.planetarium.dev:3478"
- "turn://0ed3e48007413e7c2e638f13ddd75ad272c6c507e081bd76a75e4b7adc86c9af:0apejou+ycZFfwtREeXFKdfLj2gCclKzz5ZJ49Cmy6I=@turn-us5.planetarium.dev:3478"

pyroscope:
enabled: true

networkType: Main
planet: Odin
consensusType: pbft
Expand Down Expand Up @@ -124,6 +121,8 @@ validator:
value: "/data"

loggingEnabled: true
datadog:
enabled: true

extraArgs:
- --tx-quota-per-signer=1
Expand Down Expand Up @@ -216,6 +215,8 @@ remoteHeadless:
value: remote-headless-test

loggingEnabled: true
datadog:
enabled: true

dataProviderDataMigrator:
enabled: true
Expand Down Expand Up @@ -296,11 +297,11 @@ fullState:
enabled: true

loggingEnabled: true
datadog:
enabled: true

useTurnServer: false

setupPyroscope: true

host: "9c-main-full-state.nine-chronicles.com"

extraArgs:
Expand Down
6 changes: 6 additions & 0 deletions 9c-main/multiplanetary/network/heimdall.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ fullState:
enabled: true

loggingEnabled: true
datadog:
enabled: true

useTurnServer: false

Expand Down Expand Up @@ -183,6 +185,8 @@ validator:
value: "0x5A"

loggingEnabled: true
datadog:
enabled: true

extraArgs:
- --tx-quota-per-signer=1
Expand Down Expand Up @@ -268,6 +272,8 @@ remoteHeadless:
value: remote-headless-test

loggingEnabled: true
datadog:
enabled: true

dataProviderDataMigrator:
enabled: true
Expand Down
69 changes: 38 additions & 31 deletions charts/all-in-one/templates/full-state.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,29 @@ spec:
metadata:
labels:
app: main-full-state
annotations:
prometheus.io/port: '80'
prometheus.io/scrape: 'true'
name: main-full-state
spec:
{{- if $.Values.fullState.setupPyroscope }}
{{- if $.Values.fullState.datadog.enabled }}
initContainers:
- command:
- sh
- -c
- |
apk --no-cache add curl tar
curl -s -L https://github.com/grafana/pyroscope-dotnet/releases/download/v0.8.14-pyroscope/pyroscope.0.8.14-glibc-x86_64.tar.gz | tar xvz -C /data
- sh
- '-c'
- >
apk --no-cache add curl tar
mkdir /data/datadog
curl -s -L
https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.57.0/datadog-dotnet-apm-2.57.0.tar.gz
| tar xvz -C /data/datadog
sh /data/datadog/createLogPath.sh
image: alpine
imagePullPolicy: Always
name: setup-pyroscope
name: setup-datadog
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
Expand Down Expand Up @@ -144,34 +154,31 @@ spec:
- name: JSON_LOG_PATH
value: ./logs/$(POD_NAME)_$(NAMESPACE_NAME)_full-state.json
{{- end }}
{{- if $.Values.global.pyroscope.enabled }}
- name: PYROSCOPE_APPLICATION_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: metadata.name
- name: PYROSCOPE_SERVER_ADDRESS
value: {{ $.Values.global.pyroscope.address }}
- name: PYROSCOPE_PROFILING_ENABLED
value: "1"
{{- if $.Values.fullState.datadog.enabled }}
- name: OTLP_ENDPOINT
value: 'http://datadog.datadog.svc.cluster.local:4317'
- name: CORECLR_ENABLE_PROFILING
value: "1"
value: '1'
- name: CORECLR_PROFILER
value: "{BD1A650D-AC5D-4896-B64F-D6FA25D6B26A}"
value: '{846F5F1C-F9AE-4B07-969E-05C26BC060D8}'
- name: CORECLR_PROFILER_PATH
value: "/data/Pyroscope.Profiler.Native.so"
value: /data/datadog/Datadog.Trace.ClrProfiler.Native.so
- name: LD_PRELOAD
value: "/data/Pyroscope.Linux.ApiWrapper.x64.so"
- name: PYROSCOPE_PROFILING_CPU_ENABLED
value: "true"
- name: PYROSCOPE_PROFILING_EXCEPTION_ENABLED
value: "true"
- name: PYROSCOPE_PROFILING_ALLOCATION_ENABLED
value: "true"
- name: PYROSCOPE_PROFILING_LOCK_ENABLED
value: "true"
- name: OTLP_ENDPOINT
value: http://tempo.monitoring.svc.cluster.local:4317
value: /data/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so
- name: DD_ENV
value: production
- name: DD_PROFILING_ENABLED
value: 'true'
- name: DD_PROFILING_ALLOCATION_ENABLED
value: 'true'
- name: DD_PROFILING_LOCK_ENABLED
value: 'true'
- name: DD_PROFILING_HEAP_ENABLED
value: 'true'
- name: DD_DOTNET_TRACER_HOME
value: /data/datadog
- name: DD_AGENT_HOST
value: datadog.datadog.svc.cluster.local
{{- end }}
{{- with $.Values.fullState.env }}
{{- toYaml . | nindent 10 }}
Expand Down
50 changes: 50 additions & 0 deletions charts/all-in-one/templates/remote-headless.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,30 @@ spec:
- mountPath: /data
name: remote-headless-data-{{ $index }}
{{- end }}
{{- if $.Values.remoteHeadless.datadog.enabled }}
- command:
- sh
- '-c'
- >
apk --no-cache add curl tar
mkdir /data/datadog
curl -s -L
https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.57.0/datadog-dotnet-apm-2.57.0.tar.gz
| tar xvz -C /data/datadog
sh /data/datadog/createLogPath.sh
image: alpine
imagePullPolicy: Always
name: setup-datadog
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data
name: remote-headless-data-{{ $index }}
{{- end }}
- command:
- sh
- '-c'
Expand Down Expand Up @@ -214,6 +238,32 @@ spec:
- name: JSON_LOG_PATH
value: ./logs/$(POD_NAME)_$(NAMESPACE_NAME)_remote-headless-{{ $index }}.json
{{- end }}
{{- if $.Values.remoteHeadless.datadog.enabled }}
- name: OTLP_ENDPOINT
value: 'http://datadog.datadog.svc.cluster.local:4317'
- name: CORECLR_ENABLE_PROFILING
value: '1'
- name: CORECLR_PROFILER
value: '{846F5F1C-F9AE-4B07-969E-05C26BC060D8}'
- name: CORECLR_PROFILER_PATH
value: /data/datadog/Datadog.Trace.ClrProfiler.Native.so
- name: LD_PRELOAD
value: /data/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so
- name: DD_ENV
value: production
- name: DD_PROFILING_ENABLED
value: 'true'
- name: DD_PROFILING_ALLOCATION_ENABLED
value: 'true'
- name: DD_PROFILING_LOCK_ENABLED
value: 'true'
- name: DD_PROFILING_HEAP_ENABLED
value: 'true'
- name: DD_DOTNET_TRACER_HOME
value: /data/datadog
- name: DD_AGENT_HOST
value: datadog.datadog.svc.cluster.local
{{- end }}
{{- with $.Values.remoteHeadless.env }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
50 changes: 50 additions & 0 deletions charts/all-in-one/templates/validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,30 @@ spec:
- mountPath: /data
name: validator-data-{{ $index }}
{{- end }}
{{- if $.Values.validator.datadog.enabled }}
- command:
- sh
- '-c'
- >
apk --no-cache add curl tar
mkdir /data/datadog
curl -s -L
https://github.com/DataDog/dd-trace-dotnet/releases/download/v2.57.0/datadog-dotnet-apm-2.57.0.tar.gz
| tar xvz -C /data/datadog
sh /data/datadog/createLogPath.sh
image: alpine
imagePullPolicy: Always
name: setup-datadog
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /data
name: validator-data-{{ $index }}
{{- end }}
- command:
- sh
- '-c'
Expand Down Expand Up @@ -150,6 +174,32 @@ spec:
- name: JSON_LOG_PATH
value: ./logs/$(POD_NAME)_$(NAMESPACE_NAME)_validator-{{ $index }}.json
{{- end }}
{{- if $.Values.validator.datadog.enabled }}
- name: OTLP_ENDPOINT
value: 'http://datadog.datadog.svc.cluster.local:4317'
- name: CORECLR_ENABLE_PROFILING
value: '1'
- name: CORECLR_PROFILER
value: '{846F5F1C-F9AE-4B07-969E-05C26BC060D8}'
- name: CORECLR_PROFILER_PATH
value: /data/datadog/Datadog.Trace.ClrProfiler.Native.so
- name: LD_PRELOAD
value: /data/datadog/continuousprofiler/Datadog.Linux.ApiWrapper.x64.so
- name: DD_ENV
value: production
- name: DD_PROFILING_ENABLED
value: 'true'
- name: DD_PROFILING_ALLOCATION_ENABLED
value: 'true'
- name: DD_PROFILING_LOCK_ENABLED
value: 'true'
- name: DD_PROFILING_HEAP_ENABLED
value: 'true'
- name: DD_DOTNET_TRACER_HOME
value: /data/datadog
- name: DD_AGENT_HOST
value: datadog.datadog.svc.cluster.local
{{- end }}
{{- with $.Values.validator.env }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
10 changes: 8 additions & 2 deletions charts/all-in-one/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ validator:
memory: 20Gi

loggingEnabled: false
datadog:
enabled: false

nodeSelector: {}

Expand Down Expand Up @@ -186,8 +188,10 @@ remoteHeadless:
cpu: 2
memory: 20Gi

loggingEnabled: false
rateLimitEnabled: false
loggingEnabled: false
datadog:
enabled: false

nodeSelector: {}
tolerations: []
Expand Down Expand Up @@ -278,6 +282,9 @@ fullState:
# - --key=val

useTurnServer: true
loggingEnabled: false
datadog:
enabled: false

host: ""
# - "a7ce1613cc0da437c8b06ceb4c4718f4-477884391.us-east-2.elb.amazonaws.com"
Expand All @@ -300,7 +307,6 @@ fullState:
nodeSelector: {}
tolerations: []
affinity: {}
loggingEnabled: false

worldBoss:
enabled: false
Expand Down

0 comments on commit cb5f000

Please sign in to comment.