You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/19 08:06:16 UTC
[GitHub] [pulsar] tjiuming opened a new issue, #18979: PIP-231: Add metric for topic loading failed
tjiuming opened a new issue, #18979:
URL: https://github.com/apache/pulsar/issues/18979
### Motivation
Currently, we have `topic_load_times` metric to tracking how long a topic loaded succeed.
But when loading a topic, there are may have some chances the topic loaded failed due to MetadataStore or Bookkeeper, and we don't have related metrics to track it.
### Goal
Provide `topic_loaded_failed_count` metric to track topics loaded failed.
### API Changes
_No response_
### Implementation
### Points
Topics are created in [BrokerService.java](https://github.com/tjiuming/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java).
For [NonPersistentTopic](https://github.com/tjiuming/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L1166):
```java
private CompletableFuture<Optional<Topic>> createNonPersistentTopic(String topic) {
CompletableFuture<Optional<Topic>> topicFuture = new CompletableFuture<>();
topicFuture.exceptionally(ex -> {
// Record metric
recordTopicLoadFailed();
});
// ignore ...
return topicFuture;
```
For [PersistentTopic](https://github.com/tjiuming/pulsar/blob/master/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/BrokerService.java#L1508):
```java
private void createPersistentTopic(final String topic, boolean createIfMissing,
CompletableFuture<Optional<Topic>> topicFuture,
Map<String, String> properties) {
topicFuture.exceptionally(ex -> {
// Record metric
recordTopicLoadFailed();
});
// ignore....
}
```
### Metrics
| Name | Type | Description |
| ------ | ----- | ----------- |
| topic_load_failed | Counter | The number of topic loaded failed |
#### Labels
1. cluster: the cluster name of the broker belongs to.
### Alternatives
_No response_
### Anything else?
_No response_
--
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: commits-unsubscribe@pulsar.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [pulsar] github-actions[bot] commented on issue #18979: PIP-231: Add metric for topic load failed
Posted by github-actions.
github-actions[bot] commented on issue #18979:
URL: https://github.com/apache/pulsar/issues/18979#issuecomment-1405924144
The issue had no activity for 30 days, mark with Stale label.
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] PIP-231: Add metric for topic load failed [pulsar]
Posted by "dao-jun (via GitHub)" <gi...@apache.org>.
dao-jun closed issue #18979: PIP-231: Add metric for topic load failed
URL: https://github.com/apache/pulsar/issues/18979
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org