Skip to content

Commit

Permalink
feat: add tracing to chainlink-cluster (#11939)
Browse files Browse the repository at this point in the history
* add init helmchart for tempo and otel-collector

* add grafana, otel-collector and tempo to helm chart

* update grafana version

* add securityContext for tempo and otel

* add storage to tempo

* format

* add tempo key

* update to latest charts

* update chart versions

* add charts-repo to ct.yml

* fix typo

* add another step to add helm repos

* explicit
  • Loading branch information
momentmaker authored Feb 23, 2024
1 parent 63d4bdf commit f4e6852
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .ct.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@ target-branch: develop
chart-dirs: 'charts'
check-version-increment: false
validate-maintainers: false
charts-repos:
- mockserver=https://www.mock-server.com
- opentelemetry-collector=https://open-telemetry.github.io/opentelemetry-helm-charts
- tempo=https://grafana.github.io/helm-charts
- grafana=https://grafana.github.io/helm-charts
6 changes: 6 additions & 0 deletions .github/workflows/helm-chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ jobs:
contents: read
actions: read
steps:
- name: Add repositories
run: |
helm repo add mockserver https://www.mock-server.com
helm repo add opentelemetry-collector https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo add tempo https://grafana.github.io/helm-charts
helm repo add grafana https://grafana.github.io/helm-charts
- name: ci-lint-helm-charts
uses: smartcontractkit/.github/actions/ci-lint-charts@9fd15fe8e698a5e28bfd06b3a91471c56568dcb3 # ci-lint-charts@0.1.1
with:
Expand Down
15 changes: 15 additions & 0 deletions charts/chainlink-cluster/Chart.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
dependencies:
- name: mockserver
repository: https://www.mock-server.com
version: 5.14.0
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.81.2
- name: tempo
repository: https://grafana.github.io/helm-charts
version: 1.7.2
- name: grafana
repository: https://grafana.github.io/helm-charts
version: 7.3.2
digest: sha256:fb13a8a7b490fd1e388a6b082e50d65a39f44a28030d66559d4640c687a70e20
generated: "2024-02-23T15:22:09.284013-06:00"
14 changes: 13 additions & 1 deletion charts/chainlink-cluster/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
apiVersion: v2
name: chainlink-cluster
description: Chainlink nodes cluster
version: 0.2.0
version: 0.3.0
appVersion: "2.6.0"
dependencies:
- name: mockserver
version: "5.14.0"
repository: "https://www.mock-server.com"
condition: mockserver.enabled
- name: opentelemetry-collector
version: "0.81.2"
repository: "https://open-telemetry.github.io/opentelemetry-helm-charts"
condition: opentelemetry-collector.enabled
- name: tempo
version: "1.7.2"
repository: "https://grafana.github.io/helm-charts"
condition: tempo.enabled
- name: grafana
version: "7.3.2"
repository: "https://grafana.github.io/helm-charts"
condition: grafana.enabled
104 changes: 104 additions & 0 deletions charts/chainlink-cluster/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,110 @@ runner:
type: NodePort
port: 8080

opentelemetry-collector:
enabled: true
mode: deployment
image:
repository: otel/opentelemetry-collector
tag: 0.81.2
command:
name: otelcol
extraVolumes:
- name: trace-data
emptyDir: {}
extraVolumeMounts:
- name: trace-data
mountPath: /tracing
podSecurityContext:
fsGroup: 10001
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
config:
receivers:
otlp:
protocols:
grpc:
endpoint: "0.0.0.0:4317"
http:
endpoint: "0.0.0.0:3100"
exporters:
file:
path: /tracing/trace-data.json
otlp:
endpoint: tempo:4317
tls:
insecure: true
service:
telemetry:
logs:
level: "debug"
pipelines:
traces:
receivers: [otlp]
exporters: [file, otlp]

tempo:
enabled: true
image:
tag: "1.7.2"
server:
http_listen_port: 3200
# default storage path: /var/tempo/
readinessProbe:
httpGet:
path: /ready
port: 3200
initialDelaySeconds: 10
periodSeconds: 5
livenessProbe:
httpGet:
path: /ready
port: 3200
initialDelaySeconds: 20
periodSeconds: 10
securityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
tempo:
storage:
trace:
backend: local # backend configuration to use
wal:
path: /tmp/tempo/wal # where to store the the wal locally
local:
path: /tmp/tempo/blocks

grafana:
enabled: true
image:
tag: 7.3.2
datasources:
datasources.yaml:
apiVersion: 1
datasources:
- name: Tempo
type: tempo
access: proxy
orgId: 1
url: http://tempo:3200
basicAuth: false
isDefault: true
version: 1
editable: false
uid: tempo
jsonData:
httpMethod: GET
serviceMap:
datasourceUid: prometheus
env:
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
GF_AUTH_DISABLE_LOGIN_FORM: "true"
GF_FEATURE_TOGGLES_ENABLE: "traceqlEditor"

ingress:
enabled: false
annotations: {}
Expand Down

0 comments on commit f4e6852

Please sign in to comment.