Skip to content

Commit

Permalink
New metrics follow up for #218 (#220)
Browse files Browse the repository at this point in the history
* Rename the confusing metric

* Support percentiles in newly added metrics
  • Loading branch information
kawamuray authored Nov 28, 2023
1 parent 5d0fa6e commit cd7658d
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,15 +147,19 @@ public void close() {
public class TaskMetrics extends AbstractMetrics {
public final Timer tasksDeliveryLatency =
meter(() -> Timer.builder("tasks.delivery.latency")
.description("The latency between the time the task is produced and the time the task is consumed. "
+ "This metric depends on the task's `timestampMillis` field, and it might not represent "
+ "the actual end-to-end latency depending on how `timestampMillis` is constructed for the task.")
.description("The latency between the time the task is produced and the time the task is processed. "
+ "This metric depends on the task's `timestampMillis` field, and it might not represent "
+ "the actual end-to-end latency depending on how `timestampMillis` is constructed for the task.")
.tags(availableTags.partitionScope())
.distributionStatisticExpiry(Duration.ofSeconds(60))
.publishPercentiles(0.5, 0.9, 0.99, 0.999)
.register(registry));
public final Timer tasksScheduledDelay =
meter(() -> Timer.builder("tasks.scheduled.delay")
.description("The delay between the scheduled time and the time the task is consumed")
meter(() -> Timer.builder("tasks.scheduled.process.delay")
.description("The delay between the scheduled time and the time the task is processed")
.tags(availableTags.partitionScope())
.distributionStatisticExpiry(Duration.ofSeconds(60))
.publishPercentiles(0.5, 0.9, 0.99, 0.999)
.register(registry));

public final Counter tasksProcessed =
Expand Down

0 comments on commit cd7658d

Please sign in to comment.