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

service.name: replace app.kubernetes.io/component to app.kubernetes.io/name #26

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all 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
16 changes: 8 additions & 8 deletions resources/kubernetes/operator/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ collectors:
resource/k8s:
attributes:
- key: service.name
from_attribute: app.label.component
from_attribute: app.label.name
action: insert
- key: service.name
from_attribute: k8s.container.name
action: insert
- key: app.label.component
- key: app.label.name
action: delete
- key: service.version
from_attribute: app.label.version
Expand Down Expand Up @@ -121,8 +121,8 @@ collectors:
- "k8s.pod.uid"
- "k8s.pod.start_time"
labels:
- tag_name: app.label.component
key: app.kubernetes.io/component
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ChrsMark for some reason here was used app.kubernetes.io/component for service.name - it was introduced in the original version of the manifest, maybe you remember reasoning for that? or it was a mistake and it should be app.kubernetes.io/name ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I remember correctly it was an assumption borrowed from OTel demo: https://github.com/open-telemetry/opentelemetry-helm-charts/blob/3a6fff3f065dafcdcf7041885c5d0d1bf61a1167/charts/opentelemetry-demo/values.yaml#L4-L14.

I'm not sure if that's coming from a spec definition or something so I think it's not a hard rule. However, whatever we choose we should ensure that it's the way forward. See open-telemetry/semantic-conventions#236

@rogercoll do you have maybe more context on this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!
by those changes I am replicating ingest pipeline we use for logs - https://github.com/elastic/integrations/blob/main/packages/kubernetes/data_stream/container_logs/elasticsearch/ingest_pipeline/default.yml

and it seems to align with the candidates in open-telemetry/semantic-conventions#236

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern is that OTel demo uses the app.kubernetes.io/component which might bring issues in signal correlation. I wonder if we could propose this as a change to OTel demo.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have both labels?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My only concern is that OTel demo uses the app.kubernetes.io/component which might bring issues in signal correlation. I wonder if we could propose this as a change to OTel demo.

Good catch! I agree with you both, the OTel demo should be using app.kubernetes.io/name instead of the current app.kubernetes.io/component. At least based on the definition of this well-known attributes: https://kubernetes.io/docs/reference/labels-annotations-taints/ and SemConv.

Just created this issue upstream to track the changes: open-telemetry/opentelemetry-helm-charts#1383

- tag_name: app.label.name
key: app.kubernetes.io/name
from: pod
- tag_name: app.label.version
key: app.kubernetes.io/version
Expand Down Expand Up @@ -242,12 +242,12 @@ collectors:
resource/k8s:
attributes:
- key: service.name
from_attribute: app.label.component
from_attribute: app.label.name
action: insert
- key: service.name
from_attribute: k8s.container.name
action: insert
- key: app.label.component
- key: app.label.name
action: delete
- key: service.version
from_attribute: app.label.version
Expand Down Expand Up @@ -335,8 +335,8 @@ collectors:
- "k8s.pod.uid"
- "k8s.pod.start_time"
labels:
- tag_name: app.label.component
key: app.kubernetes.io/component
- tag_name: app.label.name
key: app.kubernetes.io/name
from: pod
- tag_name: app.label.version
key: app.kubernetes.io/version
Expand Down