Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[METRICS] Append worker metrics #1504

Merged
merged 3 commits into from
Feb 20, 2023

Conversation

chaohengstudent
Copy link
Collaborator

fix #1496

  • 新增 "kafka.connect" metrics app-info connect-coordinator-metrics connect-metrics connect-node-metrics connect-worker-metrics connect-worker-rebalance-metrics connector-metrics

  • rename file ConnectorInfo to ConnectorTaskInfo (connector-task-metrics) 因為將新增的 connector-metrics 命名為前者

  • 新增 HasCoordinatorMetrics -> 將 consumer 及 connector 的 coordinator 合併共同 metrics

  • 新增 HasSelectorMetrics -> admin, consumer, producer, connector -metrics 合併共同 metrics

  • 新增測試 ConnectorMetricsTest


import org.astraea.common.metrics.HasBeanObject;

public interface HasAdminMetrics extends HasBeanObject {
@FunctionalInterface
public interface HasSelectorMetrics extends HasBeanObject {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個設計不錯,不過可否加上註解說明一下是對應 kafka 底層的 selector,那個元件並不是公開的元件,稍微說明一下以免誤會

default String clientId() {
return beanObject().properties().get("client-id");
}
public interface HasConsumerCoordinatorMetrics extends HasCoordinatorMetrics {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

這個設計也很好,可以考慮把@FunctionalInterface都加上去,可以預防我們不小心改錯

Copy link
Contributor

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chaohengstudent 這次patch做得很好,超出我預期,幾個小細節修正就可以合併了

@chia7712 chia7712 merged commit e9b6f9c into opensource4you:main Feb 20, 2023
@chia7712
Copy link
Contributor

@chaohengstudent 感謝這次的patch,做得很好。後續我們要將其新增到 https://github.com/skiptests/astraea/blob/main/gui/src/main/java/org/astraea/gui/tab/ConnectorNode.java

可否協助完成?這樣使用者可以透過GUI更方便的觀察 worker 運行狀況

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

補完 worker metrics
2 participants