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

Add watcher.zk.exception metric to capture if ZK watcher is not applying leadership state properly; Add automated build upon PR #11

Merged
merged 3 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: tiered-storage-build

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build with Maven
run: mvn -B package --file pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ public class UploaderMetrics {
public static final String ADD_WATCHER_FAILED_METRIC = UPLOADER_METRIC_PREFIX + "." + "add.watcher.failed";
public static final String ENQUEUE_TO_UPLOAD_LATENCY_MS_METRIC = UPLOADER_METRIC_PREFIX + "." + "enqueue.to.upload.latency.ms";
public static final String RETRY_MARKED_FOR_DELETION_COUNT_METRIC = UPLOADER_METRIC_PREFIX + "." + "retry.marked.for.deletion.count";
public static final String WATCHER_ZK_EXCEPTION_METRIC = UPLOADER_METRIC_PREFIX + "." + "watcher.zk.exception";
}
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,13 @@ public void start() throws InterruptedException, KeeperException {
applyCurrentState();
} catch (Exception e) {
LOG.error("Caught exception while applying current state", e);
MetricRegistryManager.getInstance(config.getMetricsConfiguration()).incrementCounter(
null,
null,
UploaderMetrics.WATCHER_ZK_EXCEPTION_METRIC,
"cluster=" + environmentProvider.clusterId(),
"broker=" + environmentProvider.brokerId()
);
}
}, config.getZkWatcherPollIntervalSeconds(), config.getZkWatcherPollIntervalSeconds(), java.util.concurrent.TimeUnit.SECONDS);
}
Expand Down
Loading