Skip to content

Kubernetes

This guide configures logs, traces, metrics. Replace YOUR_INGEST_KEY with your key on your server, never in a public example.

Restrict Secret access and do not commit ingest-key.txt. The daemonset reads pod logs and host metrics. Applications send OTLP to its private Service.

Terminal window
kubectl create namespace observability
# Save only the key in a protected local file, then remove that file after creating the Secret.
kubectl -n observability create secret generic siteqwality-ingest --from-file=key=./ingest-key.txt

Presets add filelog/k8s/host receivers and their RBAC. Keep resource identity from each application or Kubernetes labels rather than stamping every pod with the Collector name. Review the rendered chart for permissions, ports and resource limits.

mode: daemonset
fullnameOverride: siteqwality-collector
service:
enabled: true
type: ClusterIP
resources:
requests: {cpu: 100m, memory: 128Mi}
limits: {cpu: 500m, memory: 512Mi}
ports:
otlp: {enabled: false}
otlp-http: {hostPort: null}
jaeger-compact: {enabled: false}
jaeger-thrift: {enabled: false}
jaeger-grpc: {enabled: false}
zipkin: {enabled: false}
image:
repository: otel/opentelemetry-collector-contrib
command:
name: otelcol-contrib
presets:
logsCollection:
enabled: true
kubernetesAttributes:
enabled: true
hostMetrics:
enabled: true
extraEnvs:
- name: SQ_INGEST_KEY
valueFrom:
secretKeyRef: {name: siteqwality-ingest, key: key}
config:
receivers:
jaeger: null
zipkin: null
exporters:
debug: null
otlphttp/siteqwality:
endpoint: https://otlp.siteqwality.com
compression: gzip
headers:
Authorization: "Bearer ${env:SQ_INGEST_KEY}"
processors:
resource/siteqwality:
attributes:
- {key: deployment.environment.name, value: "production", action: upsert}
service:
pipelines:
logs:
receivers: [otlp]
processors: [memory_limiter, resource/siteqwality, batch]
exporters: [otlphttp/siteqwality]
traces:
receivers: [otlp]
processors: [memory_limiter, resource/siteqwality, batch]
exporters: [otlphttp/siteqwality]
metrics:
receivers: [otlp]
processors: [memory_limiter, resource/siteqwality, batch]
exporters: [otlphttp/siteqwality]

3. Install the chart and configure your application

Section titled “3. Install the chart and configure your application”

Pin the chart and image versions after validating them in your cluster. Use OTEL_EXPORTER_OTLP_ENDPOINT=http://siteqwality-collector.observability.svc.cluster.local:4318 with http/protobuf. Keep the Service private. Test pod log parsing, namespace labels and service.name before increasing traffic.

Terminal window
helm repo add open-telemetry https://open-telemetry.github.io/opentelemetry-helm-charts
helm repo update
helm upgrade --install siteqwality-collector open-telemetry/opentelemetry-collector --namespace observability --values values.yaml
kubectl -n observability get pods,svc

Open Logs, Traces or Metrics. New data usually shows up within a minute, and a page that says it is waiting for data switches to your data on its own. Nothing arriving? See what each status code means in failure handling.

Store the key in your platform secret mechanism, rotate it when exposed and remove test keys. Set a stable service.name and deployment.environment.name; avoid user IDs or unbounded values in metric labels. Prefer a persistent queue, bounded retries and exporter failure monitoring. Review redaction and processors before increasing traffic.