pipe-cd/pipecd

Metrics `insight_application_total ` isn't zero after deleting the applications in a project

Closed this issue · 0 comments

What happened:

After deleting the applications in a project, the metrics insight_application_total isn't zero.

insight_application_total | gauge | Number of applications currently controlled by control plane.

https://pipecd.dev/docs-v0.47.x/user-guide/metrics/#control-plane-metrics

What you expected to happen:

Got zero value or nothing after deleting the applications in a project.

How to reproduce it:

As an environment, I used a Control Plane in the kind cluster and piped on my local machine.

Create a project called test and two apps for the project.
Then, get the metrics insight_application_total before and after deleting apps from /metrics in the ops server. (port-forwarded to the pod)

Before

Applications
_CS__PipeCD上でApplicationをすべて削除したのに、opsのメトリクス_`insight_application_total`_が_0にならない_·_Issue__100_·_ca-dp_ffjlabo-dev

Metrics

% curl http://localhost:9085/metrics | grep insight_application_total
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --100  6888    0  6888    0     0   156k      0 --:--:-- --:--:-- --:--:--  168k
# HELP insight_application_total Number of applications currently controlled by control plane
# TYPE insight_application_total gauge
insight_application_total{app_kind="KUBERNETES",pipecd_component="ops",project="test"} 2

After deleting the apps

Applications

PipeCD

Metrics

% curl http://localhost:9085/metrics | grep insight_application_total
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --100  6908    0  6908    0     0   140k      0 --:--:-- --:--:-- --:--:--  149k
# HELP insight_application_total Number of applications currently controlled by control plane
# TYPE insight_application_total gauge
insight_application_total{app_kind="KUBERNETES",pipecd_component="ops",project="test"} 1

Environment:

  • piped version:
  • control-plane version:
  • Others: