Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Jan 10, 2025
1 parent d4dc77d commit 61b534d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions .chloggen/operator-resource-attributes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ subtext: |
If you are using the file log receiver, you can now create the same resource attributes as traces (via OTLP) received
from an application instrumented with the OpenTelemetry Operator -
simply by adding the `extract: { operator_rules: { enabled: true } }` configuration to the `k8sattributesprocessor` processor.
See the [documentation](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/processor/k8sattributesprocessor/README.md#config-example) for more details.
17 changes: 13 additions & 4 deletions processor/k8sattributesprocessor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,19 @@ k8sattributes/2:
- k8s.node.name
- k8s.pod.start_time
labels:
# This label extraction rule takes the value 'app.kubernetes.io/component' label and maps it to the 'app.label.component' attribute which will be added to the associated resources
- tag_name: app.label.component
key: app.kubernetes.io/component
from: pod
# This label extraction rule takes the value 'app.kubernetes.io/component' label and maps it to the 'app.label.component' attribute which will be added to the associated resources
- tag_name: app.label.component
key: app.kubernetes.io/component
from: pod
operator_rules:
# Apply the operator rules - see https://github.com/open-telemetry/opentelemetry-operator#configure-resource-attributes
enabled: true
# Also translate the following labels to the specified resource attributes:
# app.kubernetes.io/name => service.name
# app.kubernetes.io/version => service.version
# app.kubernetes.io/part-of => service.namespace
# This setting is ignored if 'enabled' is set to false
labels: true
pod_association:
- sources:
# This rule associates all resources containing the 'k8s.pod.ip' attribute with the matching pods. If this attribute is not present in the resource, this rule will not be able to find the matching pod.
Expand Down

0 comments on commit 61b534d

Please sign in to comment.