feat: enable Claude Code OTEL telemetry in claudebox containers

Add OpenTelemetry environment variables to export Claude Code logs
and metrics to the existing OTEL collector. Provides visibility into
long-running builds.

- claudebox-worker: sidecar in rdev-worker deployment
- claudebox-standalone: StatefulSet for direct access

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
jordan 2026-02-06 19:43:47 -07:00
parent bc010c4746
commit 5d86bb7c57
2 changed files with 36 additions and 0 deletions

View File

@ -25,6 +25,25 @@ spec:
image: registry.threesix.ai/rdev/claudebox:latest image: registry.threesix.ai/rdev/claudebox:latest
imagePullPolicy: Always imagePullPolicy: Always
env:
# Claude Code Telemetry - exports to OTEL collector
- name: CLAUDE_CODE_ENABLE_TELEMETRY
value: "1"
- name: OTEL_METRICS_EXPORTER
value: "otlp"
- name: OTEL_LOGS_EXPORTER
value: "otlp"
- name: OTEL_EXPORTER_OTLP_PROTOCOL
value: "grpc"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "otel-collector.observability.svc.cluster.local:4317"
- name: OTEL_SERVICE_NAME
value: "claudebox-standalone"
- name: OTEL_METRIC_EXPORT_INTERVAL
value: "10000"
- name: OTEL_LOGS_EXPORT_INTERVAL
value: "5000"
resources: resources:
requests: requests:
cpu: "500m" cpu: "500m"

View File

@ -94,6 +94,23 @@ spec:
value: "rdev-worker" value: "rdev-worker"
- name: GIT_EMAIL - name: GIT_EMAIL
value: "worker@threesix.ai" value: "worker@threesix.ai"
# Claude Code Telemetry - exports to OTEL collector
- name: CLAUDE_CODE_ENABLE_TELEMETRY
value: "1"
- name: OTEL_METRICS_EXPORTER
value: "otlp"
- name: OTEL_LOGS_EXPORTER
value: "otlp"
- name: OTEL_EXPORTER_OTLP_PROTOCOL
value: "grpc"
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "otel-collector.observability.svc.cluster.local:4317"
- name: OTEL_SERVICE_NAME
value: "claudebox-worker"
- name: OTEL_METRIC_EXPORT_INTERVAL
value: "10000"
- name: OTEL_LOGS_EXPORT_INTERVAL
value: "5000"
ports: ports:
- name: http - name: http