opentelemetry-collector: image: repository: "otel/opentelemetry-collector-contrib" tag: "" extraEnvs: - name: DT_ENDPOINT valueFrom: secretKeyRef: key: DT_ENDPOINT name: dynatrace - name: API_TOKEN valueFrom: secretKeyRef: key: API_TOKEN name: dynatrace config: connectors: spanmetrics: {} exporters: debug: {} opensearch: http: endpoint: http://otel-demo-opensearch:9200 tls: insecure: true logs_index: otel otlp: endpoint: 'my-otel-demo-jaeger-collector:4317' tls: insecure: true otlphttp/dynatrace: endpoint: ${env:DT_ENDPOINT} headers: Authorization: "Api-Token ${env:API_TOKEN}" otlphttp/prometheus: endpoint: http://my-otel-demo-prometheus-server:9090/api/v1/otlp tls: insecure: true extensions: health_check: endpoint: ${env:MY_POD_IP}:13133 processors: batch: {} transform: error_mode: ignore trace_statements: - context: resource statements: - set(attributes["dt.kubernetes.workload.kind"], "statefulset") where IsString(attributes["k8s.statefulset.name"]) - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.statefulset.name"]) where IsString(attributes["k8s.statefulset.name"]) - set(attributes["dt.kubernetes.workload.kind"], "deployment") where IsString(attributes["k8s.deployment.name"]) - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.deployment.name"]) where IsString(attributes["k8s.deployment.name"]) - set(attributes["dt.kubernetes.workload.kind"], "daemonset") where IsString(attributes["k8s.daemonset.name"]) - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.daemonset.name"]) where IsString(attributes["k8s.daemonset.name"]) - set(attributes["dt.kubernetes.cluster.id"], attributes["k8s.cluster.uid"]) where IsString(attributes["k8s.cluster.uid"]) log_statements: - context: resource statements: - set(attributes["dt.kubernetes.workload.kind"], "statefulset") where IsString(attributes["k8s.statefulset.name"]) - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.statefulset.name"]) where IsString(attributes["k8s.statefulset.name"]) - set(attributes["dt.kubernetes.workload.kind"], "deployment") where IsString(attributes["k8s.deployment.name"]) - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.deployment.name"]) where IsString(attributes["k8s.deployment.name"]) - set(attributes["dt.kubernetes.workload.kind"], "daemonset") where IsString(attributes["k8s.daemonset.name"]) - set(attributes["dt.kubernetes.workload.name"], attributes["k8s.daemonset.name"]) where IsString(attributes["k8s.daemonset.name"]) - set(attributes["dt.kubernetes.cluster.id"], attributes["k8s.cluster.uid"]) where IsString(attributes["k8s.cluster.uid"]) k8sattributes: extract: metadata: - k8s.namespace.name - k8s.deployment.name - k8s.statefulset.name - k8s.daemonset.name - k8s.cronjob.name - k8s.job.name - k8s.node.name - k8s.pod.name - k8s.pod.uid - k8s.pod.start_time - k8s.cluster.uid passthrough: false pod_association: - sources: - from: resource_attribute name: k8s.pod.ip - sources: - from: resource_attribute name: k8s.pod.uid - sources: - from: connection memory_limiter: check_interval: 5s limit_percentage: 80 spike_limit_percentage: 25 resource: attributes: - action: insert from_attribute: k8s.pod.uid key: service.instance.id receivers: httpcheck/frontendproxy: targets: - endpoint: http://my-otel-demo-frontendproxy:8080 jaeger: protocols: grpc: endpoint: ${env:MY_POD_IP}:14250 thrift_compact: endpoint: ${env:MY_POD_IP}:6831 thrift_http: endpoint: ${env:MY_POD_IP}:14268 otlp: protocols: grpc: endpoint: ${env:MY_POD_IP}:4317 http: cors: allowed_origins: - http://* - https://* endpoint: ${env:MY_POD_IP}:4318 prometheus: config: scrape_configs: - job_name: opentelemetry-collector scrape_interval: 10s static_configs: - targets: - ${env:MY_POD_IP}:8888 redis: collection_interval: 10s endpoint: valkey-cart:6379 zipkin: endpoint: ${env:MY_POD_IP}:9411 service: extensions: - health_check pipelines: logs: exporters: - opensearch - debug - otlphttp/dynatrace processors: - k8sattributes - transform - memory_limiter - resource - batch receivers: - otlp metrics: exporters: - otlphttp/prometheus - debug - otlphttp/dynatrace processors: - k8sattributes - transform - memory_limiter - resource - batch receivers: - httpcheck/frontendproxy - redis - otlp - spanmetrics traces: exporters: - otlp - debug - spanmetrics - otlphttp/dynatrace processors: - k8sattributes - transform - memory_limiter - resource - batch receivers: - otlp - jaeger - zipkin telemetry: metrics: address: ${env:MY_POD_IP}:8888