diff --git a/9c-main/multiplanetary/network/9c-network.yaml b/9c-main/multiplanetary/network/9c-network.yaml index f1c40c3af..cb5be3025 100644 --- a/9c-main/multiplanetary/network/9c-network.yaml +++ b/9c-main/multiplanetary/network/9c-network.yaml @@ -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 @@ -124,6 +121,8 @@ validator: value: "/data" loggingEnabled: true + datadog: + enabled: true extraArgs: - --tx-quota-per-signer=1 @@ -216,6 +215,8 @@ remoteHeadless: value: remote-headless-test loggingEnabled: true + datadog: + enabled: true dataProviderDataMigrator: enabled: true @@ -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: diff --git a/9c-main/multiplanetary/network/heimdall.yaml b/9c-main/multiplanetary/network/heimdall.yaml index 769004e8e..c37048db2 100644 --- a/9c-main/multiplanetary/network/heimdall.yaml +++ b/9c-main/multiplanetary/network/heimdall.yaml @@ -92,6 +92,8 @@ fullState: enabled: true loggingEnabled: true + datadog: + enabled: true useTurnServer: false @@ -183,6 +185,8 @@ validator: value: "0x5A" loggingEnabled: true + datadog: + enabled: true extraArgs: - --tx-quota-per-signer=1 @@ -268,6 +272,8 @@ remoteHeadless: value: remote-headless-test loggingEnabled: true + datadog: + enabled: true dataProviderDataMigrator: enabled: true diff --git a/charts/all-in-one/templates/full-state.yaml b/charts/all-in-one/templates/full-state.yaml index a25a78c24..bb25a6760 100644 --- a/charts/all-in-one/templates/full-state.yaml +++ b/charts/all-in-one/templates/full-state.yaml @@ -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 @@ -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 }} diff --git a/charts/all-in-one/templates/remote-headless.yaml b/charts/all-in-one/templates/remote-headless.yaml index 1b1b75bfe..8f145eb1a 100644 --- a/charts/all-in-one/templates/remote-headless.yaml +++ b/charts/all-in-one/templates/remote-headless.yaml @@ -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' @@ -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 }} diff --git a/charts/all-in-one/templates/validator.yaml b/charts/all-in-one/templates/validator.yaml index d5de0c234..bbeebe089 100644 --- a/charts/all-in-one/templates/validator.yaml +++ b/charts/all-in-one/templates/validator.yaml @@ -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' @@ -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 }} diff --git a/charts/all-in-one/values.yaml b/charts/all-in-one/values.yaml index 8c8324e47..96e69676c 100644 --- a/charts/all-in-one/values.yaml +++ b/charts/all-in-one/values.yaml @@ -148,6 +148,8 @@ validator: memory: 20Gi loggingEnabled: false + datadog: + enabled: false nodeSelector: {} @@ -186,8 +188,10 @@ remoteHeadless: cpu: 2 memory: 20Gi - loggingEnabled: false rateLimitEnabled: false + loggingEnabled: false + datadog: + enabled: false nodeSelector: {} tolerations: [] @@ -278,6 +282,9 @@ fullState: # - --key=val useTurnServer: true + loggingEnabled: false + datadog: + enabled: false host: "" # - "a7ce1613cc0da437c8b06ceb4c4718f4-477884391.us-east-2.elb.amazonaws.com" @@ -300,7 +307,6 @@ fullState: nodeSelector: {} tolerations: [] affinity: {} - loggingEnabled: false worldBoss: enabled: false