Skip to content

Commit

Permalink
Setup OTEL Collector for metric orchestration
Browse files Browse the repository at this point in the history
  • Loading branch information
garryod committed Mar 14, 2024
1 parent f8a4935 commit e3b7286
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/charts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
run: |
helm repo add prometheus https://prometheus-community.github.io/helm-charts
helm repo add jaegertracing https://jaegertracing.github.io/helm-charts
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
- name: Lint
run: >
Expand Down
7 changes: 5 additions & 2 deletions charts/data-gateway/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@ dependencies:
- name: jaeger
repository: https://jaegertracing.github.io/helm-charts
version: 2.0.0
digest: sha256:350282c3114464a73c0ded6e66072f7530e4bce8298d90cb73dd19119fc9a123
generated: "2024-03-14T10:53:42.342035905Z"
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.83.0
digest: sha256:c64dbb83ab863fb6f4c83dd8fc4505508072fda7b83f3ae1d1ac96af4b3b0c5f
generated: "2024-03-14T11:22:20.559143777Z"
4 changes: 4 additions & 0 deletions charts/data-gateway/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ dependencies:
repository: https://jaegertracing.github.io/helm-charts
version: 2.0.0
condition: jaeger.enabled
- name: opentelemetry-collector
repository: https://open-telemetry.github.io/opentelemetry-helm-charts
version: 0.83.0
condition: opentelemetry-collector.enabled
67 changes: 65 additions & 2 deletions charts/data-gateway/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ prometheus:
static_configs:
- targets:
- localhost:9090
- job_name: "kubernetes-service-endpoints"
- job_name: kubernetes-service-endpoints
kubernetes_sd_configs:
- role: endpoints
namespaces:
Expand Down Expand Up @@ -80,7 +80,7 @@ prometheus:
- source_labels: [__meta_kubernetes_pod_node_name]
action: replace
target_label: node
- job_name: "kubernetes-pods"
- job_name: kubernetes-pods
kubernetes_sd_configs:
- role: pod
namespaces:
Expand Down Expand Up @@ -134,6 +134,9 @@ jaeger:
cassandra: false
allInOne:
enabled: true
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "14269"
storage:
type: none
agent:
Expand All @@ -142,3 +145,63 @@ jaeger:
enabled: false
query:
enabled: false

opentelemetry-collector:
enabled: true
mode: deployment
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9090"
ports:
prometheus:
enabled: true
containerPort: 9090
servicePort: 9090
hostPort: 9090
protocol: TCP
jaeger-compact:
enabled: false
jaeger-thrift:
enabled: false
jaeger-grpc:
enabled: false
zipkin:
enabled: false
config:
receivers:
jaeger: null
zipkin: null
prometheus:
config:
scrape_configs:
- job_name: otel-collector
scrape_interval: 10s
static_configs:
- targets:
- ${env:MY_POD_IP}:8888
exporters:
otlp/jaeger:
endpoint: "{{ .Release.Name }}-jaeger-collector:4317"
tls:
insecure: true
prometheus:
endpoint: :9090
service:
pipelines:
metrics:
receivers:
- otlp
- prometheus
processors:
- memory_limiter
- batch
exporters:
- prometheus
traces:
receivers:
- otlp
processors:
- memory_limiter
- batch
exporters:
- otlp/jaeger

0 comments on commit e3b7286

Please sign in to comment.