This commit is contained in:
Waylon S. Walker 2025-05-23 10:24:41 -05:00
parent 0a4b32dffe
commit 774ea44af1
9 changed files with 160 additions and 115 deletions

View file

@ -15,11 +15,18 @@ spec:
spec:
containers:
- name: otel-collector
image: otel/opentelemetry-collector-contrib:0.81.0
image: otel/opentelemetry-collector:latest
args: ["--config=/etc/otel/otel-collector-config.yaml"]
volumeMounts:
- name: otel-config
mountPath: /etc/otel
ports:
- name: prom
containerPort: 8889
- name: grpc
containerPort: 4317
- name: http
containerPort: 4318
volumes:
- name: otel-config
configMap:
@ -40,19 +47,12 @@ data:
http:
endpoint: 0.0.0.0:4318
processors:
spanmetrics:
dimensions:
- name: operation
default: unknown
metrics_exporter: prometheus
aggregation_temporality: "AGGREGATION_TEMPORALITY_CUMULATIVE"
exporters:
otlp:
endpoint: tempo:4317
tls:
insecure: true
prometheus:
endpoint: "0.0.0.0:8889"
@ -60,18 +60,20 @@ data:
pipelines:
traces:
receivers: [otlp]
processors: [spanmetrics]
exporters: [otlp]
metrics:
receivers: []
receivers: [otlp]
exporters: [prometheus]
processors: []
---
apiVersion: v1
kind: Service
metadata:
name: otel-collector
namespace: meta
labels:
release: kps # this MUST match the `release:` label used by your Prometheus install
app: otel-collector
spec:
ports:
- name: grpc
@ -80,5 +82,23 @@ spec:
- name: http
port: 4318
targetPort: 4318
- name: prom
port: 8889
targetPort: 8889
selector:
app: otel-collector
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: otel-collector
namespace: meta
labels:
release: kps # again, must match Prometheus's release label
spec:
selector:
matchLabels:
app: otel-collector
endpoints:
- port: prom
interval: 15s