apiVersion: v1 kind: ConfigMap metadata: name: amp-opentelemetry-collector-config namespace: openchoreo-observability-plane data: relay: | receivers: otlp: protocols: http: endpoint: 0.0.0.0:4318 include_metadata: true exporters: opensearch: http: auth: authenticator: basicauth/opensearch endpoint: https://opensearch.openchoreo-observability-plane.svc.cluster.local:9200 tls: insecure_skip_verify: true sending_queue: num_consumers: 5 queue_size: 1000 sizer: items traces_index: "otel-traces" traces_index_time_format: "yyyy-MM-dd" extensions: basicauth/opensearch: client_auth: # Injected by the observability-tracing-opensearch chart's default # opentelemetry-collector.extraEnvs, which source them from the # opensearch-admin-credentials Secret — the same Secret the observer, # the Fluent Bit adapter and openSearchSetup already read. Never # inline the credentials here: a literal keeps working on a local # install (where the seeded password happens to match the chart # default) while silently failing anywhere the password was changed, # and the collector then drops every trace with # "failed to json unmarshal body: invalid character 'U'". username: ${env:OPENSEARCH_USERNAME} password: ${env:OPENSEARCH_PASSWORD} health_check: endpoint: ${env:MY_POD_IP}:13133 processors: resource: attributes: - key: openchoreo.dev/component-uid from_context: metadata.x-user-component action: upsert - key: openchoreo.dev/environment-uid from_context: metadata.x-user-environment action: upsert - key: openchoreo.dev/project-uid from_context: metadata.x-user-project action: upsert - key: openchoreo.dev/namespace from_context: metadata.x-user-namespace action: upsert service: extensions: [basicauth/opensearch, health_check] pipelines: traces: receivers: [otlp] processors: [resource] exporters: [opensearch]