-
Notifications
You must be signed in to change notification settings - Fork 104
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
k8s_container monitored resource type requires cloud.platform: gcp_kubernetes_engine
even when running outside of Google Cloud
#627
Comments
Hi @jsirianni, it looks like the line you're referring to has been part of the resource mapping for at least ~2 years based on the blame: https://github.com/GoogleCloudPlatform/opentelemetry-operations-go/blame/3a2c57209765f4752bd140a007612a81f58489c1/exporter/collector/monitoredresource.go#L131 (moved from that file to resourcemapping.go in f4bd197 ~1 year ago), so maybe it is a different change that has caused this behavior to show up recently for you. Do you know what version of these modules you were using when this worked, or if you've recently upgraded them? I do agree that the implied dependence on the GCP platform attribute is weird, so I'll check if there's a specific reason we have that or if this could be opened up to other k8s platforms. |
Talked to the team and it sounds like this may have possibly been due to us originally writing to |
Seems like if it is mapped to any hosted kubernetes cloud.platform (e.g. EKS, AKS, etc), then we should map to k8s_container. |
Opened #683 to fix this |
This should be fixed in the next release with #683, and anything that sets |
In the past, we were able to send logs to Cloud Logging by setting the following resource attributes
Recently, I noticed that my logs are no longer shown under the
k8s_container
monitored resource type, instead they appear asgeneric_node
.This is because the internal/resourcemapping/resourcemapping.go is checking specifically for
cloud.platform: gcp_kubernetes_engine
.We work with many Google customers who operate Kubernetes clusters outside of Google Cloud, therefore, the requirement for
cloud.platform: gcp_kubernetes_engine
is surprising, especially when using OpenTelemetry.I can reproduce this with Minikube running on my workstation.
With cloud.platform set
Using the resource attribute processor, I can set the cloud.platform value to "trick" the exporter.
without cloud.platform
If I do not add the attribute, my logs come through but as
generic_node
.The text was updated successfully, but these errors were encountered: