Skip to content

fix(metrics): zone CP missing resources_count for Dataplane #15895

@Automaat

Description

@Automaat

Motivation

Zone CPs don't emit resources_count{resource_type="Dataplane"} metric. The counter in pkg/metrics/store/counter.go derives Dataplane and policy counts from MeshInsight resources, which only exist on the global CP. Zone CPs have no MeshInsight, so the loop never executes and these resource types are never emitted.

This breaks dashboards and monitoring on zone CPs — the Dataplane Count panel shows "No data".

Implementation information

countMeshScopedResources() in pkg/metrics/store/counter.go relies solely on MeshInsight.Spec.GetDataplanes().GetTotal(). On a zone CP, it should count Dataplane resources directly from the store instead of depending on MeshInsight.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bugtriage/acceptedThe issue was reviewed and is complete enough to start working on it

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions