diff --git a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml index bb4696dc..e3b4c950 100644 --- a/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml +++ b/freeleaps/helm-pkg/authentication/templates/authentication/opentelemetry.yaml @@ -26,11 +26,11 @@ spec: include_file_name: false operators: - type: json_parser - - type: remove - field: body + parse_from: body + parse_to: attributes processors: k8sattributes: - auth_type: "serviceAccount" + auth_type: serviceAccount wait_for_metadata: true wait_for_metadata_timeout: 10s passthrough: false @@ -43,27 +43,29 @@ spec: - k8s.deployment.uid - k8s.namespace.name - k8s.node.name - pod_association: - - sources: - - from: resource_attribute - name: k8s.pod.ip - - sources: - - from: resource_attribute - name: k8s.pod.uid - - sources: - - from: connection - resource: - attributes: - - key: loki.format - action: insert - value: json - transform: - log_statements: - - context: log - statements: - - set(body, body.attributes) - - delete_key(body, "attributes") - - delete_key(body, "resources") + attributes/k8s: + actions: + - action: insert + key: kubernetes.pod_name + from_attribute: k8s.pod.name + - action: insert + key: kubernetes.pod_ip + from_attribute: k8s.pod.ip + - action: insert + key: kubernetes.pod_uid + from_attribute: k8s.pod.uid + - action: insert + key: kubernetes.deployment_name + from_attribute: k8s.deployment.name + - action: insert + key: kubernetes.deployment_uid + from_attribute: k8s.deployment.uid + - action: insert + key: kubernetes.namespace_name + from_attribute: k8s.namespace.name + - action: insert + key: kubernetes.node_name + from_attribute: k8s.node.name batch: send_batch_size: 1000 timeout: 10s @@ -73,12 +75,9 @@ spec: tls: insecure: true service: - telemetry: - logs: - level: "info" pipelines: logs: receivers: [filelog] - processors: [k8sattributes, resource, transform, batch] + processors: [k8sattributes, attributes/k8s, batch] exporters: [loki] {{- end }} \ No newline at end of file