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] Update the list of attributes added by default #23136

Closed
dmitryax opened this issue Jun 5, 2023 · 15 comments
Closed
Labels

Comments

@dmitryax
Copy link
Member

dmitryax commented Jun 5, 2023

Is your feature request related to a problem? Please describe.

Currently, the following the processor adds the following attributes by default:

  • k8s.namespace.name
  • k8s.pod.name
  • k8s.pod.uid
  • k8s.pod.start_time
  • k8s.deployment.name
  • k8s.node.name
  • container.image.name (if container identity provided)
  • container.image.tag (if container identity provided)

I believe we need to revisit the list or make it required. I don't think we need to add the following attributes by default:

Describe the solution you'd like

Update the list of the attributes added by default to:

- k8s.namespace.name
- k8s.pod.name
- k8s.pod.uid
- k8s.node.name
- container.image.name (if container identity provided)
- container.image.tag (if container identity provided)

Maybe we don't even add k8s.pod.uid for consistency with other fields

@dmitryax dmitryax added enhancement New feature or request priority:p2 Medium processor/k8sattributes k8s Attributes processor labels Jun 5, 2023
@dmitryax
Copy link
Member Author

dmitryax commented Jun 5, 2023

cc @povilasv @fatsheep9146 @gbbr please let me know WDYT

@fatsheep9146
Copy link
Contributor

I wonder why container.image.name and container.image.tag are needed to default?
@dmitryax

@dmitryax
Copy link
Member Author

dmitryax commented Jun 5, 2023

I'm not sure. Maybe k8s.namespace.name, k8s.pod.name and k8s.node.name are enough. Happy to hear other suggestions for the default list.

@dmitryax
Copy link
Member Author

dmitryax commented Jun 6, 2023

What about?

- k8s.namespace.name
- k8s.pod.name
- k8s.node.name
- container.name (if container.id provided)

@fatsheep9146
Copy link
Contributor

What about?

- k8s.namespace.name
- k8s.pod.name
- k8s.node.name
- container.name (if container.id provided)

I agree more with this version, I think the basic goal of using k8s attribute is to find out which container exports this span or metric. And in the next step, user would consider how to aggregate them with other labels, for example, deployment name, job name and so on.

@dmitryax
maybe the discussion can be shared with @open-telemetry/collector-contrib-approvers to hear more suggestions.

@fatsheep9146 fatsheep9146 changed the title [receiver/k8sattributes] Update the list of attributes added by default [processor/k8sattributes] Update the list of attributes added by default Jun 6, 2023
@gbbr
Copy link
Member

gbbr commented Jun 6, 2023

I'm not an expert on how valuable these attributes are but I'll just drop my 2c:

If the answer is no to the latter, then I think that we should definitely make it disabled by default.

@sirianni
Copy link
Contributor

sirianni commented Jun 6, 2023

I personally think these attributes are useful

- k8s.pod.name
- k8s.pod.uid
- k8s.node.name
- k8s.deployment.name
- k8s.statefulset.name
- k8s.daemonset.name
- container.image.name (if container identity provided)
- container.image.tag (if container identity provided)

If it's significantly more expensive to fetch k8s.[deployment|statefulset|daemonset].name then I suppose these could be omitted from the defaults, but I think those are probably the most useful tags for charting/alerting. I think filtering/faceting by k8s.namespace.name and k8s.deployment.name is the primary use case I see.

@dmitryax
Copy link
Member Author

dmitryax commented Jun 6, 2023

Ok, at this point, I don't think we have a strong reason to change it with a consensus on how the default list should look like. If #23067 can be resolved without performance degradation, I think we can just close this issue

@povilasv
Copy link
Contributor

povilasv commented Jun 7, 2023

I personally think these attributes are useful

- k8s.pod.name
- k8s.pod.uid
- k8s.node.name
- k8s.deployment.name
- k8s.statefulset.name
- k8s.daemonset.name
- container.image.name (if container identity provided)
- container.image.tag (if container identity provided)

If it's significantly more expensive to fetch k8s.[deployment|statefulset|daemonset].name then I suppose these could be omitted from the defaults, but I think those are probably the most useful tags for charting/alerting. I think filtering/faceting by k8s.namespace.name and k8s.deployment.name is the primary use case I see.

I also tend to think that the default should include deployment.name and other high level resources if there is no performance drawbacks. These are very useful when digging in the data

@swiatekm
Copy link
Contributor

swiatekm commented Jun 7, 2023

I personally think these attributes are useful

- k8s.pod.name
- k8s.pod.uid
- k8s.node.name
- k8s.deployment.name
- k8s.statefulset.name
- k8s.daemonset.name
- container.image.name (if container identity provided)
- container.image.tag (if container identity provided)

If it's significantly more expensive to fetch k8s.[deployment|statefulset|daemonset].name then I suppose these could be omitted from the defaults, but I think those are probably the most useful tags for charting/alerting. I think filtering/faceting by k8s.namespace.name and k8s.deployment.name is the primary use case I see.

I agree with this list, minus k8s.pod.uid, which I don't think I've ever used. Does it really give us anything the Pod name doesn't?

@sirianni
Copy link
Contributor

sirianni commented Jun 7, 2023

I agree with this list, minus k8s.pod.uid, which I don't think I've ever used.

Agreed. I included it because it seems inexpensive, but I've never used it either.

@jinja2
Copy link
Contributor

jinja2 commented Jun 15, 2023

I think k8s.pod.uid should be kept in the default set. It is the only attribute in the suggested list which is guaranteed to change on a pod recreate (pod name will be same for statefulset pod). Grouping by uid provides an easy way to visualize if a metric anomaly is due to pod spec change.

@github-actions
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Copy link
Contributor

github-actions bot commented Dec 8, 2023

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@github-actions github-actions bot added the Stale label Dec 8, 2023
Copy link
Contributor

github-actions bot commented Feb 6, 2024

This issue has been closed as inactive because it has been stale for 120 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants