open-telemetry / opentelemetry-collector-contrib

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

Expose container healthcheck status in podmanreceivier #35826

Open Markus78 opened 1 week ago

Markus78 commented 1 week ago

Component(s)

receiver/podman

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

Currently I cannot find healthcheck status in the attributes exported by the podman receiver , this is very useful for visualizing container status ( healthy or unhealthy )

Describe the solution you'd like

Add metric to make it possible to track if container healthcheck is healthy or unhealthy i.e

container.health.status

Describe alternatives you've considered

No response

Additional context

No response

github-actions[bot] commented 1 week ago

Pinging code owners:

rogercoll commented 6 days ago

@Markus78 Thanks for raising this issue.

I agree that a health attribute would be very helpful. My understanding is that we should try to have all new attributes and metrics in semantic conventions first, and quickly checking it seems we have no container.health attribute at the moment: https://github.com/open-telemetry/semantic-conventions/blob/main/docs/attributes-registry/container.md

Markus78 commented 6 days ago

@rogercoll Thank you, Im slightly confused do I have to take any more action regarding the semantic conventions to move this along?

rogercoll commented 5 days ago

That would be ideal, creating a PR into the semantic conventions repository will raise the attention of other contributors (and the repository maintainers) and we will ensure an agreement over the new container.health attribute. Later on, this attribute can be re-used among other OpenTelemetry components (e.g. docker, k8s receivers).

The PR to the podman's receiver does not need to wait for the semconv one to be merged, but it would be great to reference them to show up some real example of the attribute.

Markus78 commented 4 days ago

I wrote this issue