Skip to content

K8s metrics silently fail, do not appear within Cloud Monitoring #760

Closed
@jsirianni

Description

When using kubeletstatsreceiver and the k8sclusterreceiver, the collector successfully scrapes metrics from my cluster but the data points do not show up within Cloud Monitoring. The collector does not log an error.

Metric descriptors are created in my brand new GCP Project, but they appear as "inactive" and no data points are shown when viewing the metrics using a dashboard widget.

If I remove the k8s-based attributes and replace them with a single host.name attribute, the metrics come through as "generic_node". This provides evidence of an issue with metric mapping to k8s monitored resource types.

This screenshot illustrates a before and after representation of the data points and their resource attributes.

Screenshot 2023-10-26 at 11 32 34 AM

This screenshot illustrates that metrics began showing up after removing the k8s attributes

Screenshot 2023-10-26 at 11 33 28 AM

If I use version 1.18.0 / 0.42.0 of this repo, the issue disappears and metrics work as expected. I believe the issue was introduced in v1.19.1 / v0.43.1 and is still present in v1.20.0 / v0.44.0. Interestingly, v1.19.0 included a change that fixes monitored resource type mapping for logs, which are working great. #683

My testing was performed with bindplane-agent managed by BindPlane OP. If you need me to perform the same tests with OpenTelemetry Contrib, I can, but I suspect the results will be the same.

We support Google Cloud customers who operate Kubernetes Clusters outside of Google Cloud, this issue means that users cannot update to the most recent collector versions.

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions