fix(opentelemetry): comment out unused k8sattributes processor and related actions for clarity

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-04-21 16:31:29 +08:00
parent 80e75eea27
commit 1967a7444c

View File

@ -29,54 +29,54 @@ spec:
parse_from: body
parse_to: attributes
processors:
k8sattributes:
auth_type: serviceAccount
wait_for_metadata: true
wait_for_metadata_timeout: 10s
passthrough: false
extract:
metadata:
- k8s.pod.name
- k8s.pod.ip
- k8s.pod.uid
- k8s.deployment.name
- k8s.deployment.uid
- k8s.namespace.name
- k8s.node.name
# k8sattributes:
# auth_type: serviceAccount
# wait_for_metadata: true
# wait_for_metadata_timeout: 10s
# passthrough: false
# extract:
# metadata:
# - k8s.pod.name
# - k8s.pod.ip
# - k8s.pod.uid
# - k8s.deployment.name
# - k8s.deployment.uid
# - k8s.namespace.name
# - k8s.node.name
attributes:
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
# - 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
- action: insert
key: app
from_attribute: context.app
- action: insert
key: environment
from_attribute: context.env
transform:
log_statements:
- context: log
statements:
- set(log.body["kubernetes"], log.attributes["kubernetes"])
# transform:
# log_statements:
# - context: log
# statements:
# - set(log.body["kubernetes"], log.attributes["kubernetes"])
batch:
send_batch_size: 5
timeout: 10s
@ -94,6 +94,6 @@ spec:
pipelines:
logs:
receivers: [filelog]
processors: [k8sattributes, attributes, transform, batch]
processors: [k8sattributes, attributes, batch]
exporters: [otlphttp/logs, debug]
{{- end }}