Sindweller opened a new issue #696:
URL: https://github.com/apache/apisix-ingress-controller/issues/696
### Issue description
Take `sync_operation_total` as an example:
```
func (c *collector) IncrSyncOperation(resource, result string) {
c.syncOperation.With(prometheus.Labels{
"resource": resource,
"result": result,
}).Inc()
log.Infow("-------sync operation-----")
log.Infow(resource)
log.Infow(result)
}
```
I add some log output to see whether the program reaches this function. And
I got some output like:
```
2021-09-28T16:34:55+08:00 info metrics/prometheus.go:226
-------sync operation-----
2021-09-28T16:34:55+08:00 info metrics/prometheus.go:227
endpoints
2021-09-28T16:34:55+08:00 info metrics/prometheus.go:228 success
```
So it seems there's an endpoint sync operation exist and has been synced
successful.
But there's still only a single record exist in Prometheus:
```
# HELP apisix_ingress_controller_sync_operation_total Number of sync
operations
# TYPE apisix_ingress_controller_sync_operation_total counter
apisix_ingress_controller_sync_operation_total{controller_namespace="default",controller_pod="",resource="schema",result="success"}
1
```
**There's no `endpoint` in the record. What's the problem it might be?**
Related PR: #670
(There's no `events_total` and `check_cluster_health_total` as well, even
the log outputs
```
2021-09-28T15:11:18+08:00 info metrics/prometheus.go:242
-------event------
2021-09-28T15:11:18+08:00 info metrics/prometheus.go:243 pod
2021-09-28T15:11:18+08:00 info metrics/prometheus.go:244 add
```
)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]