Skip to content

Commit 7497bde

Browse files
authored
Merge branch 'main' into add_k8s_events_kube_stack
2 parents 95eb51b + 395d0da commit 7497bde

File tree

2 files changed

+43
-49
lines changed

2 files changed

+43
-49
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Kind can be one of:
2+
# - breaking-change: a change to previously-documented behavior
3+
# - deprecation: functionality that is being removed in a later release
4+
# - bug-fix: fixes a problem in a previous version
5+
# - enhancement: extends functionality but does not break or fix existing behavior
6+
# - feature: new functionality
7+
# - known-issue: problems that we are aware of in a given version
8+
# - security: impacts on the security of a product or a user’s deployment.
9+
# - upgrade: important information for someone upgrading from a prior version
10+
# - other: does not fit into any of the other categories
11+
kind: feature
12+
13+
# Change summary; a 80ish characters long description of the change.
14+
summary: Remove resource/k8s processor and use k8sattributes processor for mOTEL service attributes
15+
16+
# Long description; in case the summary is not enough to describe the change
17+
# this field accommodate a description without length limits.
18+
# NOTE: This field will be rendered only for breaking-change and known-issue kinds at the moment.
19+
description: |
20+
This PR removes the `resource/k8s` processor in honour of the k8sattributes processor that
21+
provides native support for the Service attributes:
22+
https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/v0.127.0/processor/k8sattributesprocessor#configuring-recommended-resource-attributes
23+
This change is aligned with the respective Semantic Conventions' guidance:
24+
https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-attributes/#service-attributes
25+
26+
# Affected component; usually one of "elastic-agent", "fleet-server", "filebeat", "metricbeat", "auditbeat", "all", etc.
27+
component: elastic-agent
28+
29+
# PR URL; optional; the PR number that added the changeset.
30+
# If not present is automatically filled by the tooling finding the PR where this changelog fragment has been added.
31+
# NOTE: the tooling supports backports, so it's able to fill the original PR number instead of the backport PR number.
32+
# Please provide it if you are adding a fragment for a different PR.
33+
#pr: https://github.com/owner/repo/1234
34+
35+
# Issue URL; optional; the GitHub issue related to this changeset (either closes or is part of).
36+
# If not present is automatically filled by the tooling with the issue linked to the PR number.
37+
#issue: https://github.com/owner/repo/1234

deploy/helm/edot-collector/kube-stack/managed_otlp/values.yaml

Lines changed: 6 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -77,22 +77,6 @@ collectors:
7777
resource_attributes:
7878
k8s.cluster.name:
7979
enabled: true
80-
# [Resource Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor)
81-
resource/k8s: # Resource attributes tailored for services within Kubernetes.
82-
attributes:
83-
- key: service.name # Set the service.name resource attribute based on the well-known app.kubernetes.io/name label
84-
from_attribute: app.label.name
85-
action: insert
86-
- key: service.name # Set the service.name resource attribute based on the k8s.container.name attribute
87-
from_attribute: k8s.container.name
88-
action: insert
89-
- key: app.label.name # Delete app.label.name attribute previously used for service.name
90-
action: delete
91-
- key: service.version # Set the service.version resource attribute based on the well-known app.kubernetes.io/version label
92-
from_attribute: app.label.version
93-
action: insert
94-
- key: app.label.version # Delete app.label.version attribute previously used for service.version
95-
action: delete
9680
resource/hostname:
9781
attributes:
9882
- key: host.name
@@ -125,13 +109,9 @@ collectors:
125109
- "k8s.pod.ip"
126110
- "k8s.pod.uid"
127111
- "k8s.pod.start_time"
128-
labels:
129-
- tag_name: app.label.name
130-
key: app.kubernetes.io/name
131-
from: pod
132-
- tag_name: app.label.version
133-
key: app.kubernetes.io/version
134-
from: pod
112+
# Service attributes added based on https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-attributes/#service-attributes
113+
- "service.name"
114+
- "service.version"
135115
receivers:
136116
# [K8s Events Receiver](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/receiver/k8seventsreceiver)
137117
k8s_events:
@@ -178,7 +158,6 @@ collectors:
178158
- resourcedetection/eks
179159
- resourcedetection/gcp
180160
- resourcedetection/aks
181-
- resource/k8s
182161
- resource/hostname
183162
receivers:
184163
- k8s_cluster
@@ -298,22 +277,6 @@ collectors:
298277
enabled: false
299278
host.id:
300279
enabled: true
301-
# [Resource Processor](https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/resourceprocessor)
302-
resource/k8s: # Resource attributes tailored for services within Kubernetes.
303-
attributes:
304-
- key: service.name # Set the service.name resource attribute based on the well-known app.kubernetes.io/name label
305-
from_attribute: app.label.name
306-
action: insert
307-
- key: service.name # Set the service.name resource attribute based on the k8s.container.name attribute
308-
from_attribute: k8s.container.name
309-
action: insert
310-
- key: app.label.name # Delete app.label.name attribute previously used for service.name
311-
action: delete
312-
- key: service.version # Set the service.version resource attribute based on the well-known app.kubernetes.io/version label
313-
from_attribute: app.label.version
314-
action: insert
315-
- key: app.label.version # Delete app.label.version attribute previously used for service.version
316-
action: delete
317280
resource/cloud:
318281
attributes:
319282
- key: cloud.instance.id
@@ -349,13 +312,9 @@ collectors:
349312
- "k8s.pod.ip"
350313
- "k8s.pod.uid"
351314
- "k8s.pod.start_time"
352-
labels:
353-
- tag_name: app.label.name
354-
key: app.kubernetes.io/name
355-
from: pod
356-
- tag_name: app.label.version
357-
key: app.kubernetes.io/version
358-
from: pod
315+
# Service attributes added based on https://opentelemetry.io/docs/specs/semconv/non-normative/k8s-attributes/#service-attributes
316+
- "service.name"
317+
- "service.version"
359318
receivers:
360319
# [OTLP Receiver](https://github.com/open-telemetry/opentelemetry-collector/tree/main/receiver/otlpreceiver)
361320
otlp:
@@ -501,7 +460,6 @@ collectors:
501460
- resourcedetection/eks
502461
- resourcedetection/gcp
503462
- resourcedetection/aks
504-
- resource/k8s
505463
- resource/hostname
506464
- resource/cloud
507465
exporters:
@@ -517,7 +475,6 @@ collectors:
517475
- resourcedetection/eks
518476
- resourcedetection/gcp
519477
- resourcedetection/aks
520-
- resource/k8s
521478
- resource/hostname
522479
- resource/cloud
523480
exporters:

0 commit comments

Comments
 (0)