apache / apache/pulsar

Add metrics for failed topic load operation

Open
#18,963 6 comments 0 reactions 1 assignee Claimed by @tjiuming View on GitHub
Stale type/enhancement
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Motivation

Currently, we have topic load-related metrics like the followings:

```
topic_load_times{cluster="standalone",quantile="0.5"} 140.0
topic_load_times{cluster="standalone",quantile="0.75"} 183.0
topic_load_times{cluster="standalone",quantile="0.95"} 249.0
topic_load_times{cluster="standalone",quantile="0.99"} 249.0
topic_load_times{cluster="standalone",quantile="0.999"} 249.0
topic_load_times{cluster="standalone",quantile="0.9999"} 249.0
topic_load_times_count{cluster="standalone"} 6.0
topic_load_times_sum{cluster="standalone"} 955.0
topic_load_times_created{cluster="standalone"} 1.671240308864E9
```

But we are not able to detect if there are topics that failed to load due to
zookeeper/bookkeeper problems.

It's better to add new metrics for the topic load failed operation so that users
can add alerts based on the metrics.

### Solution

Add `topic_load_failed_count` metrics

### Alternatives

_No response_

### Anything else?

The metrics changes requires a proposal

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.