Files
devops-infra-helm-charts-gcp/helm-overrides/gke-central-prd-ase1a/opentelemetry-codex-metrics/custom-values.yaml
T
2026-08-26 03:39:42 +05:30

331 lines
7.0 KiB
YAML

nameOverride: ""
fullnameOverride: "opentelemetry-codex-metrics"
additionalLabels:
bu: "central"
team: "sre"
service: "opentelemetry-codex-metrics"
env: "prd"
priority: "p1"
type: "opentelemetry"
arch: "any"
runpod: "ondemand"
externalSecret:
enabled: true
key: meesho/prd/cntr/xcntr/otel-codex-metrics
secretStoreRef:
name: vault-backend
mode: "deployment"
namespaceOverride: ""
presets:
logsCollection:
enabled: false
hostMetrics:
enabled: false
kubernetesAttributes:
enabled: false
kubeletMetrics:
enabled: false
kubernetesEvents:
enabled: false
clusterMetrics:
enabled: false
configMap:
create: true
config:
receivers:
otlp:
protocols:
grpc:
endpoint: ${env:MY_POD_IP}:4317
auth:
authenticator: bearertokenauth
http:
endpoint: ${env:MY_POD_IP}:4318
auth:
authenticator: bearertokenauth
processors:
batch:
send_batch_size: 1024
send_batch_max_size: 2048
timeout: 10s
memory_limiter:
check_interval: 1s
limit_percentage: 85
spike_limit_percentage: 20
# codex.tool_result events carry raw shell command arguments and raw
# command output, which can contain secrets. Drop them before export.
# User prompts are already redacted client-side (log_user_prompt=false).
attributes/scrub-sensitive:
actions:
- key: arguments
action: delete
- key: output
action: delete
# Codex uses reasoning_effort on conversation events and
# model_reasoning_effort on completed response events. Normalize both so
# the derived metric exposes one bounded label.
transform/codex-log-attributes:
error_mode: ignore
log_statements:
- context: log
statements:
- set(attributes["codex.reasoning_effort"], attributes["reasoning_effort"]) where attributes["reasoning_effort"] != nil
- set(attributes["codex.reasoning_effort"], attributes["model_reasoning_effort"]) where attributes["codex.reasoning_effort"] == nil and attributes["model_reasoning_effort"] != nil
connectors:
# Convert selected Codex log dimensions into a Prometheus counter.
# user.email and user.account_id are included intentionally for per-user
# usage attribution (parity with Claude Code telemetry). Do NOT add
# conversation ID, prompt, arguments, or output as labels.
count/codex_logs:
logs:
codex.log.events:
description: Count of Codex OTLP log events by bounded dimensions
conditions:
- 'attributes["event.name"] != nil'
attributes:
- key: event.name
default_value: unknown
- key: event.kind
default_value: unknown
- key: user.account_id
default_value: unknown
- key: user.email
default_value: unknown
- key: codex.reasoning_effort
default_value: unknown
- key: model
default_value: unknown
- key: originator
default_value: unknown
- key: app.version
default_value: unknown
exporters:
prometheus:
endpoint: "0.0.0.0:8889"
namespace: codex_observability
resource_to_telemetry_conversion:
enabled: true
metric_expiration: 5m
# Phase 1 log sink: registers /v1/logs on the OTLP HTTP receiver and
# surfaces traffic in collector stdout for validation. A follow-up will
# switch this to a persistent store once the backend is finalised.
debug/logs:
verbosity: basic
extensions:
health_check:
path: /health
bearertokenauth:
token: ${AUTH_TOKEN}
service:
telemetry:
metrics:
level: normal
address: ${env:MY_POD_IP}:8888
extensions:
- health_check
- bearertokenauth
pipelines:
traces: null
logs:
receivers:
- otlp
processors:
- memory_limiter
- attributes/scrub-sensitive
- transform/codex-log-attributes
- batch
exporters:
- debug/logs
- count/codex_logs
metrics:
receivers:
- otlp
- count/codex_logs
processors:
- memory_limiter
- batch
exporters:
- prometheus
image:
repository: otel/opentelemetry-collector-contrib
pullPolicy: IfNotPresent
tag: "0.111.0"
digest: ""
imagePullSecrets: []
command:
name: otelcol-contrib
extraArgs: []
serviceAccount:
create: true
annotations: {}
name: ""
clusterRole:
create: false
annotations: {}
name: ""
rules: []
clusterRoleBinding:
annotations: {}
name: ""
podSecurityContext: {}
securityContext: {}
nodeSelector: {}
tolerations: []
affinity: {}
topologySpreadConstraints: []
priorityClassName: ""
extraEnvs:
- name: OTEL_RESOURCE_ATTRIBUTES
value: "k8s.node.name=$(K8S_NODE_NAME)"
- name: KUBE_NODE_NAME
valueFrom:
fieldRef:
apiVersion: v1
fieldPath: spec.nodeName
extraEnvsFrom:
- secretRef:
name: opentelemetry-codex-metrics-secret
extraVolumes: []
extraVolumeMounts: []
ports:
otlp:
enabled: true
containerPort: 4317
servicePort: 4317
protocol: TCP
appProtocol: grpc
otlp-http:
enabled: true
containerPort: 4318
servicePort: 4318
protocol: TCP
prom-exporter:
enabled: true
containerPort: 8889
servicePort: 8889
protocol: TCP
jaeger-compact:
enabled: false
jaeger-thrift:
enabled: false
jaeger-grpc:
enabled: false
zipkin:
enabled: false
metrics:
enabled: true
containerPort: 8888
servicePort: 8888
protocol: TCP
resources:
requests:
cpu: 2
memory: 2Gi
limits:
cpu: 2
memory: 2Gi
podAnnotations:
otel.io/path: /metrics
otel.io/port: "8888"
otel.io/scrape: "true"
podLabels: {}
hostNetwork: false
dnsPolicy: "ClusterFirstWithHostNet"
dnsConfig: {}
replicaCount: 2
revisionHistoryLimit: 10
annotations: {}
extraContainers: []
initContainers: []
lifecycleHooks: {}
livenessProbe:
httpGet:
port: 13133
path: /health
readinessProbe:
httpGet:
port: 13133
path: /health
service:
type: ClusterIP
annotations:
io.cilium/global-service: "true"
cloud.google.com/neg: '{"exposed_ports": {"4318":{"name": "otel-cdx-ext-cntr-prd-a"}}}'
ingress:
enabled: false
podMonitor:
enabled: false
serviceMonitor:
enabled: false
podDisruptionBudget:
enabled: true
maxUnavailable: 1
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
behavior: {}
targetCPUUtilizationPercentage: 70
targetMemoryUtilizationPercentage: 60
rollout:
rollingUpdate:
maxUnavailable: 1
strategy: RollingUpdate
prometheusRule:
enabled: false
groups: []
defaultRules:
enabled: false
extraLabels: {}
statefulset:
volumeClaimTemplates: []
podManagementPolicy: "Parallel"
networkPolicy:
enabled: false
annotations: {}
allowIngressFrom: []
extraIngressRules: []
egressRules: []