Skip to content
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

[receiver/k8scluster] Attribute k8s.namespace.name in k8s.namespace.phase is always empty #23452

Closed
eplightning opened this issue Jun 19, 2023 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/k8scluster

Comments

@eplightning
Copy link
Contributor

eplightning commented Jun 19, 2023

Component(s)

receiver/k8scluster

What happened?

Description

Namespace name resource attribute for namespace phase metrics in k8scluster receiver seems to be always empty

Steps to Reproduce

Configure k8scluster receiver and configure pipeline to export metrics from it (for example via Prometheus exporter)

Expected Result

# HELP k8s_namespace_phase The current phase of namespaces (1 for active and 0 for terminating)
# TYPE k8s_namespace_phase gauge
k8s_namespace_phase{k8s_namespace_name="some-namespace-name",k8s_namespace_uid="17484d33-f8e6-4512-bebf-394de39a6278",opencensus_resourcetype="k8s"} 1
k8s_namespace_phase{k8s_namespace_name="other-namespace",k8s_namespace_uid="2a0d3510-f895-4cd9-84ff-cd8078cf7097",opencensus_resourcetype="k8s"} 1
k8s_namespace_phase{k8s_namespace_name="kube-system",k8s_namespace_uid="2ba798ae-2e10-45a1-bd73-60d892349123",opencensus_resourcetype="k8s"} 1

Actual Result

# HELP k8s_namespace_phase The current phase of namespaces (1 for active and 0 for terminating)
# TYPE k8s_namespace_phase gauge
k8s_namespace_phase{k8s_namespace_name="",k8s_namespace_uid="17484d33-f8e6-4512-bebf-394de39a6278",opencensus_resourcetype="k8s"} 1
k8s_namespace_phase{k8s_namespace_name="",k8s_namespace_uid="2a0d3510-f895-4cd9-84ff-cd8078cf7097",opencensus_resourcetype="k8s"} 1
k8s_namespace_phase{k8s_namespace_name="",k8s_namespace_uid="2ba798ae-2e10-45a1-bd73-60d892349123",opencensus_resourcetype="k8s"} 1

Collector version

v0.79.0

Environment information

Environment

OS: Ubuntu 22.04.2 LTS
Compiler(if manually compiled): go 1.20

OpenTelemetry Collector configuration

receivers:
      k8s_cluster:
        collection_interval: 1m
        auth_type: serviceAccount
        allocatable_types_to_report: [cpu, memory]
    exporters:
      prometheus:
        endpoint: 0.0.0.0:9402
        resource_to_telemetry_conversion:
          enabled: true
    processors:
      batch:
    extensions:
      health_check:
    service:
      extensions: [health_check]
      pipelines:
        metrics:
          receivers: [k8s_cluster]
          processors: [batch]
          exporters: [prometheus]

Log output

No response

Additional context

No response

@eplightning eplightning added bug Something isn't working needs triage New item requiring triage labels Jun 19, 2023
@github-actions
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/k8scluster
Projects
None yet
Development

No branches or pull requests

1 participant