open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.09k stars 2.38k forks source link

Add a metric to report container lifecycle phase (e.g. `k8s.container.phase`) #34406

Open epochstamp opened 3 months ago

epochstamp commented 3 months ago

Component(s)

receiver/k8scluster

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

k8s.pod.phase allows to report the pod phase in its lifecycle, however it does not give enough information to report the phase of each container when the pod has more than 1 container running. An additional metric should be available to report the phase for each container

Describe the solution you'd like

Implement either k8s.container.phase in k8sclusterreceiver or add a resource attribute k8s.container.phase in target_info

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 3 months ago

Pinging code owners:

ChrsMark commented 3 months ago

This will need to be added as a Semantic Convention as well but looks quite similar to the situation's of https://github.com/open-telemetry/semantic-conventions/issues/1181

povilasv commented 3 months ago

This change also bring back the age old issue with how do we actually do enums :/ Ref https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/24425

github-actions[bot] commented 1 month ago

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.