-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Collector not working when k8sattributes in use #35879
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Can you provide more details on how you configured the OTEL collector? Additionally, why did you commented the pod_association block in the configuration? I believe that without pod_association, the k8sattributes processor will not function correctly. |
@vkamlesh I've posted the smallest configuration I have to replicate the issue. The logs are everything I have. The collector is broken even if I restore all commented-out code. This is when I run both locally and on Kubernetes. I don't think anything in my Dockerfile should affect this processor, but here it is for completeness: # Adapted from:
# - https://www.honeycomb.io/blog/rescue-struggling-pods-from-scratch
# - https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/cmd/otelcontribcol/Dockerfile
FROM otel/opentelemetry-collector-contrib:0.111.0 AS binary
FROM alpine:latest
ARG USER_UID=10001
USER ${USER_UID}
COPY --from=binary /otelcol-contrib /
EXPOSE 4317 4318 55680 55679
COPY config.yaml /etc/otelcol/config.yaml
ENV LOG_LEVEL=info
ARG COMMIT_SHA=""
ENV COMMIT_SHA=${COMMIT_SHA}
# Remove the entrypoint so we can execute other commands for hooks and other purposes.
ENTRYPOINT []
CMD ["/otelcol-contrib", "--config", "/etc/otelcol/config.yaml"]
|
For k8sattributes, I think you need to un-comment pod_association section.
|
@vkamlesh I tried that and it doesn't work. config.yaml
collector logs
Health check response
|
I don't think that's an issue with the If you are running the Collector on K8s I would advice to take a look into https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-collector and either use the Helm Chart directly or check how these components are configured by default. |
I tried to reproduce this and got the same behaviour when there is an error during the initialization of the kube client:
In this case the error is passed through to the |
That'd make sense! |
…nitialisation (open-telemetry#36385) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds more log output to the k8s attributes receiver to log any errors that are encountered during the kube client initialisation, to make troubleshooting and identifying this issue easier. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#35879 --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…nitialisation (open-telemetry#36385) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds more log output to the k8s attributes receiver to log any errors that are encountered during the kube client initialisation, to make troubleshooting and identifying this issue easier. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#35879 --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…nitialisation (open-telemetry#36385) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds more log output to the k8s attributes receiver to log any errors that are encountered during the kube client initialisation, to make troubleshooting and identifying this issue easier. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#35879 --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
…nitialisation (open-telemetry#36385) <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> #### Description This PR adds more log output to the k8s attributes receiver to log any errors that are encountered during the kube client initialisation, to make troubleshooting and identifying this issue easier. <!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. --> #### Link to tracking issue Fixes open-telemetry#35879 --------- Signed-off-by: Florian Bacher <florian.bacher@dynatrace.com>
Component(s)
processor/k8sattributes
What happened?
Description
I am trying to add
k8sattributes
to a gateway collector, but the collector and health check are not functioning. The collector appears to start, but refuses connections on the receiving ports. The health check endpoint returns a 503 with{"status":"Server not available","upSince":"0001-01-01T00:00:00Z","uptime":""}
.Steps to Reproduce
Expected Result
curl -v http://localhost:13133
.Actual Result
The collector never becomes healthy, and does not accept any signals.
Collector version
0.111.0
Environment information
Environment
OS: macOS 15.0.1 (Docker), and GKE Autopilot
OpenTelemetry Collector configuration
Log output
The text was updated successfully, but these errors were encountered: