Add metrics for failed topic load operation
- 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
Assessment
This issue has not been assessed yet.