Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

processor/k8sattributes: Add resource_attributes to metadata.yaml #23213

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion processor/k8sattributesprocessor/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ go 1.19

require (
github.com/docker/docker v24.0.2+incompatible
github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/open-telemetry/opentelemetry-collector-contrib/internal/k8sconfig v0.78.0
github.com/stretchr/testify v1.8.4
Expand Down Expand Up @@ -43,7 +44,6 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gnostic v0.5.7-v3refs // indirect
github.com/google/go-cmp v0.5.9 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/imdario/mergo v0.3.13 // indirect
github.com/josharian/intern v1.0.0 // indirect
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
default:
all_set:
resource_attributes:
container.id:
enabled: true
container.image.name:
enabled: true
container.image.tag:
enabled: true
k8s.container.name:
enabled: true
k8s.cronjob.name:
enabled: true
k8s.daemonset.name:
enabled: true
k8s.daemonset.uid:
enabled: true
k8s.deployment.name:
enabled: true
k8s.deployment.uid:
enabled: true
k8s.job.name:
enabled: true
k8s.job.uid:
enabled: true
k8s.namespace.name:
enabled: true
k8s.node.name:
enabled: true
k8s.pod.hostname:
enabled: true
k8s.pod.name:
enabled: true
k8s.pod.start_time:
enabled: true
k8s.pod.uid:
enabled: true
k8s.replicaset.name:
enabled: true
k8s.replicaset.uid:
enabled: true
k8s.statefulset.name:
enabled: true
k8s.statefulset.uid:
enabled: true
none_set:
resource_attributes:
container.id:
enabled: false
container.image.name:
enabled: false
container.image.tag:
enabled: false
k8s.container.name:
enabled: false
k8s.cronjob.name:
enabled: false
k8s.daemonset.name:
enabled: false
k8s.daemonset.uid:
enabled: false
k8s.deployment.name:
enabled: false
k8s.deployment.uid:
enabled: false
k8s.job.name:
enabled: false
k8s.job.uid:
enabled: false
k8s.namespace.name:
enabled: false
k8s.node.name:
enabled: false
k8s.pod.hostname:
enabled: false
k8s.pod.name:
enabled: false
k8s.pod.start_time:
enabled: false
k8s.pod.uid:
enabled: false
k8s.replicaset.name:
enabled: false
k8s.replicaset.uid:
enabled: false
k8s.statefulset.name:
enabled: false
k8s.statefulset.uid:
enabled: false
87 changes: 87 additions & 0 deletions processor/k8sattributesprocessor/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,90 @@ status:
stability:
beta: [logs, metrics, traces]
distributions: [contrib, splunk, observiq, sumo]

# resource attributes are exposed through a different configuration interface (extract::metadata).
resource_attributes:
k8s.namespace.name:
description: The name of the namespace that the pod is running in.
type: string
enabled: true
k8s.pod.name:
description: The name of the Pod.
type: string
enabled: true
k8s.pod.uid:
description: The UID of the Pod.
type: string
enabled: true
k8s.pod.hostname:
description: The hostname of the Pod.
type: string
enabled: false
k8s.pod.start_time:
description: The start time of the Pod.
type: string
enabled: true
k8s.deployment.name:
description: The name of the Deployment.
type: string
enabled: true
k8s.deployment.uid:
description: The UID of the Deployment.
type: string
enabled: false
k8s.replicaset.name:
description: The name of the ReplicaSet.
type: string
enabled: false
k8s.replicaset.uid:
description: The UID of the ReplicaSet.
type: string
enabled: false
k8s.daemonset.name:
description: The name of the DaemonSet.
type: string
enabled: false
k8s.daemonset.uid:
description: The UID of the DaemonSet.
type: string
enabled: false
k8s.statefulset.name:
description: The name of the StatefulSet.
type: string
enabled: false
k8s.statefulset.uid:
description: The UID of the StatefulSet.
type: string
enabled: false
k8s.container.name:
description: The name of the Container in a Pod template.
type: string
enabled: false
k8s.job.name:
description: The name of the Job.
type: string
enabled: false
k8s.job.uid:
description: The UID of the Job.
type: string
enabled: false
k8s.cronjob.name:
description: The name of the CronJob.
type: string
enabled: false
k8s.node.name:
description: The name of the Node.
type: string
enabled: true
container.id:
description: Container ID. Usually a UUID, as for example used to identify Docker containers. The UUID might be abbreviated.
type: string
enabled: false
container.image.name:
description: Name of the image the container was built on.
type: string
enabled: false
container.image.tag:
description: Container image tag.
type: string
enabled: false