1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 12:46:18 +01:00
Files
openshift-docs/modules/otel-processors-kubernetes-attributes-processor.adoc

41 lines
1.4 KiB
Plaintext

// Module included in the following assemblies:
//
// * observability/otel/otel-collector/otel-collector-processors.adoc
:_mod-docs-content-type: REFERENCE
[id="otel-processors-kubernetes-attributes-processor_{context}"]
= Kubernetes Attributes Processor
[role="_abstract"]
The Kubernetes Attributes Processor enables automatic configuration of spans, metrics, and log resource attributes by using the Kubernetes metadata.
This processor supports traces, metrics, and logs.
This processor automatically identifies the Kubernetes resources, extracts the metadata from them, and incorporates this extracted metadata as resource attributes into relevant spans, metrics, and logs. It utilizes the Kubernetes API to discover all pods operating within a cluster, maintaining records of their IP addresses, pod UIDs, and other relevant metadata.
.Minimum {product-title} permissions required for the Kubernetes Attributes Processor
[source,yaml]
----
kind: ClusterRole
metadata:
name: otel-collector
rules:
- apiGroups: ['']
resources: ['pods', 'namespaces']
verbs: ['get', 'watch', 'list']
- apiGroups: ['apps']
resources: ['replicasets']
verbs: ['get', 'watch', 'list']
# ...
----
.OpenTelemetry Collector using the Kubernetes Attributes Processor
[source,yaml]
----
# ...
config:
processors:
k8sattributes:
filter:
node_from_env_var: KUBE_NODE_NAME
# ...
----