-
Notifications
You must be signed in to change notification settings - Fork 3.2k
k8sclusterreceiver: add init/ephemeral container metrics #43970
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
base: main
Are you sure you want to change the base?
Conversation
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
|
Since the tittle states |
|
@ChrsMark Thanks! I’ll do that once it’s no longer WIP. |
134f294 to
b45071d
Compare
b45071d to
b4e3234
Compare
|
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Signed-off-by: jaehanbyun <[email protected]>
Signed-off-by: jaehanbyun <[email protected]>
Signed-off-by: jaehanbyun <[email protected]>
b4e3234 to
851cb1e
Compare
|
@ChrsMark I'd like to discuss the current implementation. Init Container Metrics Scope The current implementation only collects metrics for sidecar containers (init containers with Rationale:
Should we also collect metrics for all init containers, or is the sidecar-only approach preferred? |
Hmm, I wonder if that's a fair assumption though. It could be that some init containers turned out to be problematic and hence we want to monitor them 🤔 . I also wonder if we should make the collection of these data configurable? @povilasv @dmitryax @TylerHelmuth WDYT? |
Description
Collect k8s.container metrics for sidecar containers and ephemeral containers.
Sidecar containers (Kubernetes 1.29+): Init containers with
restartPolicy: Alwaysare now recognized as sidecars and their metrics are collected alongside regular containers.Ephemeral containers: Debug containers added via
kubectl debugare now included in metrics collection.Regular init containers (without
restartPolicy: Always) are intentionally NOT collected, as they are short-lived and complete before the main containers start.Link to tracking issue
Fixes #42571
Testing
Unit Tests Added:
TestSidecarMetrics: Verifies sidecar container metrics are collected while regular init containers are notTestEphemeralContainerMetrics: Verifies ephemeral container metrics are collectedManual Testing with Kind cluster:
Test Pod:
Sidecar Container Metrics Output:
Ephemeral Container (added via
kubectl debug):Documentation
Changelog entry added in
.chloggen/collect-sidecar-metrics.yaml