forked from raystack/depot
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add metrics for Redis sink (#39)
* feat: add metrics for Redis sink * feat: add metrics for Redis sink * feat: add metrics for Redis sink * feat: add metrics for Redis sink * feat: add metrics for Redis sink * tests: add tests for redis sink metrics * tests: add tests for redis sink metrics * tests: add tests for redis sink metrics * tests: add tests for redis sink metrics * docs: add docs for Redis sink metrics
- Loading branch information
1 parent
081274e
commit faba3ac
Showing
5 changed files
with
167 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ plugins { | |
} | ||
|
||
group 'com.gotocompany' | ||
version '0.8.1' | ||
version '0.8.2' | ||
|
||
repositories { | ||
mavenLocal() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
src/main/java/com/gotocompany/depot/metrics/RedisSinkMetrics.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.gotocompany.depot.metrics; | ||
|
||
import com.gotocompany.depot.config.SinkConfig; | ||
|
||
public class RedisSinkMetrics extends SinkMetrics { | ||
|
||
public static final String REDIS_SINK_PREFIX = "redis_"; | ||
|
||
public RedisSinkMetrics(SinkConfig config) { | ||
super(config); | ||
} | ||
|
||
public String getRedisSuccessResponseTotalMetric() { | ||
return getApplicationPrefix() + SINK_PREFIX + REDIS_SINK_PREFIX + "success_response_total"; | ||
} | ||
|
||
public String getRedisNoResponseTotalMetric() { | ||
return getApplicationPrefix() + SINK_PREFIX + REDIS_SINK_PREFIX + "no_response_total"; | ||
} | ||
|
||
public String getRedisConnectionRetryTotalMetric() { | ||
return getApplicationPrefix() + SINK_PREFIX + REDIS_SINK_PREFIX + "connection_retry_total"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters